xf86-video-ati: Branch 'master' - 3 commits

Michel Dänzer daenzer at kemper.freedesktop.org
Mon Feb 23 23:14:55 PST 2009


 src/radeon.h                     |    4 ++--
 src/radeon_commonfuncs.c         |    5 +----
 src/radeon_exa_funcs.c           |    9 ++++++---
 src/radeon_exa_render.c          |   16 +++++++++++-----
 src/radeon_legacy_memory.c       |    4 ++--
 src/radeon_textured_videofuncs.c |   20 ++++++++++----------
 6 files changed, 32 insertions(+), 26 deletions(-)

New commits:
commit 752b0218af36a45b333a12f66dfdce8c1e662aa8
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Tue Feb 24 08:13:06 2009 +0100

    EXA: Pass pScrn and info into RadeonCompositeTile.
    
    Saves some cycles looking them up.

diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 6895ea5..2cc55db 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -2015,13 +2015,14 @@ static inline void transformPoint(PictTransform *transform, xPointFixed *point)
 }
 #endif
 
-static void FUNC_NAME(RadeonCompositeTile)(PixmapPtr pDst,
+static void FUNC_NAME(RadeonCompositeTile)(ScrnInfoPtr pScrn,
+					   RADEONInfoPtr info,
+					   PixmapPtr pDst,
 					   int srcX, int srcY,
 					   int maskX, int maskY,
 					   int dstX, int dstY,
 					   int w, int h)
 {
-    RINFO_FROM_SCREEN(pDst->drawable.pScreen);
     int vtx_count;
     xPointFixed srcTopLeft, srcTopRight, srcBottomLeft, srcBottomRight;
     static xPointFixed maskTopLeft, maskTopRight, maskBottomLeft, maskBottomRight;
@@ -2181,7 +2182,9 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
     RINFO_FROM_SCREEN(pDst->drawable.pScreen);
 
     if (!info->accel_state->need_src_tile_x && !info->accel_state->need_src_tile_y) {
-	FUNC_NAME(RadeonCompositeTile)(pDst,
+	FUNC_NAME(RadeonCompositeTile)(pScrn,
+				       info,
+				       pDst,
 				       srcX, srcY,
 				       maskX, maskY,
 				       dstX, dstY,
@@ -2215,7 +2218,9 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
 		w = remainingWidth;
 	    remainingWidth -= w;
 	    
-	    FUNC_NAME(RadeonCompositeTile)(pDst,
+	    FUNC_NAME(RadeonCompositeTile)(pScrn,
+					   info,
+					   pDst,
 					   tileSrcX, tileSrcY,
 					   tileMaskX, tileMaskY,
 					   tileDstX, tileDstY,
commit e2e508bc08d993fc108297e9cd2fa0ce183282bc
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Tue Feb 24 08:12:42 2009 +0100

    Only call RADEONWaitForVLine if it might actually do anything useful.
    
    Otherwise it and RADEONBiggerCrtcArea show up pretty high in x11perf -aa*text
    profiles.

diff --git a/src/radeon.h b/src/radeon.h
index 2944fe8..af9c7c2 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -947,11 +947,11 @@ extern Bool radeon_card_posted(ScrnInfoPtr pScrn);
 #ifdef XF86DRI
 extern void RADEONWaitForIdleCP(ScrnInfoPtr pScrn);
 extern void RADEONWaitForVLineCP(ScrnInfoPtr pScrn, PixmapPtr pPix,
-	int crtc, int start, int stop, int enable);
+	int crtc, int start, int stop);
 #endif
 extern void RADEONWaitForIdleMMIO(ScrnInfoPtr pScrn);
 extern void RADEONWaitForVLineMMIO(ScrnInfoPtr pScrn, PixmapPtr pPix,
-	int crtc, int start, int stop, int enable);
+	int crtc, int start, int stop);
 
 /* radeon_crtc.c */
 extern void radeon_crtc_dpms(xf86CrtcPtr crtc, int mode);
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index 0a9f9db..3aa61bc 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -628,16 +628,13 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
 
 /* inserts a wait for vline in the command stream */
 void FUNC_NAME(RADEONWaitForVLine)(ScrnInfoPtr pScrn, PixmapPtr pPix,
-	int crtc, int start, int stop, Bool enable)
+	int crtc, int start, int stop)
 {
     RADEONInfoPtr  info = RADEONPTR(pScrn);
     xf86CrtcConfigPtr  xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     uint32_t offset;
     ACCEL_PREAMBLE();
 
-    if (!enable)
-	return;
-
     if ((crtc < 0) || (crtc > 1))
 	return;
 
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index cd97cc6..eb16036 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -129,7 +129,8 @@ FUNC_NAME(RADEONSolid)(PixmapPtr pPix, int x1, int y1, int x2, int y2)
 
     TRACE;
 
-    FUNC_NAME(RADEONWaitForVLine)(pScrn, pPix, RADEONBiggerCrtcArea(pPix), y1, y2, info->accel_state->vsync);
+    if (info->accel_state->vsync)
+	FUNC_NAME(RADEONWaitForVLine)(pScrn, pPix, RADEONBiggerCrtcArea(pPix), y1, y2);
 
     BEGIN_ACCEL(2);
     OUT_ACCEL_REG(RADEON_DST_Y_X, (y1 << 16) | x1);
@@ -230,7 +231,8 @@ FUNC_NAME(RADEONCopy)(PixmapPtr pDst,
 	dstY += h - 1;
     }
 
-    FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), dstY, dstY + h, info->accel_state->vsync);
+    if (info->accel_state->vsync)    
+	FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), dstY, dstY + h);
 
     BEGIN_ACCEL(3);
 
@@ -281,7 +283,8 @@ RADEONUploadToScreenCP(PixmapPtr pDst, int x, int y, int w, int h,
 
 	RADEON_SWITCH_TO_2D();
 
-	FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), y, y + h, info->accel_state->vsync);
+	if (info->accel_state->vsync)
+	    FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), y, y + h);
 
 	while ((buf = RADEONHostDataBlit(pScrn,
 					 cpp, w, dst_pitch_off, &buf_pitch,
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index c44502c..6895ea5 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -2069,7 +2069,8 @@ static void FUNC_NAME(RadeonCompositeTile)(PixmapPtr pDst,
     } else
 	vtx_count = 4;
 
-    FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), dstY, dstY + h, info->accel_state->vsync);
+    if (info->accel_state->vsync)
+	FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), dstY, dstY + h);
 
 #ifdef ACCEL_CP
     if (info->ChipFamily < CHIP_FAMILY_R200) {
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index c6ed472..f55ae12 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -1475,16 +1475,16 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
 	}
     }
 
