mi: Drop plane argument from miHandleExposures
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 1412780701-8818-9-git-send-email-ajax-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Hi
This stops xf86-video-intel working or compiling for me
The below patch is a work around but I'm not quite sure what to check for to make it work with both old and new xservers
Cheers
Mike
Quoted 157 lines · Adam Jackson
This existed to be passed to the bs recovery routine; since we back all planes, we don't care.
Signed-off-by Adam Jackson <[email protected]>--- fb/fbcopy.c | 2 +- glamor/glamor_copy.c | 3 +-- hw/dmx/dmxgcops.c | 8 ++++---- mi/mi.h | 3 +-- mi/mibitblt.c | 5 ++--- mi/micopy.c | 3 +-- mi/miexpose.c | 8 +------- 7 files changed, 11 insertions(+), 21 deletions(-)fb/fbcopy.c +1
-1@@ -271,5 +271,5 @@ fbCopyPlane(DrawablePtr pSrcDrawable,else return miHandleExposures (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, bitplane); + widthSrc, heightSrc, xOut, yOut); }glamor/glamor_copy.c +1
-2@@ -677,8 +677,7 @@ glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc, {if ((bitplane &FbFullMask (src->depth)) ==0 )return miHandleExposures (src, dst, gc, - srcx, srcy, width, height, dstx, dsty, - bitplane); + srcx, srcy, width, height, dstx, dsty);return miDoCopy (src, dst, gc, srcx, srcy, width, height, dstx, dsty, glamor_copy, bitplane,NULL );hw/dmx/dmxgcops.c +4
-4@@ -179,7 +179,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,if (DMX_GCOPS_OFFSCREEN (pSrc) ||DMX_GCOPS_OFFSCREEN (pDst))return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, w, h, - dstx, dsty,0L ); + dstx, dsty);DMX_GCOPS_SET_DRAWABLE (pSrc, srcDraw);DMX_GCOPS_SET_DRAWABLE (pDst, dstDraw);@@ -188,7 +188,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, srcx, srcy, w, h, dstx, dsty);dmxSync (dmxScreen, FALSE); -return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty,0L ); +return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); }/** Copy plane number \a bitPlane from \a pSrc drawable to \a pDst @@ -206,7 +206,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,if (DMX_GCOPS_OFFSCREEN (pSrc) ||DMX_GCOPS_OFFSCREEN (pDst))return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty);DMX_GCOPS_SET_DRAWABLE (pSrc, srcDraw);DMX_GCOPS_SET_DRAWABLE (pDst, dstDraw);@@ -216,7 +216,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,dmxSync (dmxScreen, FALSE);return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty); }/** Render list of points, \a pptInit in \a pDrawable on the back-end mi/mi.h +1
-2@@ -229,8 +229,7 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*width */ , int/*height */ , int/*dstx */ , - int/*dsty */ , - unsigned long /*plane */ + int/*dsty */ ); extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ ,mi/mibitblt.c +2
-3@@ -242,8 +242,7 @@ miCopyArea(DrawablePtr pSrcDrawable, } } prgnExposed =miHandleExposures (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, - (unsigned long )0 ); + widthSrc, heightSrc, xOut, yOut);if (realSrcClip)RegionDestroy (prgnSrcClip);@@ -579,7 +578,7 @@ miCopyPlane(DrawablePtr pSrcDrawable, } } prgnExposed =miHandleExposures (pSrcDrawable, pDstDrawable, pGC, srcx, srcy, - width, height, dstx, dsty, bitPlane); + width, height, dstx, dsty);RegionDestroy (prgnSrc);return prgnExposed; }mi/micopy.c +1
-2@@ -304,8 +304,7 @@ miDoCopy(DrawablePtr pSrcDrawable, yIn - pSrcDrawable->y, widthSrc, heightSrc, xOut - pDstDrawable->x, - yOut - pDstDrawable->y, - (unsigned long) bitPlane); + yOut - pDstDrawable->y);RegionUninit (&rgnDst);if (freeSrcClip)RegionDestroy (prgnSrcClip);mi/miexpose.c +1
-8@@ -116,18 +116,12 @@ NOTE:this should generally be called, even if graphicsExposures is false, because this is where bits get recovered from backing store. -NOTE: -added argument 'plane' is used to indicate how exposures from backing -store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea -should be used, else a CopyPlane of the indicated plane will be used. The -exposing is done by the backing store's GraphicsExpose function, of course. -*/ RegionPtr miHandleExposures (DrawablePtr pSrcDrawable,DrawablePtr pDstDrawable,GCPtr pGC,int srcx,int srcy,int width,int height, -int dstx,int dsty,unsigned long plane) +int dstx,int dsty) {RegionPtr prgnSrcClip;/* drawable-relative source clip */ RegionRec rgnSrcRec; --1.9.3
Quoted 4 lines
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
From c1f107973ff25bb24ac27b3115b63756bcb9acc0 Mon Sep 17 00:00:00 2001
From: Mike Lothian <[email protected]>
Date: Sat, 11 Oct 2014 14:27:44 +0100
Subject: [PATCH] sna: Work around miHandleExposures dropping plane
--- src/sna/fb/fbcopy.c | 3 +-- src/sna/sna_accel.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-)
src/sna/fb/fbcopy.c +1 -2
@@ -220,6 +220,5 @@ fbCopyPlane(DrawablePtr src, DrawablePtr dst, GCPtr gc, fbCopy1toN, (Pixel) bitplane, 0); else return miHandleExposures(src, dst, gc, -sx ,sy ,width ,height ,dx ,dy , -bitplane ); +sx ,sy ,width ,height ,dx ,dy ); }
src/sna/sna_accel.c +2 -3
@@ -7006,8 +7006,7 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc, clip =miHandleExposures (src, dst, gc, sx - src->x, sy - src->y, width, height, - dx - dst->x, dy - dst->y, - (unsigned long ) bitPlane); + dx - dst->x, dy - dst->y);return clip; }
@@ -8716,7 +8715,7 @@ empty:return miHandleExposures (src, dst, gc, src_x, src_y, w, h, - dst_x, dst_y, bit); + dst_x, dst_y); } static bool
Signature · 1 line
2.1.2
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
I think I've found the correct way to do it
I've tested against xorg-server 1.16.1 and xorg-server from the latest git - I'm not sure if the formatting if correct or not but it compiles and runs on both
Cheers
Mike
Quoted 169 lines · Mike Lothian
Hi
This stops xf86-video-intel working or compiling for me
The below patch is a work around but I'm not quite sure what to check for to make it work with both old and new xservers
Cheers
Mike
Quoted 157 lines · Adam Jackson
This existed to be passed to the bs recovery routine; since we back all planes, we don't care.
Signed-off-by Adam Jackson <[email protected]>--- fb/fbcopy.c | 2 +- glamor/glamor_copy.c | 3 +-- hw/dmx/dmxgcops.c | 8 ++++---- mi/mi.h | 3 +-- mi/mibitblt.c | 5 ++--- mi/micopy.c | 3 +-- mi/miexpose.c | 8 +------- 7 files changed, 11 insertions(+), 21 deletions(-)fb/fbcopy.c +1
-1@@ -271,5 +271,5 @@ fbCopyPlane(DrawablePtr pSrcDrawable,else return miHandleExposures (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, bitplane); + widthSrc, heightSrc, xOut, yOut); }glamor/glamor_copy.c +1
-2@@ -677,8 +677,7 @@ glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc, {if ((bitplane &FbFullMask (src->depth)) ==0 )return miHandleExposures (src, dst, gc, - srcx, srcy, width, height, dstx, dsty, - bitplane); + srcx, srcy, width, height, dstx, dsty);return miDoCopy (src, dst, gc, srcx, srcy, width, height, dstx, dsty, glamor_copy, bitplane,NULL );hw/dmx/dmxgcops.c +4
-4@@ -179,7 +179,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,if (DMX_GCOPS_OFFSCREEN (pSrc) ||DMX_GCOPS_OFFSCREEN (pDst))return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, w, h, - dstx, dsty,0L ); + dstx, dsty);DMX_GCOPS_SET_DRAWABLE (pSrc, srcDraw);DMX_GCOPS_SET_DRAWABLE (pDst, dstDraw);@@ -188,7 +188,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, srcx, srcy, w, h, dstx, dsty);dmxSync (dmxScreen, FALSE); -return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty,0L ); +return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); }/** Copy plane number \a bitPlane from \a pSrc drawable to \a pDst @@ -206,7 +206,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,if (DMX_GCOPS_OFFSCREEN (pSrc) ||DMX_GCOPS_OFFSCREEN (pDst))return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty);DMX_GCOPS_SET_DRAWABLE (pSrc, srcDraw);DMX_GCOPS_SET_DRAWABLE (pDst, dstDraw);@@ -216,7 +216,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,dmxSync (dmxScreen, FALSE);return miHandleExposures (pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, bitPlane); + dstx, dsty); }/** Render list of points, \a pptInit in \a pDrawable on the back-end mi/mi.h +1
-2@@ -229,8 +229,7 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*width */ , int/*height */ , int/*dstx */ , - int/*dsty */ , - unsigned long /*plane */ + int/*dsty */ ); extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ ,mi/mibitblt.c +2
-3@@ -242,8 +242,7 @@ miCopyArea(DrawablePtr pSrcDrawable, } } prgnExposed =miHandleExposures (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, - widthSrc, heightSrc, xOut, yOut, - (unsigned long )0 ); + widthSrc, heightSrc, xOut, yOut);if (realSrcClip)RegionDestroy (prgnSrcClip);@@ -579,7 +578,7 @@ miCopyPlane(DrawablePtr pSrcDrawable, } } prgnExposed =miHandleExposures (pSrcDrawable, pDstDrawable, pGC, srcx, srcy, - width, height, dstx, dsty, bitPlane); + width, height, dstx, dsty);RegionDestroy (prgnSrc);return prgnExposed; }mi/micopy.c +1
-2@@ -304,8 +304,7 @@ miDoCopy(DrawablePtr pSrcDrawable, yIn - pSrcDrawable->y, widthSrc, heightSrc, xOut - pDstDrawable->x, - yOut - pDstDrawable->y, - (unsigned long) bitPlane); + yOut - pDstDrawable->y);RegionUninit (&rgnDst);if (freeSrcClip)RegionDestroy (prgnSrcClip);mi/miexpose.c +1
-8@@ -116,18 +116,12 @@ NOTE:this should generally be called, even if graphicsExposures is false, because this is where bits get recovered from backing store. -NOTE: -added argument 'plane' is used to indicate how exposures from backing -store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea -should be used, else a CopyPlane of the indicated plane will be used. The -exposing is done by the backing store's GraphicsExpose function, of course. -*/ RegionPtr miHandleExposures (DrawablePtr pSrcDrawable,DrawablePtr pDstDrawable,GCPtr pGC,int srcx,int srcy,int width,int height, -int dstx,int dsty,unsigned long plane) +int dstx,int dsty) {RegionPtr prgnSrcClip;/* drawable-relative source clip */ RegionRec rgnSrcRec; --1.9.3
Quoted 4 lines
Quoted 4 lines
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
From dbb53d0ffe03726608849473aacf863227843b3e Mon Sep 17 00:00:00 2001
From: Mike Lothian <[email protected]>
Date: Sat, 11 Oct 2014 15:12:53 +0100
Subject: [PATCH] sna: miHandleExposures no longer requires plane argument
This is required since xorg-server commit
mi: Drop plane argument from miHandleExposures5d3bd8a3dc6456ea1ccf7b5f71b972379d7565ec
--- src/sna/fb/fbcopy.c | 5 +++++ src/sna/sna_accel.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+)
src/sna/fb/fbcopy.c +5 -0
@@ -219,7 +219,12 @@ fbCopyPlane(DrawablePtr src, DrawablePtr dst, GCPtr gc,return miDoCopy (src, dst, gc, sx, sy, width, height, dx, dy, fbCopy1toN, (Pixel ) bitplane,0 ); else +#if XORG_VERSION_CURRENT >=XORG_VERSION_NUMERIC (1 ,16 ,99 ,1 ,0 ) +return miHandleExposures (src, dst, gc, + sx, sy, width, height, dx, dy); +#else return miHandleExposures (src, dst, gc, sx, sy, width, height, dx, dy, bitplane); +#endif }
src/sna/sna_accel.c +14 -0
@@ -7003,11 +7003,18 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,/* Pixmap sources generate a NoExposed (we return NULL to do this) */ clip =NULL ; if (expose && gc->fExpose) +#if XORG_VERSION_CURRENT >=XORG_VERSION_NUMERIC (1 ,16 ,99 ,1 ,0 ) + clip =miHandleExposures (src, dst, gc, + sx - src->x, sy - src->y, + width, height, + dx - dst->x, dy - dst->y); +#else clip =miHandleExposures (src, dst, gc, sx - src->x, sy - src->y, width, height, dx - dst->x, dy - dst->y, (unsigned long ) bitPlane); +#endif return clip; }
@@ -8713,10 +8720,17 @@ out:RegionUninit (®ion);return ret; empty: +#if XORG_VERSION_CURRENT >=XORG_VERSION_NUMERIC (1 ,16 ,99 ,1 ,0 ) +return miHandleExposures (src, dst, gc, + src_x, src_y, + w, h, + dst_x, dst_y); +#else return miHandleExposures (src, dst, gc, src_x, src_y, w, h, dst_x, dst_y, bit); +#endif } static bool
Signature · 1 line
2.1.2
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Mike Lothian
I think I've found the correct way to do it
I've tested against xorg-server 1.16.1 and xorg-server from the latest git - I'm not sure if the formatting if correct or not but it compiles and runs on both
What about 'src/compat-api.h'? This looks like the correct place for it and it could be shared with all other drivers that had this file put in their repo a while back.
Cheers,
Rémi
A message that is not in the archive (sent off-list or not yet received): CAHbf0-HGAa6vkhuhCfLMe4fE_GzTD4vjDbt4ttCpgSPubqxs4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 6 lines · Mike Lothian
Hi
This stops xf86-video-intel working or compiling for me
The below patch is a work around but I'm not quite sure what to check for to make it work with both old and new xservers
Intel will need to be fixed, yeah. Preferably by not forking fb, which is, you know, insane.
- ajax
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel