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 <stefan11111@shitposting.expert>
This commit is contained in:
stefan11111
2025-10-26 14:29:50 +02:00
committed by Enrico Weigelt
parent 7f7462cb14
commit cf4b49ac84

View File

@@ -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