xf86-video-intel: 3 commits - src/i830_batchbuffer.c src/i830_dri.c src/i830.h src/i965_video.c uxa/uxa-render.c

Chris Wilson ickle at kemper.freedesktop.org
Mon May 17 07:20:53 PDT 2010


 src/i830.h             |    5 -----
 src/i830_batchbuffer.c |   15 ---------------
 src/i830_dri.c         |   10 +++++-----
 src/i965_video.c       |    1 -
 uxa/uxa-render.c       |    8 ++++----
 5 files changed, 9 insertions(+), 30 deletions(-)

New commits:
commit 5e04a81369dfc76bbc1ebbd4db00c23e71eb9e1c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon May 17 15:16:25 2010 +0100

    i830: Remove vestigal debugging ALWAYS_FLUSH and ALWAYS_SYNC
    
    These are now debugging options exposed in Xorg.conf, and now unused int
    the source code.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i830.h b/src/i830.h
index 827655b..2c875f3 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -189,9 +189,6 @@ typedef struct _I830OutputRec I830OutputRec, *I830OutputPtr;
 #endif
 #endif
 
-#define ALWAYS_SYNC 0
-#define ALWAYS_FLUSH 0
-
 #define PITCH_NONE 0
 
 /** Record of a linear allocation in the aperture. */
@@ -504,8 +501,6 @@ i830_get_transformed_coordinates_3d(int x, int y, PictTransformPtr transform,
 
 void i830_enter_render(ScrnInfoPtr);
 
-extern void intel_sync(ScrnInfoPtr scrn);
-
 static inline void
 intel_debug_fallback(ScrnInfoPtr scrn, char *format, ...)
 {
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 6481384..c23b0b8 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -269,18 +269,3 @@ void intel_batch_wait_last(ScrnInfoPtr scrn)
 	drm_intel_bo_map(intel->last_batch_bo, TRUE);
 	drm_intel_bo_unmap(intel->last_batch_bo);
 }
-
-void intel_sync(ScrnInfoPtr scrn)
-{
-	intel_screen_private *intel = intel_get_screen_private(scrn);
-
-	if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC))
-		ErrorF("I830Sync\n");
-
-	if (!scrn->vtSema || !intel->batch_bo || !intel->batch_ptr)
-		return;
-
-	intel_batch_emit_flush(scrn);
-	intel_batch_submit(scrn);
-	intel_batch_wait_last(scrn);
-}
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 15aafdd..efd8c4a 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -395,9 +395,6 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 	 * client gets to run again so flush now. */
 	intel_batch_emit_flush(scrn);
 	intel_batch_submit(scrn);
-#if ALWAYS_SYNC
-	intel_sync(scrn);
-#endif
 	drmCommandNone(intel->drmSubFD, DRM_I915_GEM_THROTTLE);
 }
 
diff --git a/src/i965_video.c b/src/i965_video.c
index c537860..2675556 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -161,7 +161,6 @@ static void brw_debug(ScrnInfoPtr scrn, char *when)
 	int i;
 	uint32_t v;
 
-	intel_sync(scrn);
 	ErrorF("brw_debug: %s\n", when);
 	for (i = 0; svg_ctl_bits[i].name; i++) {
 		OUTREG(BRW_SVG_CTL, svg_ctl_bits[i].svg_ctl);
commit 723cc45b2707aa160eac6d5b56a20e19cc42c8a3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon May 17 15:14:55 2010 +0100

    dri: Check error code from GetScratchGC()
    
    It may fail so be prepared, and do use the right drawable!
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 7ba9166..15aafdd 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -302,7 +302,10 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 	RegionPtr pCopyClip;
 	GCPtr gc;
 
-	gc = GetScratchGC(drawable->depth, screen);
+	gc = GetScratchGC(dst->depth, screen);
+	if (!gc)
+		return;
+
 	pCopyClip = REGION_CREATE(screen, NULL, 0);
 	REGION_COPY(screen, pCopyClip, pRegion);
 	(*gc->funcs->ChangeClip) (gc, CT_REGION, pCopyClip, 0);
@@ -390,12 +393,12 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 	 *
 	 * We can't rely on getting into the block handler before the DRI
 	 * client gets to run again so flush now. */
+	intel_batch_emit_flush(scrn);
 	intel_batch_submit(scrn);
 #if ALWAYS_SYNC
 	intel_sync(scrn);
 #endif
 	drmCommandNone(intel->drmSubFD, DRM_I915_GEM_THROTTLE);
-
 }
 
 #if DRI2INFOREC_VERSION >= 4
commit 2c00297bc3b4969f28e2eb19bce36ece50ce4ccb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun May 16 19:15:37 2010 +0100

    uxa: Replace solid planemask [0xffffffff] with FB_ALLONES
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 4c552ca..726079a 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -370,7 +370,7 @@ uxa_try_driver_solid_fill(PicturePtr pSrc,
 	PixmapPtr pSrcPix = NULL, pDstPix;
 	CARD32 pixel;
 
-	if (uxa_screen->info->check_solid && !uxa_screen->info->check_solid(pDst->pDrawable, GXcopy, 0xffffffff))
+	if (uxa_screen->info->check_solid && !uxa_screen->info->check_solid(pDst->pDrawable, GXcopy, FB_ALLONES))
 		return -1;
 
 	pDstPix = uxa_get_offscreen_pixmap(pDst->pDrawable, &dst_off_x, &dst_off_y);
@@ -427,7 +427,7 @@ uxa_try_driver_solid_fill(PicturePtr pSrc,
 	}
 
 	if (!(*uxa_screen->info->prepare_solid)
-	    (pDstPix, GXcopy, 0xffffffff, pixel)) {
+	    (pDstPix, GXcopy, FB_ALLONES, pixel)) {
 		REGION_UNINIT(pDst->pDrawable->pScreen, &region);
 		return -1;
 	}
@@ -971,7 +971,7 @@ uxa_solid_rects (CARD8		op,
 		CARD32 pixel;
 
 		if (uxa_screen->info->check_solid &&
-		    !uxa_screen->info->check_solid(&dst_pixmap->drawable, GXcopy, 0xffffffff))
+		    !uxa_screen->info->check_solid(&dst_pixmap->drawable, GXcopy, FB_ALLONES))
 			goto err_region;
 
 		if (op == PictOpClear) {
@@ -986,7 +986,7 @@ uxa_solid_rects (CARD8		op,
 				goto err_region;
 		}
 
-		if (!uxa_screen->info->prepare_solid(dst_pixmap, GXcopy, 0xffffffff, pixel))
+		if (!uxa_screen->info->prepare_solid(dst_pixmap, GXcopy, FB_ALLONES, pixel))
 			goto err_region;
 
 		uxa_screen->info->solid(dst_pixmap,


More information about the xorg-commit mailing list