[PATCH xf86-video-amdgpu 6/9] Skip disabled CRTCs in amdgpu_scanout_(do_)update

Michel Dänzer michel at daenzer.net
Wed Nov 11 01:30:52 PST 2015


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

The vblank / page flip ioctls don't work as expected for a disabled CRTC.

(ported from radeon commit acc11877423ecd81a6e0a7f38466f80e43efee20)

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

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 2efdbf5..3993591 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -257,7 +257,8 @@ amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id)
 	GCPtr gc;
 	BoxRec extents;
 
-	if (drmmode_crtc->dpms_mode != DPMSModeOn ||
+	if (!xf86_crtc->enabled ||
+	    drmmode_crtc->dpms_mode != DPMSModeOn ||
 	    !drmmode_crtc->scanout[scanout_id].pixmap)
 		return FALSE;
 
@@ -323,7 +324,8 @@ amdgpu_scanout_update(xf86CrtcPtr xf86_crtc)
 	DrawablePtr pDraw;
 	BoxRec extents;
 
-	if (drmmode_crtc->scanout_update_pending ||
+	if (!xf86_crtc->enabled ||
+	    drmmode_crtc->scanout_update_pending ||
 	    !drmmode_crtc->scanout[0].pixmap ||
 	    drmmode_crtc->dpms_mode != DPMSModeOn)
 		return;
-- 
2.6.2



More information about the xorg-driver-ati mailing list