diff options
author | Piotr Redlewski <predlewski@gmail.com> | 2015-07-06 19:57:07 +0200 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2015-07-07 11:16:41 +0900 |
commit | a8ed62010d5012dfb27773595c446b217f3c00c5 (patch) | |
tree | 45fe3f3014c9f84d7d87bf01f383cfe113be991d /src | |
parent | fc07c370dac4649511eb7322d05a61605a539f39 (diff) |
Do not try to enable already enabled CRTCs in DPMS hook
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91227
Signed-off-by: Piotr Redlewski <predlewski@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drmmode_display.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 4291f4d3..84839091 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -346,14 +346,12 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode) drmmode_ptr drmmode = drmmode_crtc->drmmode; /* Disable unused CRTCs */ - if (!crtc->enabled || mode != DPMSModeOn) { + if (!crtc->enabled || mode != DPMSModeOn) drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0, NULL, 0, NULL); - return; - } - - crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation, - crtc->x, crtc->y); + else if (drmmode_crtc->dpms_mode != DPMSModeOn) + crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation, + crtc->x, crtc->y); } static PixmapPtr |