modesetting: Fix the error check from DRM_IOCTL_MODE_CURSOR2
The error value isn't always -EINVAL, e.g. the kernel drm core returns -ENXIO when the corresponding ops doesn't exist. Without this fix, DRM_IOCTL_MODE_CURSOR2 would be dealt as success even if it shouldn't. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
3762edded8
commit
074cf58769
|
@ -798,8 +798,8 @@ drmmode_set_cursor(xf86CrtcPtr crtc)
|
|||
cursor->bits->xhot, cursor->bits->yhot);
|
||||
if (!ret)
|
||||
return;
|
||||
if (ret == -EINVAL)
|
||||
use_set_cursor2 = FALSE;
|
||||
|
||||
use_set_cursor2 = FALSE;
|
||||
}
|
||||
|
||||
ret = drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,
|
||||
|
|
Loading…
Reference in New Issue
Block a user