rpms/xorg-x11-drv-i810/devel intel-2.1.1-fix-xv-compiz.patch, NONE, 1.1 xorg-x11-drv-i810.spec, 1.65, 1.66

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Wed Oct 17 00:05:19 UTC 2007


Author: airlied

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

Modified Files:
	xorg-x11-drv-i810.spec 
Added Files:
	intel-2.1.1-fix-xv-compiz.patch 
Log Message:
* Wed Oct 17 2007 Dave Airlie <airlied at redhat.com> 2.1.1-6
- intel-2.1.1-fix-xv-compiz.patch - Real dirty hack to allocate 4MB of RAM
  for textured Xv to use as an offscreen pixmap so xv actually works under
  compiz - granted it may be unusably slow but at least stuff shows up.


intel-2.1.1-fix-xv-compiz.patch:

--- NEW FILE intel-2.1.1-fix-xv-compiz.patch ---
This is a pretty dirty hack which wastes RAM to allow textured xv adaptors to run inside compiz with XAA enabled.. my cpu doesn't have the power to hit this fullscreen and lots of memcpy ensues due to lack of zero copy tfp with XAA. but what the hey...

diff -ur xf86-video-intel-2.1.1.orig/src/i830.h xf86-video-intel-2.1.1/src/i830.h
--- xf86-video-intel-2.1.1.orig/src/i830.h	2007-08-14 15:58:29.000000000 +1100
+++ xf86-video-intel-2.1.1/src/i830.h	2007-10-17 10:40:04.000000000 +1100
@@ -294,6 +294,7 @@
    /* separate small buffers for kernels that support this */
    i830_memory *cursor_mem_classic[2];
    i830_memory *cursor_mem_argb[2];
+   i830_memory *xaaxv_scratch;
    i830_memory *xaa_scratch;
    i830_memory *xaa_scratch_2;
 #ifdef I830_USE_EXA
@@ -303,6 +304,8 @@
    /* Regions allocated either from the above pools, or from agpgart. */
    I830RingBuffer *LpRing;
 
+   PixmapPtr xaaxv_pixmap;
+   void *xaaxv_orig_pixmap_ptr;
 #ifdef I830_XV
    /* For Xvideo */
    i830_memory *overlay_regs;
diff -ur xf86-video-intel-2.1.1.orig/src/i830_memory.c xf86-video-intel-2.1.1/src/i830_memory.c
--- xf86-video-intel-2.1.1.orig/src/i830_memory.c	2007-08-14 15:58:29.000000000 +1100
+++ xf86-video-intel-2.1.1/src/i830_memory.c	2007-10-17 09:45:59.000000000 +1100
@@ -225,6 +225,7 @@
     }
     pI830->front_buffer = NULL;
     pI830->front_buffer_2 = NULL;
+    pI830->xaaxv_scratch = NULL;
     pI830->xaa_scratch = NULL;
     pI830->xaa_scratch_2 = NULL;
     pI830->exa_offscreen = NULL;
@@ -1129,6 +1130,15 @@
 #endif /* I830_USE_EXA */
 
     if (!pI830->noAccel && !pI830->useEXA) {
+
+        pI830->xaaxv_scratch =
+	  i830_allocate_memory(pScrn, "XAA Textured video scratch", (1920 * 1088 * 2),
+			       GTT_PAGE_SIZE, 0);
+	if (pI830->xaaxv_scratch == NULL) {
+ 	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		       "Failed to allocate XAA XV scratch pixmap space\n");
+	}
+
 	pI830->xaa_scratch =
 	    i830_allocate_memory(pScrn, "xaa scratch", MAX_SCRATCH_BUFFER_SIZE,
 				 GTT_PAGE_SIZE, 0);
