rpms/xorg-x11-drv-ivtv/devel xf86-video-ivtv-1.0.0-pciaccess.patch, NONE, 1.1 xorg-x11-drv-ivtv.spec, 1.2, 1.3

Chauvet (kwizart) fedora-extras-commits at redhat.com
Wed Feb 20 00:09:10 UTC 2008


Author: kwizart

Update of /cvs/pkgs/rpms/xorg-x11-drv-ivtv/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11118

Modified Files:
	xorg-x11-drv-ivtv.spec 
Added Files:
	xf86-video-ivtv-1.0.0-pciaccess.patch 
Log Message:
- Fix for libpciaccess support


xf86-video-ivtv-1.0.0-pciaccess.patch:

--- NEW FILE xf86-video-ivtv-1.0.0-pciaccess.patch ---
diff -up xf86-video-ivtv-1.0.0/configure.ac.pciaccess xf86-video-ivtv-1.0.0/configure.ac
--- xf86-video-ivtv-1.0.0/configure.ac.pciaccess	2008-02-19 22:40:07.000000000 +0100
+++ xf86-video-ivtv-1.0.0/configure.ac	2008-02-19 23:34:25.000000000 +0100
@@ -54,9 +54,17 @@ sdkdir=$(pkg-config --variable=sdkdir xo
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+XORG_DRIVER_CHECK_EXT(XSERVER_LIBPCIACCESS, pciaccess)
 XORG_DRIVER_CHECK_EXT(XV, videoproto)
 
+
 # Checks for libraries.
+#if test x$XSERVER_LIBPCIACCESS = xyes; then
+           PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+           XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
+#fi
+AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
 
 # Checks for header files.
 AC_HEADER_STDC
diff -up xf86-video-ivtv-1.0.0/src/ivtv_hw.c.pciaccess xf86-video-ivtv-1.0.0/src/ivtv_hw.c
--- xf86-video-ivtv-1.0.0/src/ivtv_hw.c.pciaccess	2008-02-20 00:08:40.000000000 +0100
+++ xf86-video-ivtv-1.0.0/src/ivtv_hw.c	2008-02-20 00:10:45.000000000 +0100
@@ -350,7 +350,11 @@ ivtv_open(int scrnIndex, char *dev, char
 /* -------------------------------------------------------------------- */
 
 Bool
+#if XSERVER_LIBPCIACCESS
+ivtvHWProbe(struct pci_device *PciInfo, char *device, char **namep)
+#else
 ivtvHWProbe(pciVideoPtr pPci, char *device, char **namep)
+#endif
 {
     int fd;
     Bool retVal = TRUE;
@@ -377,7 +381,11 @@ ivtvHWProbe(pciVideoPtr pPci, char *devi
 }
 
 Bool
+#if XSERVER_LIBPCIACCESS
+ivtvHWInit(ScrnInfoPtr pScrn, struct pci_device *PciInfo, char *device)
+#else
 ivtvHWInit(ScrnInfoPtr pScrn, pciVideoPtr pPci, char *device)
+#endif
 {
     ivtvHWPtr hwPtr;
 
diff -up xf86-video-ivtv-1.0.0/src/ivtv_hw.h.pciaccess xf86-video-ivtv-1.0.0/src/ivtv_hw.h
--- xf86-video-ivtv-1.0.0/src/ivtv_hw.h.pciaccess	2008-02-19 23:37:53.000000000 +0100
+++ xf86-video-ivtv-1.0.0/src/ivtv_hw.h	2008-02-20 00:06:45.000000000 +0100
@@ -44,6 +44,10 @@ in this Software without prior written a
 # include "xorgVersion.h"
 #endif
 
+#ifdef XSERVER_LIBPCIACCESS
+#include <pciaccess.h>
+#endif
+
 typedef struct
 {
     /* framebuffer device: filename (/dev/fb*), handle, more */
@@ -77,6 +81,16 @@ typedef struct
 
     /* buildin video mode */
     DisplayModeRec buildin;
+
+#if XSERVER_LIBPCIACCESS
+    struct pci_device *PciInfo;
+    int mmio_bar;
+    int fb_bar;
+    int gtt_bar;
+//#else
+//  pciVideoPtr PciInfo;
+//  PCITAG PciTag;
+#endif
 } ivtvHWRec, *ivtvHWPtr;
 
 extern int ivtvHWPrivateIndex;
@@ -99,8 +113,13 @@ extern int ivtvHWPrivateIndex;
 
 Bool ivtvHWGetRec(ScrnInfoPtr pScrn);
 void ivtvHWFreeRec(ScrnInfoPtr pScrn);
+#if XSERVER_LIBPCIACCESS
+Bool ivtvHWProbe(struct pci_device *PciInfo, char *device, char **namep);
+Bool ivtvHWInit(ScrnInfoPtr pScrn, struct pci_device *PciInfo, char *device);
+#else
 Bool ivtvHWProbe(pciVideoPtr pPci, char *device, char **namep);
 Bool ivtvHWInit(ScrnInfoPtr pScrn, pciVideoPtr pPci, char *device);
+#endif
 char *ivtvHWGetName(ScrnInfoPtr pScrn);
 int ivtvHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp);
 int ivtvHWGetLineLength(ScrnInfoPtr pScrn);
diff -up xf86-video-ivtv-1.0.0/src/ivtv.c.pciaccess xf86-video-ivtv-1.0.0/src/ivtv.c
--- xf86-video-ivtv-1.0.0/src/ivtv.c.pciaccess	2008-02-20 00:11:36.000000000 +0100
+++ xf86-video-ivtv-1.0.0/src/ivtv.c	2008-02-20 00:19:40.000000000 +0100
@@ -330,8 +330,10 @@ IVTVDevProbe(DriverPtr drv, int flags)
 	    xf86MatchDevice(IVTVDEV_DRIVER_NAME, &devSections)) <= 0)
 	return FALSE;
 
+#ifndef XSERVER_LIBPCIACCESS
     if (xf86GetPciVideoInfo() == NULL)
 	return FALSE;
+#endif
 
     numUsed = xf86MatchPciInstances(IVTVDEV_DRIVER_NAME,
 	PCI_HAUPPAUGE_VENDOR_ID,


Index: xorg-x11-drv-ivtv.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ivtv/devel/xorg-x11-drv-ivtv.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xorg-x11-drv-ivtv.spec	19 Feb 2008 21:12:34 -0000	1.2
+++ xorg-x11-drv-ivtv.spec	20 Feb 2008 00:08:33 -0000	1.3
@@ -1,15 +1,17 @@
 Name:           xorg-x11-drv-ivtv
 Version:        1.0.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Xorg X11 ivtv video driver
 
 Group:          User Interface/X Hardware Support
 License:        MIT
 URL:            http://ivtvdriver.org
 Source0:        http://dl.ivtvdriver.org/xf86-video-ivtv/archive/1.0.x/xf86-video-ivtv-%{version}.tar.gz
+Patch0:         xf86-video-ivtv-1.0.0-pciaccess.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: xorg-x11-server-sdk >= 1.3.0.0-6
+BuildRequires: libtool
 Requires:  xorg-x11-server-Xorg >= 1.3.0.0-6
 Requires:  ivtv-firmware
 Obsoletes: ivtv_xdriver
@@ -19,7 +21,8 @@
 
 %prep
 %setup -q -n xf86-video-ivtv-%{version}
-
+%patch0 -p1 -b .pciaccess
+sh autogen.sh
 
 %build
 %configure
@@ -42,6 +45,9 @@
 
 
 %changelog
+* Tue Feb 19 2008 kwizart < kwizart at gmail.com > - 1.0.0-3
+- Fix for libpciaccess support
+
 * Mon Feb 18 2008 kwizart < kwizart at gmail.com > - 1.0.0-2
 - Bump for Fedora introduction.
 




More information about the fedora-extras-commits mailing list