Skip to content

Commit f28eaa4

Browse files
committed
modesetting: make drmmode_get_smallest_supported_cursor return at least 64x64
If we initialize the hardware cursor image with a size smaller that 64x64, be get an incorrect cursor image. Signed-off-by: stefan11111 <[email protected]>
1 parent 30b09ed commit f28eaa4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hw/xfree86/drivers/video/modesetting/drmmode_display.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4834,7 +4834,8 @@ drmmode_get_smallest_supported_cursor(ScrnInfoPtr pScrn, uint32_t *owidth, uint3
48344834
{
48354835
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
48364836

4837-
drmmode_cursor_dim_rec max_size = {.width = 0, .height = 0};
4837+
/* We need the cursor image to be at least 64x64 */
4838+
drmmode_cursor_dim_rec max_size = {.width = 64, .height = 64};
48384839

48394840
for (int i = 0; i < xf86_config->num_crtc; i++) {
48404841
xf86CrtcPtr crtc = xf86_config->crtc[i];

0 commit comments

Comments
 (0)