mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Merge pull request #618 from VincentVanlaer/atomic-gamma
Add atomic gamma control
This commit is contained in:
commit
664d7bfe4e
7 changed files with 110 additions and 9 deletions
|
|
@ -39,9 +39,15 @@ struct wlr_drm_plane {
|
|||
|
||||
struct wlr_drm_crtc {
|
||||
uint32_t id;
|
||||
uint32_t mode_id; // atomic modesetting only
|
||||
|
||||
// Atomic modesetting only
|
||||
uint32_t mode_id;
|
||||
uint32_t gamma_lut;
|
||||
drmModeAtomicReq *atomic;
|
||||
|
||||
// Legacy only
|
||||
drmModeCrtc *legacy_crtc;
|
||||
|
||||
union {
|
||||
struct {
|
||||
struct wlr_drm_plane *overlay;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,13 @@ struct wlr_drm_interface {
|
|||
// Move the cursor on crtc
|
||||
bool (*crtc_move_cursor)(struct wlr_drm_backend *drm,
|
||||
struct wlr_drm_crtc *crtc, int x, int y);
|
||||
// Set the gamma lut on crtc
|
||||
bool (*crtc_set_gamma)(struct wlr_drm_backend *drm,
|
||||
struct wlr_drm_crtc *crtc, uint16_t *r, uint16_t *g, uint16_t *b,
|
||||
uint32_t size);
|
||||
// Get the gamma lut size of a crtc
|
||||
uint32_t (*crtc_get_gamma_size)(struct wlr_drm_backend *drm,
|
||||
struct wlr_drm_crtc *crtc);
|
||||
};
|
||||
|
||||
extern const struct wlr_drm_interface atomic_iface;
|
||||
|
|
|
|||
|
|
@ -32,8 +32,10 @@ union wlr_drm_crtc_props {
|
|||
|
||||
uint32_t active;
|
||||
uint32_t mode_id;
|
||||
uint32_t gamma_lut;
|
||||
uint32_t gamma_lut_size;
|
||||
};
|
||||
uint32_t props[4];
|
||||
uint32_t props[6];
|
||||
};
|
||||
|
||||
union wlr_drm_plane_props {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue