[xorg-x11-drv-qxl/f20] add hack to defeat the streamer with gnome-shell (#1020393)
Dave Airlie
airlied at fedoraproject.org
Tue Nov 26 22:16:33 UTC 2013
commit f63d57a66e45dbbc9636ec89324e81bf3a717128
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Nov 27 08:04:06 2013 +1000
add hack to defeat the streamer with gnome-shell (#1020393)
0001-worst-hack-of-all-time-to-qxl-driver.patch | 60 +++++++++++++++++++++++
xorg-x11-drv-qxl.spec | 9 +++-
2 files changed, 68 insertions(+), 1 deletions(-)
---
diff --git a/0001-worst-hack-of-all-time-to-qxl-driver.patch b/0001-worst-hack-of-all-time-to-qxl-driver.patch
new file mode 100644
index 0000000..153cdbb
--- /dev/null
+++ b/0001-worst-hack-of-all-time-to-qxl-driver.patch
@@ -0,0 +1,60 @@
+From a22cf06968d0bbeea4784fa3bf69628a9cbf1397 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at redhat.com>
+Date: Tue, 26 Nov 2013 10:45:26 +1000
+Subject: [PATCH] worst hack of all time to qxl driver
+
+---
+ src/qxl_surface.c | 30 ++++++++++++++++++++++++++++--
+ 1 file changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/src/qxl_surface.c b/src/qxl_surface.c
+index 1075eae..561b416 100644
+--- a/src/qxl_surface.c
++++ b/src/qxl_surface.c
+@@ -759,8 +759,9 @@ qxl_surface_composite (qxl_surface_t *dest,
+ qxl->bo_funcs->bo_decref(qxl, derefs[i]);
+ }
+
+-Bool
+-qxl_surface_put_image (qxl_surface_t *dest,
++
++static Bool
++qxl_surface_put_image_for_reals (qxl_surface_t *dest,
+ int x, int y, int width, int height,
+ const char *src, int src_pitch)
+ {
+@@ -803,6 +804,31 @@ qxl_surface_put_image (qxl_surface_t *dest,
+ return TRUE;
+ }
+
++#define HACK_THE_PLANET 1
++Bool
++qxl_surface_put_image (qxl_surface_t *dest,
++ int x, int y, int width, int height,
++ const char *src, int src_pitch)
++{
++#ifdef HACK_THE_PLANET
++ Bool use_hack = FALSE;
++
++ /* worst heuristic ever - should really block the gnome-shell issue for now */
++ if (width == pixman_image_get_width(dest->host_image) && height < pixman_image_get_height(dest->host_image))
++ use_hack = TRUE;
++
++ if (use_hack) {
++ int gross = rand() % height;
++ int h2 = height - gross;
++ if (gross > 0)
++ qxl_surface_put_image_for_reals(dest, x, y, width, gross, src, src_pitch);
++ qxl_surface_put_image_for_reals(dest, x, y + gross, width, h2, src + (gross * src_pitch), src_pitch);
++ return TRUE;
++ } else
++#endif
++ return qxl_surface_put_image_for_reals(dest, x, y, width, height, src, src_pitch);
++}
++
+ void
+ qxl_get_formats (int bpp, SpiceSurfaceFmt *format, pixman_format_code_t *pformat)
+ {
+--
+1.8.4.2
+
diff --git a/xorg-x11-drv-qxl.spec b/xorg-x11-drv-qxl.spec
index 83c221d..18fee45 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: 2%{?gver}%{?dist}
+Release: 3%{?gver}%{?dist}
URL: http://www.x.org
Source0: http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2
@@ -35,6 +35,9 @@ Patch2: 0005-spiceqxl_display-only-use-qxl-interface-after-it-is-.patch
# fix a blocker in F20 the quick way.
Patch3: no-surfaces-kms.patch
+# does what it says on the tin (#1020393)
+Patch4: 0001-worst-hack-of-all-time-to-qxl-driver.patch
+
# Fixes for running with Xorg suid, which is the only way we ship in fedora
Patch6: 0006-spiceqxl_spice_server-no-need-to-call-spice_server_s.patch
Patch7: 0007-xspice-chown-both-files-used-by-vdagent-for-suid-Xor.patch
@@ -88,6 +91,7 @@ XSpice is both an X and a Spice server.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
@@ -143,6 +147,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/X11/spiceqxl.xorg.conf
%changelog
+* Wed Nov 27 2013 Dave Airlie <airlied at redhat.com> 0.1.1-3
+- add hack to defeat the streamer with gnome-shell (#1020393)
+
* Fri Nov 08 2013 Dave Airlie <airlied at redhat.com> 0.1.1-2
- possibly fix F20 blocker with oops in the kernel (#1027831)
More information about the scm-commits
mailing list