Backport of "intel" driver to Xorg 7.0

Krzysztof Lichota krzysiek at lichota.net
Fri Mar 28 04:51:01 PDT 2008


Hello everyone.
I have been trying to find a decent Xorg driver for Intel 965G (X3100)
in Xorg 7.0, but couldn't find any. For chipsets <965 the driver i810
works OK, providing acceleration, but the theoretically better 965G
works only with Vesa driver, providing poor performance, especially for
video.

I am not looking for 3D driver, but I think that at least video should
work fine on any system and Xorg 7.0 is still in use in many places
(especially as it is in K/Ubuntu Dapper which is long-term release).

I have been trying to find a backport of "intel" driver, but couldn't
find any, so I have tried to do it myself. I took
xserver-xorg-video-intel-2.1.1 package and tried (using brute force) to
make it compile by cutting off all parts which prevent compiling it on
Xorg 7.0 (EXA, Damage, Composite, etc.).

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;
    }
and, in turn, I had to remove pPixmap call from the call to
I965DisplayVideoTextured():
	I965DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height,
				 dstPitch, x1, y1, x2, y2,
				 src_w, src_h, drw_w, drw_h
#ifdef XORG_NEWER_1_0
				 , pPixmap
#endif
				 );

and this in turn propagates to the following lines of code in
I965DisplayVideoTextured():
    dest_surf_state->ss1.base_addr = (long)pPixmap->devPrivate.ptr -
	(long)pI830->FbBase;
and
    dest_surf_state->ss3.pitch = pPixmap->devKind - 1;
and
    pix_xoff = -pPixmap->screen_x + pPixmap->drawable.x;
    pix_yoff = -pPixmap->screen_y + pPixmap->drawable.y;

I have looked into getting the pixmap using GetWindowPixmap(), but it
needs window id and it is not passed to I830PutImage(), it only gets
screen region.

I have also played with setting ss1.base_addr to various values (as far
as I understand it should get the pointer to surface), but without much
luck (it is displaying all video in top lines of screen, but the image
is not correct).

So, I would appreciate any hints or help how to fix the driver. Maybe I
can get pointer to window pixmap using other way? Or maybe the arguments
in I965DisplayVideoTextured() can be taken using other means?

Regards

	Krzysztof Lichota

PS. I am not into Xorg internals, so please forgive me if I am trying to
do something completely wrong.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080328/eab9ec38/attachment.pgp>


More information about the xorg mailing list