-    FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap,
-				  radeon_covering_crtc_num(pScrn,
-							   pPriv->drw_x,
-							   pPriv->drw_x + pPriv->dst_w,
-							   pPriv->drw_y,
-							   pPriv->drw_y + pPriv->dst_h,
-							   pPriv->desired_crtc),
-				  pPriv->drw_y,
-				  pPriv->drw_y + pPriv->dst_h,
-				  pPriv->vsync);
+    if (pPriv->vsync)
+	FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap,
+				      radeon_covering_crtc_num(pScrn,
+							       pPriv->drw_x,
+							       pPriv->drw_x + pPriv->dst_w,
+							       pPriv->drw_y,
+							       pPriv->drw_y + pPriv->dst_h,
+							       pPriv->desired_crtc),
+				      pPriv->drw_y,
+				      pPriv->drw_y + pPriv->dst_h);
 
     /*
      * Rendering of the actual polygon is done in two different
commit 5ab8699c97c050424cf813b9a60550aba32446a2
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Tue Feb 24 08:12:23 2009 +0100

    Fix compile warning when building without EXA.

diff --git a/src/radeon_legacy_memory.c b/src/radeon_legacy_memory.c
index 2a9ee94..861fd97 100644
--- a/src/radeon_legacy_memory.c
+++ b/src/radeon_legacy_memory.c
@@ -93,10 +93,10 @@ void
 radeon_legacy_free_memory(ScrnInfoPtr pScrn,
 		   void *mem_struct)
 {
-    ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
     RADEONInfoPtr info = RADEONPTR(pScrn);
-
 #ifdef USE_EXA
+    ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+
     if (info->useEXA) {
 	ExaOffscreenArea *area = mem_struct;
 


More information about the xorg-commit mailing list