[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: Backport of "intel" driver to Xorg 7.0
From:       Matthias Hopf <mhopf () suse ! de>
Date:       2008-03-28 13:24:16
Message-ID: 20080328132416.GA16615 () suse ! de
[Download RAW message or body]

On Mar 28, 08 12:51:01 +0100, Krzysztof Lichota wrote:
> I got to the point where driver is compiling and 2D acceleration using
> XAA is working (providing much better speed than Vesa), but I cannot
> make XV work as it is using "textured video" (I guess overlay mode is
> not present in 965G) and some necessary arguments are missing for
> textured video. Namely:
> 
> Function I830PutImage() in 7.0 does not have "DrawablePtr pDraw"
> argument, so later on the following code does not work:
>     if (pDraw->type == DRAWABLE_WINDOW) {
> 	pPixmap = (*pScreen->GetWindowPixmap)((WindowPtr)pDraw);
>     } else {
> 	pPixmap = (PixmapPtr)pDraw;
>     }

I hit exactly the same issue. The attached patch fixes the problem for
me, though I don't know ATM whether the choice I made is correct or only
works by accident.

Note also that this doesn't test for the API, so only apply this patch
when compiling for older Xservers. Unfortunately there's no easy way to
detect this ABI change. :-(

CU

Matthias

-- 
Matthias Hopf <mhopf@suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat@mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de

["intel_xvideo_apichange.diff" (text/x-patch)]

--- src/i810_video.c.orig	2008-01-09 20:14:38.000000000 +0100
+++ src/i810_video.c	2008-01-09 20:15:08.000000000 +0100
@@ -76,8 +76,7 @@ static void I810QueryBestSize(ScrnInfoPt
 	short, short, short, short, unsigned int *, unsigned int *, pointer);
 static int I810PutImage( ScrnInfoPtr, 
 	short, short, short, short, short, short, short, short,
-	int, unsigned char*, short, short, Bool, RegionPtr, pointer,
-	DrawablePtr);
+	int, unsigned char*, short, short, Bool, RegionPtr, pointer);
 static int I810QueryImageAttributes(ScrnInfoPtr, 
 	int, unsigned short *, unsigned short *,  int *, int *);
 
@@ -975,8 +974,7 @@ I810PutImage( 
   int id, unsigned char* buf, 
   short width, short height, 
   Bool sync,
-  RegionPtr clipBoxes, pointer data,
-  DrawablePtr pDraw
+  RegionPtr clipBoxes, pointer data
 ){
     I810Ptr pI810 = I810PTR(pScrn);
     I810PortPrivPtr pPriv = (I810PortPrivPtr)data;
--- src/i830_video.c.orig	2008-01-09 20:14:42.000000000 +0100
+++ src/i830_video.c	2008-01-09 20:15:55.000000000 +0100
@@ -99,7 +99,7 @@ static void I830QueryBestSize(ScrnInfoPt
 			      unsigned int *, pointer);
 static int I830PutImage(ScrnInfoPtr, short, short, short, short, short, short,
 			short, short, int, unsigned char *, short, short,
-			Bool, RegionPtr, pointer, DrawablePtr);
+			Bool, RegionPtr, pointer);
 static int I830QueryImageAttributesOverlay(ScrnInfoPtr, int, unsigned short *,
 					   unsigned short *, int *, int *);
 static int I830QueryImageAttributesTextured(ScrnInfoPtr, int, unsigned short *,
@@ -2173,8 +2173,7 @@ I830PutImage(ScrnInfoPtr pScrn,
 	     short drw_w, short drw_h,
 	     int id, unsigned char *buf,
 	     short width, short height,
-	     Bool sync, RegionPtr clipBoxes, pointer data,
-	     DrawablePtr pDraw)
+	     Bool sync, RegionPtr clipBoxes, pointer data)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     I830PortPrivPtr pPriv = (I830PortPrivPtr) data;
@@ -2188,6 +2187,7 @@ I830PutImage(ScrnInfoPtr pScrn,
     int pitchAlignMask;
     int alloc_size, extraLinear;
     xf86CrtcPtr	crtc;
+    DrawablePtr pDraw = GetCurrentRootWindow();
 
     if (pPriv->textured)
 	overlay = NULL;


_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic