diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-07-11 18:58:20 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-07-12 18:08:55 +0200 |
commit | 59441ee3dae15e0e81ed20688b0ba6dba12d7917 (patch) | |
tree | 017816ff2902aa32d659806b2f7a3dd5ec5a0021 /src | |
parent | 4050b0ad51b1c65945c6474981d1228888738cd4 (diff) |
Call drmmode_do_crtc_dpms from drmmode_crtc_dpms as well
Leo pointed out that drmmode_do_crtc_dpms wasn't getting called when
turning off an output with
xrandr --output <output> --off
This meant that the vblank sequence number and timestamp wouldn't be
saved before turning off the CRTC in this case.
Reported-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
(Ported from amdgpu commit ceeacb455cd058492a493aac954deab8455804b5)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drmmode_display.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 3117b8f1..cf1f6e80 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -361,8 +361,7 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode) /* Disable unused CRTCs */ if (!crtc->enabled || mode != DPMSModeOn) { - drmmode_crtc_wait_pending_event(drmmode_crtc, pRADEONEnt->fd, - drmmode_crtc->flip_pending); + drmmode_do_crtc_dpms(crtc, DPMSModeOff); drmModeSetCrtc(pRADEONEnt->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0, NULL, 0, NULL); drmmode_fb_reference(pRADEONEnt->fd, &drmmode_crtc->fb, NULL); |