diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-09-07 18:49:54 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-09-09 19:02:19 +0900 |
commit | 9565981f751b0884cbfa885b8f3af3d41a965a2b (patch) | |
tree | 162cec4b90c58d9f42f4f6cb66509306b91cd7e4 /src/amdgpu_kms.c | |
parent | c7d27c94cb656899746898c2e55407c3e3d7cdc8 (diff) |
Wait for pending flips to complete before turning off an output or CRTC
At least with older kernels, the flip may never complete otherwise,
which can result in us hanging in drmmode_set_mode_major.
Fixes: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1577170
(Ported from radeon commits 9090309e057dc703d1a5bffd88e6cae14108cfc3,
e520ce0ec0adf91ddce5c932d4b3f9477fd49304,
a36fdaff40d5b4795a1400c348a80eee94892212 and
4bd2d01552f18153afa03a8947b22eebf3d67c6b)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_kms.c')
-rw-r--r-- | src/amdgpu_kms.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index d557313..1bce781 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -366,7 +366,7 @@ amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id) BoxRec extents; if (!xf86_crtc->enabled || - drmmode_crtc->dpms_mode != DPMSModeOn || + drmmode_crtc->pending_dpms_mode != DPMSModeOn || !drmmode_crtc->scanout[scanout_id].pixmap) return FALSE; @@ -485,7 +485,7 @@ amdgpu_scanout_update(xf86CrtcPtr xf86_crtc) if (!xf86_crtc->enabled || drmmode_crtc->scanout_update_pending || !drmmode_crtc->scanout[0].pixmap || - drmmode_crtc->dpms_mode != DPMSModeOn) + drmmode_crtc->pending_dpms_mode != DPMSModeOn) return; pDamage = drmmode_crtc->scanout[0].damage; @@ -537,7 +537,7 @@ amdgpu_scanout_flip_abort(xf86CrtcPtr crtc, void *event_data) drmmode_crtc_private_ptr drmmode_crtc = event_data; drmmode_crtc->scanout_update_pending = FALSE; - drmmode_crtc->flip_pending = FALSE; + drmmode_clear_pending_flip(crtc); } static void |