diff options
Diffstat (limited to 'backend/drm/legacy.c')
-rw-r--r-- | backend/drm/legacy.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c index 61140cec..eec8c642 100644 --- a/backend/drm/legacy.c +++ b/backend/drm/legacy.c @@ -59,9 +59,22 @@ bool legacy_crtc_move_cursor(struct wlr_drm_backend *drm, return !drmModeMoveCursor(drm->fd, crtc->id, x, y); } +bool legacy_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) { + return !drmModeCrtcSetGamma(drm->fd, crtc->id, size, r, g, b); +} + +uint32_t legacy_crtc_get_gamma_size(struct wlr_drm_backend *drm, + struct wlr_drm_crtc *crtc) { + return crtc->legacy_crtc->gamma_size; +} + const struct wlr_drm_interface legacy_iface = { .conn_enable = legacy_conn_enable, .crtc_pageflip = legacy_crtc_pageflip, .crtc_set_cursor = legacy_crtc_set_cursor, .crtc_move_cursor = legacy_crtc_move_cursor, + .crtc_set_gamma = legacy_crtc_set_gamma, + .crtc_get_gamma_size = legacy_crtc_get_gamma_size, }; |