mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
modesetting: Fix hang when all probed cursor sizes fail to find a minimum one
This fixes a hang on simpledrm where min_cursor_height and min_cursor_width is never established, and drmmode_load_cursor_argb_check would infinitely when the minimum values where 0 or less.
This commit is contained in:
@@ -4377,6 +4377,9 @@ static void drmmode_probe_cursor_size(xf86CrtcPtr crtc)
|
||||
drmmode_ptr drmmode = drmmode_crtc->drmmode;
|
||||
int width, height, size;
|
||||
|
||||
ms->min_cursor_width = ms->max_cursor_width;
|
||||
ms->min_cursor_height = ms->max_cursor_height;
|
||||
|
||||
/* probe square min first */
|
||||
for (size = 1; size <= ms->max_cursor_width &&
|
||||
size <= ms->max_cursor_height; size *= 2) {
|
||||
|
||||
Reference in New Issue
Block a user