From 56c41c9e820b36773abcddda7e95ea445738e1c9 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: May 02 2015 06:22:26 +0000 Subject: modesetting: Fix software cursor fallback (#1205725) --- diff --git a/0001-modesetting-Fix-software-cursor-fallback.patch b/0001-modesetting-Fix-software-cursor-fallback.patch new file mode 100644 index 0000000..ffb0875 --- /dev/null +++ b/0001-modesetting-Fix-software-cursor-fallback.patch @@ -0,0 +1,42 @@ +From 63e4f22d5fe3d4247cb48c969b5f7f2690665d78 Mon Sep 17 00:00:00 2001 +From: Adel Gadllah +Date: Fri, 1 May 2015 17:21:12 +0200 +Subject: [PATCH] modesetting: Fix software cursor fallback +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The code in drmmode_set_cursor does not properly handle the case where +drmModeSetCursor2 returns any other error than EINVAL and silently fails to set +a cursor. + +So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable +the cursor2 usage on EINVAL. + +References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725 +Signed-off-by: Adel Gadllah +Reviewed-by: Michel Dänzer +--- + hw/xfree86/drivers/modesetting/drmmode_display.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c +index 824500b..912abda 100644 +--- a/hw/xfree86/drivers/modesetting/drmmode_display.c ++++ b/hw/xfree86/drivers/modesetting/drmmode_display.c +@@ -396,10 +396,10 @@ 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) ++ return; + if (ret == -EINVAL) + use_set_cursor2 = FALSE; +- else +- return; + } + + ret = drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle, +-- +2.1.0 + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 2de4c9e..e28b3a6 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -45,7 +45,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.17.1 -Release: 10%{?gitdate:.%{gitdate}}%{dist} +Release: 11%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -116,6 +116,9 @@ Patch10003: 0001-include-Fix-endianness-setup.patch Patch10004: 0001-linux-Add-linux_get_vtno-and-linux_get_keeptty-helpe.patch Patch10005: 0002-systemd-logind-Only-use-systemd-logind-integration-t.patch +# rhbz1205725, submitted upstream +Patch10006: 0001-modesetting-Fix-software-cursor-fallback.patch + %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri %global sdkdir %{_includedir}/xorg @@ -649,6 +652,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Sat May 02 2015 Adel Gadllah - 1.17.1-11 +- modesetting: Fix software cursor fallback (#1205725) + * Thu Apr 30 2015 Hans de Goede - 1.17.1-10 - Fix "start -- vt7" not working (#1203780)