[PATCH 2/4] modesetting: Fix the error check from DRM_IOCTL_MODE_CURSOR2
Takashi Iwai
tiwai at suse.de
Mon Feb 16 08:00:53 PST 2015
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 at suse.de>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 1ea799b3a244..25d16a233103 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -427,7 +427,7 @@ drmmode_set_cursor(xf86CrtcPtr crtc)
drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
handle, ms->cursor_width, ms->cursor_height,
cursor->bits->xhot, cursor->bits->yhot);
- if (ret == -EINVAL)
+ if (ret)
use_set_cursor2 = FALSE;
else
return;
--
2.3.0
More information about the xorg-devel
mailing list