diff --git a/0001-qxl-fix-broken-cursor-hotspot-on-KMS-driver.patch b/0001-qxl-fix-broken-cursor-hotspot-on-KMS-driver.patch new file mode 100644 index 0000000..803a794 --- /dev/null +++ b/0001-qxl-fix-broken-cursor-hotspot-on-KMS-driver.patch @@ -0,0 +1,62 @@ +From 3bbb836798b7c16c5eae693a2017244d59e92f8b Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Wed, 3 Jul 2013 15:28:10 +1000 +Subject: [PATCH] qxl: fix broken cursor hotspot on KMS driver + +bugzilla: http://bugzilla.redhat.com/974662 + +Signed-off-by: Dave Airlie +--- + configure.ac | 3 ++- + src/qxl_drmmode.c | 14 +++++++++++++- + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8b2d450..81b7ad7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -78,7 +78,8 @@ CFLAGS="$save_CFLAGS" + + # Checks for libraries. + if test "x$QXL_DRM" = xyes; then +- PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.42]) ++ # require support for kms cursor hotspot ++ PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.46]) + + AC_ARG_ENABLE(kms, + AS_HELP_STRING([--disable-kms], +diff --git a/src/qxl_drmmode.c b/src/qxl_drmmode.c +index 03b4124..5fe056c 100644 +--- a/src/qxl_drmmode.c ++++ b/src/qxl_drmmode.c +@@ -43,6 +43,7 @@ + #define DPMS_SERVER + #include + #endif ++#include + + #include "qxl.h" + #include "qxl_surface.h" +@@ -271,7 +272,18 @@ drmmode_show_cursor (xf86CrtcPtr crtc) + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + drmmode_ptr drmmode = drmmode_crtc->drmmode; + uint32_t handle = qxl_kms_bo_get_handle(drmmode_crtc->cursor_bo); +- ++ static Bool use_set_cursor2 = TRUE; ++ ++ if (use_set_cursor2) { ++ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); ++ CursorPtr cursor = xf86_config->cursor; ++ int ret; ++ ret = drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle, 64, 64, cursor->bits->xhot, cursor->bits->yhot); ++ if (ret == -ENOSYS) ++ use_set_cursor2 = FALSE; ++ else ++ return; ++ } + drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle, 64, 64); + } + +-- +1.8.3.1 + diff --git a/xorg-x11-drv-qxl.spec b/xorg-x11-drv-qxl.spec index 3f3e89f..666f793 100644 --- a/xorg-x11-drv-qxl.spec +++ b/xorg-x11-drv-qxl.spec @@ -22,7 +22,7 @@ Name: xorg-x11-drv-qxl Version: 0.1.1 -Release: 0.12%{?gver}%{?dist} +Release: 0.13%{?gver}%{?dist} URL: http://www.x.org #Source0: http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2 @@ -32,6 +32,7 @@ Patch1: qxl-fix-32-bit.patch Patch5: qxl-kms-disable-composite.patch Patch6: 0001-qxl-fix-issue-with-resizing-dev_image-improperly.patch Patch7: 0001-qxl-add-uevent-handler-support.patch +Patch8: 0001-qxl-fix-broken-cursor-hotspot-on-KMS-driver.patch Patch20: 0002-Add-old-driver-in-as-a-compatibility-layer.patch Patch21: 0003-Link-in-the-compat-driver-various-renamings.patch Patch22: 0004-compat-bump-to-new-server-API-changes.patch @@ -44,7 +45,7 @@ ExcludeArch: s390 s390x BuildRequires: pkgconfig BuildRequires: xorg-x11-server-devel >= 1.1.0-1 BuildRequires: spice-protocol >= 0.12.1 -BuildRequires: libdrm-devel >= 2.4.42-2 +BuildRequires: libdrm-devel >= 2.4.46-1 %ifarch x86_64 BuildRequires: spice-server-devel >= 0.8.0 @@ -78,6 +79,7 @@ XSpice is both an X and a Spice server. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 @@ -128,6 +130,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/X11/spiceqxl.xorg.conf %changelog +* Wed Jul 03 2013 Dave Airlie 0.1.1-0.13 +- add userspace patch to use new kernel hotspot interface (#974662) + * Wed Jul 03 2013 Dave Airlie 0.1.1-0.12 - add support for udev event catching - for dynamic resize from kernel