aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/backend.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-07 17:50:40 +0200
committerSimon Ser <contact@emersion.fr>2020-05-09 16:42:25 +0200
commit70883fd10beba4f78e3325eb6e38750360502f58 (patch)
tree03b41327d9e610af0c21ac11d5c622ab5d024e0f /backend/drm/backend.c
parent69b22790923186bea48ab23e413927334eff828b (diff)
backend/drm: apply gamma LUT on page-flip
Diffstat (limited to 'backend/drm/backend.c')
-rw-r--r--backend/drm/backend.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index c07736cf..4eabb0ec 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -93,6 +93,7 @@ static void session_signal(struct wl_listener *listener, void *data) {
struct wlr_drm_connector *conn;
wl_list_for_each(conn, &drm->outputs, link){
+ conn->crtc->pending |= WLR_DRM_CRTC_GAMMA_LUT;
if (conn->output.enabled && conn->output.current_mode != NULL) {
drm_connector_set_mode(&conn->output,
conn->output.current_mode);
@@ -112,16 +113,6 @@ static void session_signal(struct wl_listener *listener, void *data) {
}
drm->iface->crtc_set_cursor(drm, conn->crtc, bo);
-
- if (conn->crtc->gamma_table != NULL) {
- size_t size = conn->crtc->gamma_table_size;
- uint16_t *r = conn->crtc->gamma_table;
- uint16_t *g = conn->crtc->gamma_table + size;
- uint16_t *b = conn->crtc->gamma_table + 2 * size;
- drm->iface->crtc_set_gamma(drm, conn->crtc, size, r, g, b);
- } else {
- set_drm_connector_gamma(&conn->output, 0, NULL, NULL, NULL);
- }
}
} else {
wlr_log(WLR_INFO, "DRM fd paused");