We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3980

Summary: [PATCH] Fix for KMSDRM driver where cursor would not be shown on some gfx hardware because of unsupported cursor size
Product: SDL Reporter: Manuel Alfayate Corchete <redwindwanderer>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.7   
Hardware: All   
OS: Linux   
Attachments: Patch to try new cursor size if we get a size unsupported by the kernel-side gfx driver

Description Manuel Alfayate Corchete 2017-11-24 13:49:14 UTC
Created attachment 3100 [details]
Patch to try new cursor size if we get a size unsupported by the kernel-side gfx driver

Hi, 

This fixes a problem with KMSDRM on some graphics hardware where only bigger cursor sizes are supported, such as current Intel gfx. (The kernel-side driver is what limits this: had to look for failing IOCTLs...)
That caused SDL_SetCursor() to fail silently, and we were left with a missing cursor without further explanation.
With this patch, different "standard" sizes are tried and a bigger one is used (with an intermediate and clean buffer only used to write the new cursor to the BO where it will live after) if we get, let's say, 16x16 which is pretty common but our hardware does not support that.

This patch is NOT related to any of the WarpMouse problems on the Pi and KMSDRM drivers, but please merge it ASAP so I can find a definitive solution for these.
Comment 1 Sam Lantinga 2017-11-24 20:04:05 UTC
This patch is in, thanks!
https://hg.libsdl.org/SDL/rev/f10f06ee8207