[xorg-x11-drv-qxl/f14/master] - Fix the driver not working on qxl devices with a framebuffer of 8MB

Hans de Goede jwrdegoede at fedoraproject.org
Sun Oct 10 14:26:46 UTC 2010


commit 24661cf14afa81f5f0c56f8cf0a33df0915362fd
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sun Oct 10 16:26:06 2010 +0200

    - Fix the driver not working on qxl devices with a framebuffer of 8MB

 ...lated-virtual-size-to-fit-within-the-fram.patch |   40 ++++++++++++++++++++
 xorg-x11-drv-qxl.spec                              |    7 +++-
 2 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/0006-limit-calculated-virtual-size-to-fit-within-the-fram.patch b/0006-limit-calculated-virtual-size-to-fit-within-the-fram.patch
new file mode 100644
index 0000000..a4e09cb
--- /dev/null
+++ b/0006-limit-calculated-virtual-size-to-fit-within-the-fram.patch
@@ -0,0 +1,40 @@
+From 597690d23b4deb519d6608731d4a7afce7327bba Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Sun, 10 Oct 2010 16:01:49 +0200
+Subject: [PATCH xf86-drv-qxl F14-branch 6/6] limit calculated virtual size to fit within the framebuffer
+
+When running inside a vm with a qxl device with a 8MB framebuffer the
+code, for automatically setting the virtualsize to the largest
+width and height seen in the resolution list, would lead to a too
+large virtual size. The 8MB list has both 1920x1080 and 1600x1200
+resolution which lead to a virtualsize of 1920x1200 which does not fit.
+---
+ src/qxl_driver.c |   11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/src/qxl_driver.c b/src/qxl_driver.c
+index e5d7c34..6d99430 100644
+--- a/src/qxl_driver.c
++++ b/src/qxl_driver.c
+@@ -1562,8 +1562,17 @@ qxl_pre_init(ScrnInfoPtr pScrn, int flags)
+         }
+ 
+     if (pScrn->display->virtualX == 0 && pScrn->display->virtualY == 0) {
++        /* It is possible for the largest x + largest y size combined leading
++           to a virtual size which will not fit into the framebuffer when this
++           happens we prefer max width and make height as large as possible */
++        if (max_x * max_y * (pScrn->bitsPerPixel / 8) >
++                qxl->rom->surface0_area_size)
++            pScrn->display->virtualY = qxl->rom->surface0_area_size /
++                                       (max_x * (pScrn->bitsPerPixel / 8));
++        else
++            pScrn->display->virtualY = max_y;
++
+     	pScrn->display->virtualX = max_x;
+-    	pScrn->display->virtualY = max_y;
+     }
+ 
+     if (0 >= xf86ValidateModes(pScrn, pScrn->monitor->Modes,
+-- 
+1.7.2.2
+
diff --git a/xorg-x11-drv-qxl.spec b/xorg-x11-drv-qxl.spec
index 87f71d9..5698608 100644
--- a/xorg-x11-drv-qxl.spec
+++ b/xorg-x11-drv-qxl.spec
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 qxl video driver
 Name:      xorg-x11-drv-qxl
 Version:   0.0.20.f14b
-Release:   3%{?dist}
+Release:   4%{?dist}
 URL:       http://www.x.org
 Source0:   http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2
 License: MIT
@@ -25,6 +25,7 @@ Patch2:  0002-Make-virtual-resolution-match-actual-resolution-on-s.patch
 Patch3:  0003-Change-default-virtual-size-to-match-the-highest-ava.patch
 Patch4:  0004-Fix-restoration-of-text-mode-font-when-leaving-the-v.patch
 Patch5:  0005-Slightly-tweak-the-vfresh-range-of-the-default-monit.patch
+Patch6:  0006-limit-calculated-virtual-size-to-fit-within-the-fram.patch
 
 
 %description 
@@ -38,6 +39,7 @@ X.Org X11 qxl video driver.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 %configure --disable-static
@@ -61,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT
 %{driverdir}/qxl_drv.so
 
 %changelog
+* Sun Oct 10 2010 Hans de Goede <hdegoede at redhat.com> 0.0.20.f14b-4
+- Fix the driver not working on qxl devices with a framebuffer of 8MB
+
 * Sat Oct  9 2010 Hans de Goede <hdegoede at redhat.com> 0.0.20.f14b-3
 - Add support for using resolutions > 1024x768 without needing an xorg.conf
 - Restore textmode font when switching back to a textmode virtual console


More information about the scm-commits mailing list