diff -ur xf86-video-intel-2.1.1.orig/src/i830_video.c xf86-video-intel-2.1.1/src/i830_video.c
--- xf86-video-intel-2.1.1.orig/src/i830_video.c	2007-10-17 10:48:57.000000000 +1100
+++ xf86-video-intel-2.1.1/src/i830_video.c	2007-10-17 10:50:04.000000000 +1100
@@ -1002,8 +1002,14 @@
     I830PortPrivPtr pPriv = (I830PortPrivPtr) data;
     I830Ptr pI830 = I830PTR(pScrn);
 
-    if (pPriv->textured)
+    if (pPriv->textured) {
+	if (pI830->xaaxv_pixmap) {
+		(*pScrn->pScreen->ModifyPixmapHeader)(pI830->xaaxv_pixmap, 0, 0, 0, 0, 0, pI830->xaaxv_orig_pixmap_ptr);
+		pI830->xaaxv_pixmap = NULL;
+		pI830->xaaxv_orig_pixmap_ptr = NULL;
+	}
 	return;
+    }
 
     OVERLAY_DEBUG("I830StopVideo\n");
 
@@ -2489,10 +2495,13 @@
     if (((char *)pPixmap->devPrivate.ptr < (char *)pI830->FbBase) ||
 	((char *)pPixmap->devPrivate.ptr >= (char *)pI830->FbBase +
 	 pI830->FbMapSize)) {
+	pI830->xaaxv_orig_pixmap_ptr = pPixmap->devPrivate.ptr;
+	pI830->xaaxv_pixmap = pPixmap;
+	if (!(*pScreen->ModifyPixmapHeader)(pPixmap, 0, 0, 0, 0, 0, pI830->FbBase + pI830->xaaxv_scratch->offset))
+		return BadAlloc;
 	/* If the pixmap wasn't in framebuffer, then we have no way in XAA to
 	 * force it there.  So, we simply refuse to draw and fail.
 	 */
-	return BadAlloc;
     }
 
     if (!pPriv->textured) {


Index: xorg-x11-drv-i810.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-i810/devel/xorg-x11-drv-i810.spec,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- xorg-x11-drv-i810.spec	15 Oct 2007 11:57:25 -0000	1.65
+++ xorg-x11-drv-i810.spec	17 Oct 2007 00:04:45 -0000	1.66
@@ -7,7 +7,7 @@
 Summary:   Xorg X11 i810 video driver(s)
 Name:      xorg-x11-drv-i810
 Version:   2.1.1
-Release:   5%{?dist}
+Release:   6%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -22,6 +22,7 @@
 Patch1: intel-2.1.1-quirk-update.patch
 Patch2: intel-2.1.1-fix-vt-switch.patch
 Patch3: intel-2.1.1-fix-xv-reset.patch
+Patch4: intel-2.1.1-fix-xv-compiz.patch
 
 # legacy i810 driver patches
 Patch100: i810-1.6.5-to-git-20060911.patch
@@ -69,6 +70,7 @@
 %patch1 -p1 -b .quirk-update
 %patch2 -p1 -b .vtswitch
 %patch3 -p1 -b .xvfix
+%patch4 -p1 -b .xv-compiz
 
 %build
 OPTS="--disable-static --libdir=%{_libdir} --mandir=%{_mandir} --enable-dri"
@@ -111,6 +113,11 @@
 %{_libdir}/libI810XvMC.so
 
 %changelog
+* Wed Oct 17 2007 Dave Airlie <airlied at redhat.com> 2.1.1-6
+- intel-2.1.1-fix-xv-compiz.patch - Real dirty hack to allocate 4MB of RAM
+  for textured Xv to use as an offscreen pixmap so xv actually works under
+  compiz - granted it may be unusably slow but at least stuff shows up.
+
 * Mon Oct 15 2007 Dave Airlie <airlied at redhat.com> 2.1.1-5
 - intel-2.1.1-fix-vt-switch.patch - Only restore paletter regs on enabled pipes
 - intel-2.1.1-fix-xv-reset.patch - Reset XV after mode switch




More information about the fedora-extras-commits mailing list