[PATCH xf86-video-amdgpu 3/4] Call ValidateGC after ChangeClip in amdgpu_sync_scanout_pixmaps

Michel Dänzer michel at daenzer.net
Wed Nov 30 07:42:02 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

The wrong order meant that the clipping region wasn't actually applied,
so it always copied the full contents from the other scanout pixmap.

(Ported from radeon commit 14c3f59f5157885ad8f941f0bad6c0c5e3db12f8)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 8a2fd30..f8556c9 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -403,8 +403,8 @@ amdgpu_sync_scanout_pixmaps(xf86CrtcPtr xf86_crtc, RegionPtr new_region,
 
 	gc = GetScratchGC(dst->depth, pScreen);
 	if (gc) {
-		ValidateGC(dst, gc);
 		gc->funcs->ChangeClip(gc, CT_REGION, sync_region, 0);
+		ValidateGC(dst, gc);
 		sync_region = NULL;
 		gc->ops->CopyArea(src, dst, gc, 0, 0, dst->width, dst->height, 0, 0);
 		FreeScratchGC(gc);
-- 
2.10.2



More information about the amd-gfx mailing list