From cf4b49ac8495aed3742b1c82651ee55a06f93d3a Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Sun, 26 Oct 2025 14:29:50 +0200 Subject: [PATCH] modesetting: Create the largest possible cursor image buffer. Since https://github.com/X11Libre/xserver/pull/1234 landed, the user has a way to set the hw cursor size to the size they want. The fallback probe works around driver bugs by probing very late, so it initializes the cursor image buffer with the largest size the driver supports. With this change, the SIZE_HINTS probe will also initialize the cursor image buffer with the largest size it finds, which is what @notbabaisyou 's code originally did. Signed-off-by: stefan11111 --- hw/xfree86/drivers/video/modesetting/drmmode_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/drivers/video/modesetting/drmmode_display.c b/hw/xfree86/drivers/video/modesetting/drmmode_display.c index 6f308088a..1d86f42f2 100644 --- a/hw/xfree86/drivers/video/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/video/modesetting/drmmode_display.c @@ -4899,9 +4899,9 @@ drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode) * something has gone terribly wrong. */ assert(cursor.num_dimensions); - /* Use the minimum available size. */ - width = cursor.dimensions[0].width; - height = cursor.dimensions[0].height; + /* Use the maximum available size. */ + width = cursor.dimensions[cursor.num_dimensions - 1].width; + height = cursor.dimensions[cursor.num_dimensions - 1].height; /* We take the minimum of the sizes here * so that we don't get a cursor glyph larger