add packaging
authorAnas Nashif <anas.nashif@intel.com>
Wed, 7 Nov 2012 05:15:57 +0000 (21:15 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Wed, 7 Nov 2012 05:15:57 +0000 (21:15 -0800)
packaging/u_cirrus-qemu.patch [new file with mode: 0644]
packaging/u_cirrus-virt-16bpp.patch [new file with mode: 0644]
packaging/xf86-video-cirrus.spec [new file with mode: 0644]

diff --git a/packaging/u_cirrus-qemu.patch b/packaging/u_cirrus-qemu.patch
new file mode 100644 (file)
index 0000000..906937b
--- /dev/null
@@ -0,0 +1,16 @@
+--- xf86-video-cirrus-1.5.1/src/alp_driver.c.orig      2012-09-14 14:02:24.477314000 +0200
++++ xf86-video-cirrus-1.5.1/src/alp_driver.c   2012-09-14 14:02:28.610956000 +0200
+@@ -775,6 +775,13 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
+      else
+       xf86SetDDCproperties(pScrn,xf86PrintEDID(
+                xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn),pCir->I2CPtr1)));
++
++#ifdef XSERVER_LIBPCIACCESS
++     if (!pScrn->monitor->DDC &&
++      ((pCir->PciInfo->subvendor_id & 0xffff) == 0x1af4)) {
++      pCir->NoAccel = TRUE;
++     }
++#endif
+  
+      /* Probe the possible LCD display */
+      AlpProbeLCD(pScrn);
diff --git a/packaging/u_cirrus-virt-16bpp.patch b/packaging/u_cirrus-virt-16bpp.patch
new file mode 100644 (file)
index 0000000..11ea3e5
--- /dev/null
@@ -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/packaging/xf86-video-cirrus.spec b/packaging/xf86-video-cirrus.spec
new file mode 100644 (file)
index 0000000..8a6e57a
--- /dev/null
@@ -0,0 +1,63 @@
+Name:           xf86-video-cirrus
+Version:        1.5.1
+Release:        0
+License:        MIT
+Summary:        Cirrus Logic video driver for the Xorg X server
+Url:            http://xorg.freedesktop.org/
+Group:          System/X11/Servers/XF86_4
+Source0:        http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2
+# PATCH-FIX-UPSTREAM cirrus-1.2.0-qemu.patch fcrozat@suse.com -- Avoid 10x7 heuristic, handled by server (Fedora)
+Patch0:         u_cirrus-qemu.patch
+# PATCH-FIX-UPSTREAM cirrus-1.3.2-virt-16bpp.patch fcrozat@suse.com -- Use 16bpp when running in virt (Fedora)
+Patch1:         u_cirrus-virt-16bpp.patch
+
+BuildRequires:  pkg-config
+BuildRequires:  pkgconfig(fontsproto)
+BuildRequires:  pkgconfig(pciaccess) >= 0.8.0
+BuildRequires:  pkgconfig(randrproto)
+BuildRequires:  pkgconfig(renderproto)
+BuildRequires:  pkgconfig(resourceproto)
+BuildRequires:  pkgconfig(videoproto)
+BuildRequires:  pkgconfig(xextproto)
+BuildRequires:  pkgconfig(xorg-macros) >= 1.2
+BuildRequires:  pkgconfig(xorg-server) >= 1.4
+BuildRequires:  pkgconfig(xproto)
+Supplements:    modalias(xorg-server:pci:v00001013d00000038sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000A0sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000A4sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000A8sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000ACsv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000B8sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000BCsv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000D0sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000D4sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d000000D6sv*sd*bc*sc*i*)
+Supplements:    modalias(xorg-server:pci:v00001013d00001202sv*sd*bc*sc*i*)
+# This was part of the xorg-x11-driver-video package up to version 7.6
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+
+%description
+cirrus is an Xorg driver for Cirrus Logic video cards.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+%files
+%defattr(-,root,root)
+%doc COPYING
+%dir %{_libdir}/xorg/modules/drivers
+%{_libdir}/xorg/modules/drivers/cirrus_alpine.so
+%{_libdir}/xorg/modules/drivers/cirrus_laguna.so
+%{_libdir}/xorg/modules/drivers/cirrus_drv.so
+%{_mandir}/man4/cirrus.4%{?ext_man}
+
+%changelog