From 69beb656539d5f9f82ec501f42245d0f43b709d8 Mon Sep 17 00:00:00 2001 From: Trevor Davenport Date: Thu, 9 May 2024 11:51:03 -0600 Subject: [PATCH] modesetting: Fix invalid identity CTM on 32-bit. On 32-bit, the shifts used to initialized the identity CTM overflow and result in zero instead of the intended 1. This results in a broken display (on at least i915) when using the modesetting xorg driver. Fix the invalid CTM by using ULL suffix on the shifts. Fixes:4e670f1281ad75c5673b6ac75645036d810da8d9 Signed-off-by: Trevor Davenport Part-of: --- hw/xfree86/drivers/modesetting/drmmode_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 5c8b47b53..6942126c0 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -63,9 +63,9 @@ static PixmapPtr drmmode_create_pixmap_header(ScreenPtr pScreen, int width, int void *pPixData); static const struct drm_color_ctm ctm_identity = { { - 1UL << 32, 0, 0, - 0, 1UL << 32, 0, - 0, 0, 1UL << 32 + 1ULL << 32, 0, 0, + 0, 1ULL << 32, 0, + 0, 0, 1ULL << 32 } }; static Bool ctm_is_identity(const struct drm_color_ctm *ctm)