Commit a02982b0 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

Skip disabled CRTCs in amdgpu_scanout_(do_)update



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

(ported from radeon commit acc11877423ecd81a6e0a7f38466f80e43efee20)
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0ddd2060
...@@ -257,7 +257,8 @@ amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id) ...@@ -257,7 +257,8 @@ amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id)
GCPtr gc; GCPtr gc;
BoxRec extents; BoxRec extents;
if (drmmode_crtc->dpms_mode != DPMSModeOn || if (!xf86_crtc->enabled ||
drmmode_crtc->dpms_mode != DPMSModeOn ||
!drmmode_crtc->scanout[scanout_id].pixmap) !drmmode_crtc->scanout[scanout_id].pixmap)
return FALSE; return FALSE;
...@@ -323,7 +324,8 @@ amdgpu_scanout_update(xf86CrtcPtr xf86_crtc) ...@@ -323,7 +324,8 @@ amdgpu_scanout_update(xf86CrtcPtr xf86_crtc)
DrawablePtr pDraw; DrawablePtr pDraw;
BoxRec extents; BoxRec extents;
if (drmmode_crtc->scanout_update_pending || if (!xf86_crtc->enabled ||
drmmode_crtc->scanout_update_pending ||
!drmmode_crtc->scanout[0].pixmap || !drmmode_crtc->scanout[0].pixmap ||
drmmode_crtc->dpms_mode != DPMSModeOn) drmmode_crtc->dpms_mode != DPMSModeOn)
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment