modesetting: Fix double increment in cursor buffer cleanup loop

Fixes: 1f41320e1c ("modesetting: Use a more optimal hw cursor size")
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2201>
This commit is contained in:
Peter Hutterer 2026-04-16 09:30:56 +10:00 committed by Marge Bot
parent 925edb6c9e
commit 44938d4818

View file

@ -1885,7 +1885,7 @@ drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 *image)
ptr[i++] = cpu_to_le32(image[y * ms->max_cursor_width + x]);
}
/* clear the remainder for good measure */
for (; i < ms->max_cursor_width * ms->max_cursor_height; i++)
while (i < ms->max_cursor_width * ms->max_cursor_height)
ptr[i++] = 0;
if (drmmode_crtc->cursor_up)