[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force X.Org X11 SVN commit: r3903 - in trunk/driver/xserver-xorg-video-ivtvdev/debian: . patches



Author: ijc
Date: 2006-10-24 15:57:47 -0400 (Tue, 24 Oct 2006)
New Revision: 3903

Modified:
   trunk/driver/xserver-xorg-video-ivtvdev/debian/changelog
   trunk/driver/xserver-xorg-video-ivtvdev/debian/patches/00_xorg_7_1
Log:
Update Xorg 7.1 patch to a working state.


Modified: trunk/driver/xserver-xorg-video-ivtvdev/debian/changelog
===================================================================
--- trunk/driver/xserver-xorg-video-ivtvdev/debian/changelog	2006-10-24 14:45:18 UTC (rev 3902)
+++ trunk/driver/xserver-xorg-video-ivtvdev/debian/changelog	2006-10-24 19:57:47 UTC (rev 3903)
@@ -1,4 +1,4 @@
-xserver-xorg-video-ivtvdev (0.10.6-1~unreleased) UNRELEASED; urgency=low
+xserver-xorg-video-ivtvdev (0.10.6-1~unreleased.1) UNRELEASED; urgency=low
 
   * First xserver-xorg-driver-ivtv release. (Closes: #380174)
 

Modified: trunk/driver/xserver-xorg-video-ivtvdev/debian/patches/00_xorg_7_1
===================================================================
--- trunk/driver/xserver-xorg-video-ivtvdev/debian/patches/00_xorg_7_1	2006-10-24 14:45:18 UTC (rev 3902)
+++ trunk/driver/xserver-xorg-video-ivtvdev/debian/patches/00_xorg_7_1	2006-10-24 19:57:47 UTC (rev 3903)
@@ -1,7 +1,7 @@
 Index: xserver-xorg-video-ivtvdev/src/ivtvdev.c
 ===================================================================
---- xserver-xorg-video-ivtvdev.orig/src/ivtvdev.c	2006-10-04 06:51:59.000000000 +0100
-+++ xserver-xorg-video-ivtvdev/src/ivtvdev.c	2006-10-04 21:53:57.000000000 +0100
+--- xserver-xorg-video-ivtvdev.orig/src/ivtvdev.c	2006-10-04 21:55:19.000000000 +0100
++++ xserver-xorg-video-ivtvdev/src/ivtvdev.c	2006-10-24 20:44:28.000000000 +0100
 @@ -5,13 +5,14 @@
   *	     Michel D�er, <michdaen@iiic.ethz.ch>
   */
@@ -18,16 +18,15 @@
  
  #include "mipointer.h"
  #include "mibstore.h"
-@@ -47,7 +48,7 @@
- 	{-1, -1, RES_UNDEFINED}
- };
+@@ -19,6 +20,7 @@
+ #include "colormapst.h"
+ #include "xf86cmap.h"
+ #include "shadow.h"
++#include "shadowfb.h"
  
--#define DEBUG 0
-+#define DEBUG 1
- 
- #if DEBUG
- # define TRACE_ENTER(str)       ErrorF("ivtv: " str " %d\n",pScrn->scrnIndex)
-@@ -78,14 +79,14 @@
+ /* for visuals */
+ #include "fb.h"
+@@ -78,14 +80,14 @@
   */
  static int pix24bpp = 0;
  
@@ -44,7 +43,31 @@
  	IVTVDEV_DRIVER_NAME,
  #if 0
  	"driver for linux framebuffer devices",
-@@ -134,7 +135,7 @@
+@@ -109,6 +111,11 @@
+ 
+ /* -------------------------------------------------------------------- */
+ 
++const char *IVTVDevshadowFBSymbols[] = {
++    "ShadowFBInit",
++    NULL
++};
++
+ static const char *fbSymbols[] = {
+ 	"fbScreenInit",
+ 	"fbPictureInit",
+@@ -117,11 +124,8 @@
+ 
+ static const char *shadowSymbols[] = {
+ 	"shadowAdd",
+-	"shadowAlloc",
+ 	"shadowInit",
+ 	"shadowSetup",
+-	"shadowUpdatePacked",
+-	"shadowUpdateRotatePacked",
+ 	NULL
+ };
+ 
+@@ -134,11 +138,11 @@
  	MODULEVENDORSTRING,
  	MODINFOSTRING1,
  	MODINFOSTRING2,
@@ -53,16 +76,52 @@
  	IVTVDEV_MAJOR_VERSION, IVTVDEV_MINOR_VERSION, 6,
  	ABI_CLASS_VIDEODRV,
  	ABI_VIDEODRV_VERSION,
-@@ -169,6 +170,8 @@
- 	int nbox = REGION_NUM_RECTS(damage);
- 	BoxPtr pbox = REGION_RECTS(damage);
+-	NULL,
++	MOD_CLASS_VIDEODRV,
+ 	{0, 0, 0, 0}
+ };
  
-+	ErrorF("%s", __FUNCTION__);
+@@ -151,7 +155,8 @@
+ 	if (!setupDone) {
+ 		setupDone = TRUE;
+ 		xf86AddDriver(&IVTVDEV, module, 0);
+-		LoaderRefSymLists(fbSymbols, shadowSymbols, NULL);
++		LoaderRefSymLists(fbSymbols, shadowSymbols,
++				  IVTVDevshadowFBSymbols, NULL);
+ 		return (pointer) 1;
+ 	} else {
+ 		if (errmaj)
+@@ -190,6 +195,29 @@
+ 	ivtvHWSendDMA(pScrn, fPtr->shadowmem, x1, x2, y1, y2);
+ }
+ 
++void
++IVTVDevRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
++{
++	IVTVDevPtr fPtr = IVTVDEVPTR(pScrn);
++	int x1 = pScrn->virtualX;
++	int x2 = 0;
++	int y1 = pScrn->virtualY;
++	int y2 = 0;
++	while (num--) {
++		if (pbox->x1 < x1)
++			x1 = pbox->x1;
++		if (pbox->x2 > x2)
++			x2 = pbox->x2;
++		if (pbox->y1 < y1)
++			y1 = pbox->y1;
++		if (pbox->y2 > y2)
++			y2 = pbox->y2;
++		pbox++;
++	};
 +
- 	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- 	IVTVDevPtr fPtr = IVTVDEVPTR(pScrn);
- 	int x1 = pScrn->virtualX;
-@@ -222,10 +225,8 @@
++	ivtvHWSendDMA(pScrn, fPtr->shadowmem, x1, x2, y1, y2);
++}
++
+ static Bool IVTVDevGetRec(ScrnInfoPtr pScrn)
+ {
+ 	if (pScrn->driverPrivate != NULL)
+@@ -222,10 +250,8 @@
  static Bool IVTVDevProbe(DriverPtr drv, int flags)
  {
  	int i;
@@ -73,7 +132,7 @@
  	char *dev;
  	Bool foundScreen = FALSE;
  	int *usedChips;
-@@ -259,7 +260,6 @@
+@@ -259,7 +285,6 @@
  	} else {
  		for (i = 0; i < numUsed; i++) {
  			ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
@@ -81,7 +140,7 @@
  			dev =
  			    xf86FindOptionValue(devSections[i]->options,
  						"fbdev");
-@@ -276,7 +276,7 @@
+@@ -276,7 +301,7 @@
  				if (pScrn) {
  					foundScreen = TRUE;
  
@@ -90,69 +149,70 @@
  					pScrn->driverName = IVTVDEV_DRIVER_NAME;
  					pScrn->name = IVTVDEV_NAME;
  					pScrn->Probe = IVTVDevProbe;
-@@ -453,6 +453,39 @@
+@@ -438,9 +463,16 @@
+ 		xf86LoaderReqSymLists(syms, NULL);
+ 	}
  
- void IvtvInitVideo(ScreenPtr pScreen);
- 
++	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "loading shadowfb");
++	if (!xf86LoadSubModule(pScrn, "shadowfb")) {
++		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++			   "Couldn't load shadowfb module:\n");
++		return FALSE;
++	}
++	xf86LoaderReqSymLists(IVTVDevshadowFBSymbols, NULL);
 +
-+static Bool
-+IVTVDevShadowInit(ScreenPtr pScreen, IVTVDevPtr fPtr)
-+{
-+    PixmapPtr pPixmap;
-+    //ShadowUpdateProc update;
-+    //ShadowWindowProc window;
-+
-+    pPixmap = pScreen->CreatePixmap(pScreen, pScreen->width, pScreen->height,
-+				    pScreen->rootDepth);
-+    if (!pPixmap)
-+       return FALSE;
-+
-+    if (!shadowSetup(pScreen)) {
-+       pScreen->DestroyPixmap(pPixmap);
-+       return FALSE;
-+    }
-+
-+#if 0
-+    update = /*fPtr->rotate ? shadowUpdateRotatePackedWeak()
-+	       : */shadowUpdatePackedWeak();
-+#endif
-+
-+    if (!shadowAdd(pScreen, pPixmap, FBshadowUpdatePacked,
-+		   /*window*/NULL, /*fPtr->rotate*/0, NULL)) {
-+       pScreen->DestroyPixmap(pPixmap);
-+       return FALSE;
-+    } else {
-+       return TRUE;
-+    }
-+}
-+
-+
- static Bool
- IVTVDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- {
-@@ -514,6 +547,7 @@
- 			   "Allocation of shadow memory failed\n");
+ 	/* Load shadow */
+-	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+-		   "Using \"Shadow Framebuffer\"\n");
++	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using \"Shadow Framebuffer\"\n");
+ 	if (!xf86LoadSubModule(pScrn, "shadow")) {
+ 		IVTVDevFreeRec(pScrn);
  		return FALSE;
- 	}
-+	//fPtr->fbstart   = fPtr->shadowmem;
+@@ -459,7 +491,6 @@
+ 	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ 	IVTVDevPtr fPtr = IVTVDEVPTR(pScrn);
+ 	VisualPtr visual;
+-	int init_picture = 0;
+ 	int ret, flags, width, height;
  
