[PATCH xf86-video-ati 14/15] Clear damage in radeon_scanout_update if it doesn't intersect the CRTC

Michel Dänzer michel at daenzer.net
Wed Sep 21 09:50:53 UTC 2016


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

There's no need to test that same damage again.

(Ported from amdgpu commit a576430526cbc404de64b30e1377a356644e8024)

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

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 384e02f..faa1e0f 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -999,8 +999,10 @@ radeon_scanout_update(xf86CrtcPtr xf86_crtc)
 	return;
 
     extents = *RegionExtents(pRegion);
-    if (!radeon_scanout_extents_intersect(xf86_crtc, &extents))
+    if (!radeon_scanout_extents_intersect(xf86_crtc, &extents)) {
+	RegionEmpty(pRegion);
 	return;
+    }
 
     scrn = xf86_crtc->scrn;
     drm_queue_seq = radeon_drm_queue_alloc(xf86_crtc,
-- 
2.9.3



More information about the amd-gfx mailing list