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

Chauvet (kwizart) fedora-extras-commits at redhat.com
Wed Mar 5 21:41:12 UTC 2008


Author: kwizart

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

Modified Files:
	xorg-x11-drv-ivtv.spec xf86-video-ivtv-1.0.0-pciaccess.patch 
Log Message:
- Backport the libpciaccess support from pre 1.0.1



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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xorg-x11-drv-ivtv.spec	20 Feb 2008 00:08:33 -0000	1.3
+++ xorg-x11-drv-ivtv.spec	5 Mar 2008 21:40:38 -0000	1.4
@@ -1,12 +1,12 @@
 Name:           xorg-x11-drv-ivtv
-Version:        1.0.0
-Release:        3%{?dist}
+Version:        1.0.1
+Release:        0.1%{?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
+Source0:        http://dl.ivtvdriver.org/xf86-video-ivtv/archive/1.0.x/xf86-video-ivtv-1.0.0.tar.gz
 Patch0:         xf86-video-ivtv-1.0.0-pciaccess.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -14,13 +14,13 @@
 BuildRequires: libtool
 Requires:  xorg-x11-server-Xorg >= 1.3.0.0-6
 Requires:  ivtv-firmware
-Obsoletes: ivtv_xdriver
+Obsoletes: ivtv_xdriver < %{version}
 
 %description
 X.Org X11 ivtv video driver.
 
 %prep
-%setup -q -n xf86-video-ivtv-%{version}
+%setup -q -n xf86-video-ivtv-1.0.0
 %patch0 -p1 -b .pciaccess
 sh autogen.sh
 
@@ -34,6 +34,7 @@
 make install DESTDIR=$RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/ivtv_drv.la
 
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -41,10 +42,14 @@
 %files
 %defattr(-,root,root,-)
 %doc ChangeLog README
+%config(noreplace) %{_sysconfdir}/modprobe.d/ivtvfb
 %{_libdir}/xorg/modules/drivers/ivtv_drv.so
 
 
 %changelog
+* Wed Mar  5 2008 kwizart < kwizart at gmail.com > - 1.0.1-0.1
+- Backport the libpciaccess support from pre 1.0.1
+
 * Tue Feb 19 2008 kwizart < kwizart at gmail.com > - 1.0.0-3
 - Fix for libpciaccess support
 

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

Index: xf86-video-ivtv-1.0.0-pciaccess.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ivtv/devel/xf86-video-ivtv-1.0.0-pciaccess.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xf86-video-ivtv-1.0.0-pciaccess.patch	20 Feb 2008 00:08:33 -0000	1.1
+++ xf86-video-ivtv-1.0.0-pciaccess.patch	5 Mar 2008 21:40:38 -0000	1.2
@@ -1,28 +1,129 @@
-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
+diff -uNr xf86-video-ivtv-1.0.0/ChangeLog xf86-video-ivtv/ChangeLog
+--- xf86-video-ivtv-1.0.0/ChangeLog	2007-10-14 18:36:10.000000000 +0200
++++ xf86-video-ivtv/ChangeLog	2008-03-05 15:01:29.000000000 +0100
+@@ -1,3 +1,4 @@
++#1.0.1  - Add support for newer X org versions with libpciaccess
+ #1.0.0 	- Renamed to ivtv_drv and xf86-video-ivtv for consistency with X11R7
+ 	  naming convention.
+ 	- When the ivtv X driver is loaded, it ensures the osd/framebuffer is switched
+diff -uNr xf86-video-ivtv-1.0.0/config.h.in xf86-video-ivtv/config.h.in
+--- xf86-video-ivtv-1.0.0/config.h.in	2007-02-17 14:21:08.000000000 +0100
++++ xf86-video-ivtv/config.h.in	2008-03-05 15:01:29.000000000 +0100
+@@ -50,8 +50,20 @@
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+ 
++/* Major version of this package */
++#undef PACKAGE_VERSION_MAJOR
++
++/* Minor version of this package */
++#undef PACKAGE_VERSION_MINOR
++
++/* Patch version of this package */
++#undef PACKAGE_VERSION_PATCHLEVEL
++
+ /* Define to 1 if you have the ANSI C header files. */
+ #undef STDC_HEADERS
+ 
+ /* Version number of package */
+ #undef VERSION
++
++/* Update some functions to new X parameter list */
++#undef X_NEW_PARMS
+diff -uNr xf86-video-ivtv-1.0.0/configure.ac xf86-video-ivtv/configure.ac
+--- xf86-video-ivtv-1.0.0/configure.ac	2007-08-25 21:01:09.000000000 +0200
++++ xf86-video-ivtv/configure.ac	2008-03-05 15:01:29.000000000 +0100
+@@ -22,7 +22,7 @@
+ 
+ AC_PREREQ(2.57)
+ AC_INIT([xf86-video-ivtv],
+-        1.0.0,
++        1.0.1,
+         [http://ivtvdriver.org/trac],
+         xf86-video-ivtv)
+ 
+@@ -47,16 +47,30 @@
+             [moduledir="$withval"],
+             [moduledir="$libdir/xorg/modules"])
+ 
++PKG_CHECK_EXISTS([xorg-server >= 1.0.99.901],
++                  [AC_DEFINE(X_NEW_PARMS,1,[Update some functions to new X parameter list])])
++
+ # Checks for pkg-config packages
+-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
++PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
+ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+ 
  # 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.
++save_CFLAGS="$CFLAGS"
++CFLAGS="$XORG_CFLAGS"
++AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
++              [XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no],
++              [#include "xorg-server.h"])
++CFLAGS="$save_CFLAGS"
 +
- # 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
++if test "x$XSERVER_LIBPCIACCESS" = xyes; then
++    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
++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
+diff -uNr xf86-video-ivtv-1.0.0/src/ivtv.c xf86-video-ivtv/src/ivtv.c
+--- xf86-video-ivtv-1.0.0/src/ivtv.c	2007-10-12 09:12:46.000000000 +0200
++++ xf86-video-ivtv/src/ivtv.c	2008-03-05 15:01:28.000000000 +0100
+@@ -114,7 +114,7 @@
+ #define IVTVDEV_DRIVER_NAME	"ivtv"
+ #define IVTVDEV_VERSION_MAJOR	1
+ #define IVTVDEV_VERSION_MINOR	0
+-#define IVTVDEV_VERSION_PATCH	0
++#define IVTVDEV_VERSION_PATCH	1
+ #define IVTVDEV_VERSION	((IVTVDEV_VERSION_MAJOR << 16) | \
+ 			(IVTVDEV_VERSION_MINOR << 8) | \
+ 			(IVTVDEV_VERSION_PATCH))
+@@ -198,7 +198,7 @@
+ static void
+ IVTVshadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
+ {
+-#ifdef X_MODULAR
++#ifdef X_NEW_PARMS
+     RegionPtr damage = DamageRegion(pBuf->pDamage);
+ #else
+     RegionPtr damage = &pBuf->damage;
+@@ -330,9 +330,6 @@
+ 	    xf86MatchDevice(IVTVDEV_DRIVER_NAME, &devSections)) <= 0)
+ 	return FALSE;
+ 
+-    if (xf86GetPciVideoInfo() == NULL)
+-	return FALSE;
+-
+     numUsed = xf86MatchPciInstances(IVTVDEV_DRIVER_NAME,
+ 	PCI_HAUPPAUGE_VENDOR_ID,
+ 	IVTVChipsets,
+diff -uNr xf86-video-ivtv-1.0.0/src/ivtv_hw.c xf86-video-ivtv/src/ivtv_hw.c
+--- xf86-video-ivtv-1.0.0/src/ivtv_hw.c	2007-10-12 09:14:57.000000000 +0200
++++ xf86-video-ivtv/src/ivtv_hw.c	2008-03-05 15:01:28.000000000 +0100
+@@ -269,7 +269,13 @@
+ 		xf86DrvMsg(scrnIndex, X_ERROR,
+ 			"Unable to open yuv device '%s'\n", yuvDevFull);
+ 	    }
++	} else if (yuvFd == -1 && errno == EACCES) {
++		/* Device exists, but we weren't allowed to open it */
++		xf86DrvMsg(scrnIndex, X_ERROR,
++		    "Unable to open yuv device '%s'. "
++                    "Check device permissions.\n", yuvDevFull);
+ 	}
++
+ 	if (yuvFd == -1)
+ 		continue;
+ 
+@@ -350,7 +356,11 @@
  /* -------------------------------------------------------------------- */
  
  Bool
