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 <trevor_davenport@selinc.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1526>
This commit is contained in:
Trevor Davenport 2024-05-09 11:51:03 -06:00
parent e5c8b664d3
commit 69beb65653

View File

@ -63,9 +63,9 @@ static PixmapPtr drmmode_create_pixmap_header(ScreenPtr pScreen, int width, int
void *pPixData); void *pPixData);
static const struct drm_color_ctm ctm_identity = { { static const struct drm_color_ctm ctm_identity = { {
1UL << 32, 0, 0, 1ULL << 32, 0, 0,
0, 1UL << 32, 0, 0, 1ULL << 32, 0,
0, 0, 1UL << 32 0, 0, 1ULL << 32
} }; } };
static Bool ctm_is_identity(const struct drm_color_ctm *ctm) static Bool ctm_is_identity(const struct drm_color_ctm *ctm)