From fb3bea80144ea25fb21de8a3eeb0c9249f4cbfd6 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Thu, 19 Nov 2020 21:34:00 +0100 Subject: backend/drm: Use legacy gamma size for legacy backend We would always return the GAMMA_LUT_SIZE property if available, and only fall back to legacy gamma size otherwise. This leads to issues if both are available in differs in size while we use the legacy backend. Ensure that we only return the legacy size if we're using the legacy backend. Closes: https://github.com/swaywm/wlroots/issues/2429 --- backend/drm/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/drm/drm.c b/backend/drm/drm.c index dd3e9c71..f797dd5a 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -609,7 +609,7 @@ static void drm_connector_rollback_render(struct wlr_output *output) { size_t drm_crtc_get_gamma_lut_size(struct wlr_drm_backend *drm, struct wlr_drm_crtc *crtc) { - if (crtc->props.gamma_lut_size == 0) { + if (crtc->props.gamma_lut_size == 0 || drm->iface == &legacy_iface) { return (size_t)crtc->legacy_crtc->gamma_size; } -- cgit v1.2.3