@@ -34,7 +135,7 @@
  {
      int fd;
      Bool retVal = TRUE;
-@@ -377,7 +381,11 @@ ivtvHWProbe(pciVideoPtr pPci, char *devi
+@@ -377,7 +387,11 @@
  }
  
  Bool
@@ -46,10 +147,10 @@
  {
      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
+diff -uNr xf86-video-ivtv-1.0.0/src/ivtv_hw.h xf86-video-ivtv/src/ivtv_hw.h
+--- xf86-video-ivtv-1.0.0/src/ivtv_hw.h	2007-08-28 10:37:51.000000000 +0200
++++ xf86-video-ivtv/src/ivtv_hw.h	2008-03-05 15:01:28.000000000 +0100
+@@ -44,6 +44,10 @@
  # include "xorgVersion.h"
  #endif
  
@@ -60,25 +161,17 @@
  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;
+@@ -90,17 +94,15 @@
+ # define IVTVDEVHW_BYTE_SWAP 1
+ #endif
  
+-/* FIXME - There must be a better way to do this..... */
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(7,0,0,0,0)
+-# define X_MODULAR 1
+-#elif XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,0,0,0,0)
+-# define X_MODULAR 1
+-#endif
+-
  Bool ivtvHWGetRec(ScrnInfoPtr pScrn);
  void ivtvHWFreeRec(ScrnInfoPtr pScrn);
 +#if XSERVER_LIBPCIACCESS
@@ -91,17 +184,40 @@
  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;
+diff -uNr xf86-video-ivtv-1.0.0/src/ivtv_xv.c xf86-video-ivtv/src/ivtv_xv.c
+--- xf86-video-ivtv-1.0.0/src/ivtv_xv.c	2007-08-28 10:37:51.000000000 +0200
++++ xf86-video-ivtv/src/ivtv_xv.c	2008-03-05 15:01:28.000000000 +0100
+@@ -66,7 +66,7 @@
+ static void IVTVQueryBestSize(ScrnInfoPtr, Bool, short, short, short, short,
+     unsigned int *, unsigned int *, pointer);
+ 
+-#ifdef X_MODULAR
++#ifdef X_NEW_PARMS
+ static int IVTVPutImage(ScrnInfoPtr, short, short, short, short, short,
+     short, short, short, int, unsigned char *, short,
+     short, Bool, RegionPtr, pointer, DrawablePtr);
+@@ -566,11 +566,12 @@
+ 		((sc_y & 15) << 4) + (blk_index & 15) + suv_offset;
+ 
+ 	    /* Copy v */
+-	    dst[dst_offset] = src[(width >> 1) * us_y + v_offset + us_x];
+-	    blk_index++;
++	    dst[dst_offset++] = src[(width >> 1) * us_y + v_offset + us_x];
++
+ 	    /* Copy u */
+ 	    dst[dst_offset] = src[(width >> 1) * us_y + u_offset + us_x];
+-	    blk_index++;
++
++	    blk_index+=2;
  
-+#ifndef XSERVER_LIBPCIACCESS
-     if (xf86GetPciVideoInfo() == NULL)
- 	return FALSE;
-+#endif
+ 	    if (xskip_count != xskip) {
+ 		/* Count towards the next horizontal skip */
+@@ -676,7 +677,7 @@
+     return (sc_x << 16) | sc_y;
+ }
  
-     numUsed = xf86MatchPciInstances(IVTVDEV_DRIVER_NAME,
- 	PCI_HAUPPAUGE_VENDOR_ID,
+-#ifdef X_MODULAR
++#ifdef X_NEW_PARMS
+ static int
+ IVTVPutImage(ScrnInfoPtr pScrn,
+     short src_x, short src_y,




More information about the fedora-extras-commits mailing list