--- xserver-xorg-video-psb-0.36.0-ref/src/psb_video.c 2010-10-02 12:39:28.000000000 +0200 +++ xserver-xorg-video-psb-0.36.0/src/psb_video.c 2011-02-14 22:18:58.000000000 +0100 @@ -36,7 +36,9 @@ #include "xf86.h" #include "xf86_OSproc.h" +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 #include "xf86Resources.h" +#endif #include "compiler.h" #include "xf86xv.h" @@ -610,6 +612,9 @@ float tc0[6], tc1[6], tc2[6]; int num_texture = 0; float *conversion_data = NULL; + Bool directFB = FALSE; + short drw_x = pPixmap->screen_x; + short drw_y = pPixmap->screen_y; hdtv = ((src_w >= PSB_HDTV_LIMIT_X) && (src_h >= PSB_HDTV_LIMIT_Y)); @@ -684,12 +689,26 @@ * coordinates) to the backing pixmap. */ - while (!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)) + if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){ exaMoveInPixmap(pPixmap); + if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){ + PsbBufListPtr b; + PsbPtr pPsb = psbPTR(pScrn); + pre_add = (drw_x + (drw_y*pScrn->displayWidth))*(pScrn->bitsPerPixel/8); //exaGetPixmapOffset(pPixmap); + b = mmListBuf(&pPsb->buffers); + dstBuf = b->buf; + directFB = TRUE; + } + } + dst.buffer = mmKernelBuf(dstBuf); dst.offset = pre_add; - dst.stride = pPixmap->devKind; + if( directFB ){ + dst.stride = pScrn->displayWidth * (pScrn->bitsPerPixel/8); + }else{ + dst.stride = pPixmap->devKind; + } switch (pPixmap->drawable.depth) { case 15: @@ -771,7 +790,9 @@ } } - DamageDamageRegion(&pPixmap->drawable, dstRegion); + if( ! directFB ){ + DamageDamageRegion(&pPixmap->drawable, dstRegion); + } return TRUE; }