summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-08-26 12:02:38 +0900
committerMichel Dänzer <michel@daenzer.net>2016-08-26 12:02:38 +0900
commit4bd2d01552f18153afa03a8947b22eebf3d67c6b (patch)
treec1a3c07f0db5d6282a2ae4c91d37bccd66b5c33d
parenta36fdaff40d5b4795a1400c348a80eee94892212 (diff)
Also handle disabled CRTCs in drmmode_clear_pending_flip
If disabling a CRTC had to be deferred due to a pending flip in drmmode_crtc_dpms, there may no longer be any outputs associated with the CRTC when we get here. So we have to check for !crtc->enabled and call drmmode_crtc_dpms in that case as well. Fixes: 9090309e057d ("Wait for pending flips to complete before turning off an output or CRTC") Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/drmmode_display.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index cb228da0..e4740461 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2181,8 +2181,9 @@ drmmode_clear_pending_flip(xf86CrtcPtr crtc)
drmmode_crtc->flip_pending = FALSE;
- if (drmmode_crtc->pending_dpms_mode != DPMSModeOn &&
- drmmode_crtc->dpms_mode != drmmode_crtc->pending_dpms_mode) {
+ if (!crtc->enabled ||
+ (drmmode_crtc->pending_dpms_mode != DPMSModeOn &&
+ drmmode_crtc->dpms_mode != drmmode_crtc->pending_dpms_mode)) {
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
int o;
@@ -2193,8 +2194,9 @@ drmmode_clear_pending_flip(xf86CrtcPtr crtc)
continue;
drmmode_output_dpms(output, drmmode_crtc->pending_dpms_mode);
- drmmode_crtc_dpms(crtc, drmmode_crtc->pending_dpms_mode);
}
+
+ drmmode_crtc_dpms(crtc, drmmode_crtc->pending_dpms_mode);
}
}