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 - [PATCH] Fix for KMSDRM driver where cursor would not be shown on some gfx hardware because of unsupported cursor size
Summary: [PATCH] Fix for KMSDRM driver where cursor would not be shown on some gfx har...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.7
Hardware: All Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-24 13:49 UTC by Manuel Alfayate Corchete
Modified: 2017-11-24 20:04 UTC (History)
0 users

See Also:


Attachments
Patch to try new cursor size if we get a size unsupported by the kernel-side gfx driver (5.57 KB, patch)
2017-11-24 13:49 UTC, Manuel Alfayate Corchete
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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