summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-07-10 18:48:16 +0200
committerMichel Dänzer <michel@daenzer.net>2018-07-12 18:06:39 +0200
commite07c38649280b3f4361005bc4c256f2145a72537 (patch)
treed5da3e61f6f5a5ed2a69e7e6a755d3a9d5b1a9ff /src/drmmode_display.c
parent05390ae36a0abb19f1d533ff95a3fceaafdf79c8 (diff)
Update RandR CRTC state if set_mode_major fails in set_desired_modes
Without this, RandR would report the CRTC and its outputs as enabled, even though they were actually off due to the failure. (Cherry picked from amdgpu commit 4dcda0b48d62944c841cd9540f4ad4c7ac8dee47) Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 64dab316..fa05cda4 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2833,6 +2833,8 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
} else {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Failed to set mode on CRTC %d\n", c);
+ RRCrtcSet(crtc->randr_crtc, NULL, crtc->x, crtc->y,
+ crtc->rotation, 0, NULL);
}
} else {
crtc->mode = crtc->desiredMode;