+ 	TRACE_ENTER("IVTVDevScreenInit");
+@@ -518,7 +549,6 @@
  	ret = fbScreenInit(pScreen, fPtr->shadowmem, width, height,
  			   pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth,
-@@ -543,9 +577,7 @@
+ 			   pScrn->bitsPerPixel);
+-	init_picture = 1;
+ 
+ 	if (!ret)
+ 		return FALSE;
+@@ -539,13 +569,11 @@
+ 	}
+ 
+ 	/* must be after RGB ordering fixed */
+-	if (init_picture && !fbPictureInit(pScreen, NULL, 0))
++	if (!fbPictureInit(pScreen, NULL, 0))
  		xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
  			   "RENDER extension initialisation failed.\n");
  
 -	if (!shadowSetup(pScreen) || !shadowAdd(pScreen, NULL,
 -						FBshadowUpdatePacked,
 -						NULL, 0, NULL)) {
-+	if (!IVTVDevShadowInit(pScreen, fPtr)) {
++	if (!shadowInit(pScreen, FBshadowUpdatePacked, NULL)) {
  		xf86DrvMsg(scrnIndex, X_ERROR,
  			   "Shadow framebuffer initialization failed.\n");
  		return FALSE;
+@@ -565,6 +593,8 @@
+ 	/* software cursor */
+ 	miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
+ 
++	ShadowFBInit(pScreen, IVTVDevRefreshArea);
++
+ 	/* XXX It would be simpler to use miCreateDefColormap() in all cases. */
+ 	if (!miCreateDefColormap(pScreen))
+ 		return FALSE;
 Index: xserver-xorg-video-ivtvdev/src/ivtv_xv.c
 ===================================================================
---- xserver-xorg-video-ivtvdev.orig/src/ivtv_xv.c	2006-10-04 21:53:31.000000000 +0100
-+++ xserver-xorg-video-ivtvdev/src/ivtv_xv.c	2006-10-04 21:53:57.000000000 +0100
+--- xserver-xorg-video-ivtvdev.orig/src/ivtv_xv.c	2006-10-04 21:55:19.000000000 +0100
++++ xserver-xorg-video-ivtvdev/src/ivtv_xv.c	2006-10-24 20:45:35.000000000 +0100
 @@ -41,6 +41,13 @@
  /*
   * I N C L U D E S
@@ -277,10 +337,18 @@
  
  	BoxRec dstBox;
  	CARD32 tmp;
+@@ -697,7 +703,6 @@
+ 			args.src_h = src_h;
+                         args.dst_h = drw_h;
+                         args.srcBuf_height = height;
+-			args.yuv_type = IVTV_YUV_TYPE_HME12;
+ 		}
+ 		break;
+ 	default:
 Index: xserver-xorg-video-ivtvdev/src/ivtvhw.c
 ===================================================================
---- xserver-xorg-video-ivtvdev.orig/src/ivtvhw.c	2006-10-04 21:53:31.000000000 +0100
-+++ xserver-xorg-video-ivtvdev/src/ivtvhw.c	2006-10-04 21:53:57.000000000 +0100
+--- xserver-xorg-video-ivtvdev.orig/src/ivtvhw.c	2006-10-04 21:55:19.000000000 +0100
++++ xserver-xorg-video-ivtvdev/src/ivtvhw.c	2006-10-24 20:45:06.000000000 +0100
 @@ -1,5 +1,14 @@
  /* $XFree86: xc/programs/Xserver/hw/xfree86/ivtvhw/ivtvhw.c,v 1.30 2002/11/25 14:05:00 eich Exp $ */
  
@@ -304,15 +372,6 @@
  
  /* pci stuff */
  #include "xf86PciInfo.h"
-@@ -22,7 +30,7 @@
- #define DPMS_SERVER
- #include <X11/extensions/dpms.h>
- 
--#define DEBUG 0
-+#define DEBUG 1
- 
- #if DEBUG
- # define TRACE_ENTER(str)	ErrorF("ivtvHW: " str " %d\n",pScrn->scrnIndex)
 @@ -45,7 +53,7 @@
  	0, 0, 2,
  	ABI_CLASS_VIDEODRV,



Reply to: