[xorg-x11-drv-cirrus] cirrus-1.3.2-virt-16bpp.patch: Default to 16bpp in virt
Adam Jackson
ajax at fedoraproject.org
Mon Apr 2 20:35:11 UTC 2012
commit c228c7863ba2d504e504d2da91afeded560d1e35
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Apr 2 16:35:08 2012 -0400
cirrus-1.3.2-virt-16bpp.patch: Default to 16bpp in virt
cirrus-1.3.2-virt-16bpp.patch | 31 +++++++++++++++++++++++++++++++
xorg-x11-drv-cirrus.spec | 7 ++++++-
2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/cirrus-1.3.2-virt-16bpp.patch b/cirrus-1.3.2-virt-16bpp.patch
new file mode 100644
index 0000000..11ea3e5
--- /dev/null
+++ b/cirrus-1.3.2-virt-16bpp.patch
@@ -0,0 +1,31 @@
+diff -up xf86-video-cirrus-1.3.2/src/alp_driver.c.jx xf86-video-cirrus-1.3.2/src/alp_driver.c
+--- xf86-video-cirrus-1.3.2/src/alp_driver.c.jx 2012-04-02 16:30:29.000000000 -0400
++++ xf86-video-cirrus-1.3.2/src/alp_driver.c 2012-04-02 16:33:11.668580522 -0400
+@@ -476,6 +476,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
+ vgaHWPtr hwp;
+ MessageType from, from1;
+ int i;
++ int defaultdepth;
+ int depth_flags;
+ ClockRangePtr clockRanges;
+ char *s;
+@@ -557,11 +558,18 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
+ depth_flags |= Support32bppFb |
+ SupportConvert32to24 |
+ PreferConvert32to24;
++
++ /* use 16bpp in virt */
++ if ((pCir->PciInfo->subvendor_id & 0xffff) == 0x1af4)
++ defaultdepth = 16;
++ else
++ defaultdepth = 24;
++
+ /*
+ * The first thing we should figure out is the depth, bpp, etc.
+ * We support both 24bpp and 32bpp layouts, so indicate that.
+ */
+- if (!xf86SetDepthBpp(pScrn, 0, 0, 24, depth_flags)) {
++ if (!xf86SetDepthBpp(pScrn, 0, 0, defaultdepth, depth_flags)) {
+ return FALSE;
+ } else {
+ /* Check that the returned depth is one we support */
diff --git a/xorg-x11-drv-cirrus.spec b/xorg-x11-drv-cirrus.spec
index 42eed1c..d74fab6 100644
--- a/xorg-x11-drv-cirrus.spec
+++ b/xorg-x11-drv-cirrus.spec
@@ -5,7 +5,7 @@
Summary: Xorg X11 cirrus video driver
Name: xorg-x11-drv-cirrus
Version: 1.3.2
-Release: 18%{?dist}
+Release: 19%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -17,6 +17,7 @@ Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
Patch0: cirrus-1.2.0-qemu.patch
Patch1: cirrus-1.3.2-git.patch
Patch2: cirrus-1.3.2-vgahw.patch
+Patch3: cirrus-1.3.2-virt-16bpp.patch
BuildRequires: xorg-x11-server-sdk >= 1.10.99.902
BuildRequires: xorg-x11-util-macros >= 1.1.5
@@ -32,6 +33,7 @@ X.Org X11 cirrus video driver.
%patch0 -p1 -b .qemu
%patch1 -p1 -b .git
%patch2 -p1 -b .vgahw
+%patch3 -p1 -b .16bpp
%build
%configure --disable-static
@@ -57,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man4/cirrus.4*
%changelog
+* Mon Apr 02 2012 Adam Jackson <ajax at redhat.com> 1.3.2-19
+- cirrus-1.3.2-virt-16bpp.patch: Default to 16bpp in virt
+
* Sat Feb 11 2012 Peter Hutterer <peter.hutterer at redhat.com> - 1.3.2-18
- ABI rebuild
More information about the scm-commits
mailing list