From e0d267fb12353a60c0465a1bc367ac2e9ef8f1c7 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 1 Jul 2022 15:41:00 +0300 Subject: [PATCH] backend-drm: reset CRTC_CTM We are assuming that CRTC_CTM is pass-through, so better ensure it really is pass-through rather than whatever the previous KMS client left there. Signed-off-by: Pekka Paalanen --- libweston/backend-drm/drm-internal.h | 1 + libweston/backend-drm/kms.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libweston/backend-drm/drm-internal.h b/libweston/backend-drm/drm-internal.h index d670e57d..ef36d64f 100644 --- a/libweston/backend-drm/drm-internal.h +++ b/libweston/backend-drm/drm-internal.h @@ -236,6 +236,7 @@ enum wdrm_content_type { enum wdrm_crtc_property { WDRM_CRTC_MODE_ID = 0, WDRM_CRTC_ACTIVE, + WDRM_CRTC_CTM, WDRM_CRTC_DEGAMMA_LUT, WDRM_CRTC_DEGAMMA_LUT_SIZE, WDRM_CRTC_GAMMA_LUT, diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c index 016aaa72..c9637834 100644 --- a/libweston/backend-drm/kms.c +++ b/libweston/backend-drm/kms.c @@ -165,6 +165,7 @@ const struct drm_property_info connector_props[] = { const struct drm_property_info crtc_props[] = { [WDRM_CRTC_MODE_ID] = { .name = "MODE_ID", }, [WDRM_CRTC_ACTIVE] = { .name = "ACTIVE", }, + [WDRM_CRTC_CTM] = { .name = "CTM", }, [WDRM_CRTC_DEGAMMA_LUT] = { .name = "DEGAMMA_LUT", }, [WDRM_CRTC_DEGAMMA_LUT_SIZE] = { .name = "DEGAMMA_LUT_SIZE", }, [WDRM_CRTC_GAMMA_LUT] = { .name = "GAMMA_LUT", }, @@ -1084,6 +1085,7 @@ drm_output_apply_state_atomic(struct drm_output_state *state, ret |= crtc_add_prop_zero_ok(req, crtc, WDRM_CRTC_DEGAMMA_LUT, 0); } + ret |= crtc_add_prop_zero_ok(req, crtc, WDRM_CRTC_CTM, 0); /* No need for the DPMS property, since it is implicit in * routing and CRTC activity. */