On Wednesday 11 November 2009, Andy Walls wrote:
> On Wed, 2009-11-11 at 18:36 +0100, Andreas Baumann wrote:
> > Hi,
> >
> >
> > Reposting here from 'ivtv-users' (realizing that this is maybe the better
> > place):
> >
> >
> > As ARCH Linux is always bleeding edge things tend to break sometimes. :-)
> >
> > I "fixed" the 'xf86-video-ivtvfb' package in the AUR:
> >
> > http://aur.archlinux.org/packages.php?ID=23898
> >
> > I would be happy to get feedback from people who actually know how to
> > fix this issue properly. I'm not feeling very comfortable just removing
> > the RAC code from the module.
> 
> Andreas,
> 
> Well, I'm no expert on the ivtvfb driver for X, I can take a look at it.
> 
> However, right now I just tried to install Fedora 12 Beta in my machine
> with my PVR-350 so I could work on ivtvfb and kernel 2.6.3[01] problem
> reports, but the install just aborted on me.
> 
> I'll try and get to looking at it, but it could be a while.  Is there
> any Xorg documentation  or mailing list posts explaining the deprecation
> of the RAC calls and any possible replacement mechanism?

I was recently alerted to the problem with the ivtv X driver because of the 
Fedora 12 Beta release. There should be a new driver release shortly that 
fixes the problems with the new Xorg server.

For those that are interested, I've attached the patch, but you must run 
autogen.sh after applying it.

-- 
Ian
Index: configure.ac
===================================================================
--- configure.ac	(revision 146)
+++ configure.ac	(working copy)
@@ -54,6 +54,11 @@
 PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
+PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
+ HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
+ HAVE_XEXTPROTO_71="no")
+AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
+
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
Index: src/ivtv_hw.c
===================================================================
--- src/ivtv_hw.c	(revision 146)
+++ src/ivtv_hw.c	(working copy)
@@ -55,8 +55,12 @@
 #include "xf86cmap.h"
 
 #include "globals.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#ifdef HAVE_XEXTPROTO_71
+# include <X11/extensions/dpmsconst.h>
+#else
+# define DPMS_SERVER
+# include <X11/extensions/dpms.h>
+#endif
 
 #if IVTVDEBUG
 # define TRACE_ENTER(str)	ErrorF("ivtv_hw: " str " %d\n",pScrn->scrnIndex)
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 146)
+++ src/Makefile.am	(working copy)
@@ -23,7 +23,7 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XORG_CFLAGS@
+AM_CFLAGS = @XORG_CFLAGS@ @XEXT_CFLAGS@
 ivtv_drv_la_LTLIBRARIES = ivtv_drv.la
 ivtv_drv_la_LDFLAGS = -module -avoid-version
 ivtv_drv_ladir = @moduledir@/drivers
Index: src/ivtv.c
===================================================================
--- src/ivtv.c	(revision 146)
+++ src/ivtv.c	(working copy)
@@ -51,8 +51,10 @@
 /* for visuals */
 #include "fb.h"
 
-#include "xf86Resources.h"
-#include "xf86RAC.h"
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
+# include "xf86Resources.h"
+# include "xf86RAC.h"
+#endif
 
 #ifdef XvExtension
 # include "xf86xv.h"
@@ -112,12 +114,12 @@
 #define IVTVDEV_DRIVER_NAME	"ivtv"
 #define IVTVDEV_VERSION_MAJOR	1
 #define IVTVDEV_VERSION_MINOR	1
-#define IVTVDEV_VERSION_PATCH	0
+#define IVTVDEV_VERSION_PATCH	1
 #define IVTVDEV_VERSION	((IVTVDEV_VERSION_MAJOR << 16) | \
 			(IVTVDEV_VERSION_MINOR << 8) | \
 			(IVTVDEV_VERSION_PATCH))
 
-DriverRec IVTVDEV = {
+_X_EXPORT DriverRec IVTVDEV = {
     IVTVDEV_VERSION,
     IVTVDEV_DRIVER_NAME,
     IVTVDevIdentify,
@@ -175,7 +177,7 @@
     {0, 0, 0, 0}
 };
 
-XF86ModuleData ivtvModuleData = { &IVTVDevVersRec, IVTVDevSetup, NULL };
+_X_EXPORT XF86ModuleData ivtvModuleData = { &IVTVDevVersRec, IVTVDevSetup, NULL };
 
 pointer
 IVTVDevSetup(pointer module, pointer opts, int *errmaj, int *errmin)
@@ -185,7 +187,9 @@
     if (!setupDone) {
 	setupDone = TRUE;
 	xf86AddDriver(&IVTVDEV, module, 0);
+#ifndef HAVE_XEXTPROTO_71
 	LoaderRefSymLists(fbSymbols, shadowSymbols, NULL);
+#endif
 	return (pointer) 1;
     }
     if (errmaj)
@@ -403,6 +407,7 @@
 
     devPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
 
+#ifndef XSERVER_LIBPCIACCESS
     pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
     /* XXX Is this right?  Can probably remove RAC_FB */
     pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
@@ -413,6 +418,7 @@
 	    "DevPreInit: xf86RegisterResources() found resource conflicts\n");
 	return FALSE;
     }
+#endif
 
     /* open device */
     if (!ivtvHWInit(pScrn, NULL,
@@ -519,9 +525,12 @@
 	IVTVDevFreeRec(pScrn);
 	return FALSE;
     }
+
+#ifndef HAVE_XEXTPROTO_71
     if (mod && syms) {
 	xf86LoaderReqSymLists(syms, NULL);
     }
+#endif
 
     /* Load shadow */
     xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using \"Shadow Framebuffer\"\n");
@@ -529,7 +538,10 @@
 	IVTVDevFreeRec(pScrn);
 	return FALSE;
     }
+
+#ifndef HAVE_XEXTPROTO_71
     xf86LoaderReqSymLists(shadowSymbols, NULL);
+#endif
 
     TRACE_EXIT("PreInit");
     return TRUE;
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to