summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-16 17:00:53 +0100
committerAdam Jackson <ajax@redhat.com>2016-07-06 13:51:25 -0400
commit15f8aaa786ac89509843f22dcb5f446effba1024 (patch)
tree02e907d57acf6c7fbff68f68a2d7fcb69e5959e4
parentee0fd6b2c68d88ef3511fe1796dd50601785ead0 (diff)
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> (cherry picked from commit 074cf58769b38550a3f35d5ecb73333330cb2aed)
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 35a372cdc..19f062baf 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -504,8 +504,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,