[PATCH xf86-video-ati 07/10] Remove throttling from radeon_dri2_copy_region2

Michel Dänzer michel at daenzer.net
Thu Jul 5 12:13:04 UTC 2018


From: Jammy Zhou <Jammy.Zhou at amd.com>

Throttling should be handled by the client-side drivers.

Signed-off-by: Jammy Zhou <Jammy.Zhou at amd.com>
(Ported from amdgpu commit 8a34a8149860ac15e83ccdbd8d9a527d8d3e5997)
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_dri2.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 3b75f66f3..6f4691276 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -336,9 +336,7 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
     Bool vsync;
     Bool translate = FALSE;
     int off_x = 0, off_y = 0;
-    PixmapPtr dst_ppix;
 
-    dst_ppix = dst_private->pixmap;
     src_drawable = &src_private->pixmap->drawable;
     dst_drawable = &dst_private->pixmap->drawable;
 
@@ -355,7 +353,6 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
 	    dst_drawable = DRI2UpdatePrime(drawable, dest_buffer);
 	    if (!dst_drawable)
 		return;
-	    dst_ppix = (PixmapPtr)dst_drawable;
 	    if (dst_drawable != drawable)
 		translate = TRUE;
 	} else
@@ -379,26 +376,7 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
     (*gc->funcs->ChangeClip) (gc, CT_REGION, copy_clip, 0);
     ValidateGC(dst_drawable, gc);
 
-    /* If this is a full buffer swap or frontbuffer flush, throttle on the
-     * previous one
-     */
-    if (dst_private->attachment == DRI2BufferFrontLeft) {
-	if (REGION_NUM_RECTS(region) == 1) {
-	    BoxPtr extents = REGION_EXTENTS(pScreen, region);
-
-	    if (extents->x1 == 0 && extents->y1 == 0 &&
-		extents->x2 == drawable->width &&
-		extents->y2 == drawable->height) {
-		struct radeon_bo *bo = radeon_get_pixmap_bo(dst_ppix);
-
-		if (bo)
-		    radeon_bo_wait(bo);
-	    }
-	}
-    }
-
     vsync = info->accel_state->vsync;
-
     /* Driver option "SwapbuffersWait" defines if we vsync DRI2 copy-swaps. */ 
     info->accel_state->vsync = info->swapBuffersWait;
     info->accel_state->force = TRUE;
-- 
2.18.0



More information about the amd-gfx mailing list