xf86-video-amdgpu: Branch 'master' - 2 commits
Michel Dänzer
daenzer at kemper.freedesktop.org
Thu May 24 15:05:41 UTC 2018
src/drmmode_display.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
New commits:
commit 74124f2c17dbb4b752707bb7eee398ae099e8a2c
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri May 18 12:31:57 2018 +0200
Use drmmode_crtc_dpms in drmmode_set_desired_modes
Simplifies the latter slightly.
Reviewed-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 5d46278..8a1a201 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2660,7 +2660,6 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
Bool set_hw)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
unsigned num_desired = 0, num_on = 0;
int c;
@@ -2668,18 +2667,12 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
if (set_hw) {
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
/* Skip disabled CRTCs */
if (crtc->enabled)
continue;
- drmmode_do_crtc_dpms(crtc, DPMSModeOff);
- drmModeSetCrtc(pAMDGPUEnt->fd,
- drmmode_crtc->mode_crtc->crtc_id,
- 0, 0, 0, NULL, 0, NULL);
- drmmode_fb_reference(pAMDGPUEnt->fd,
- &drmmode_crtc->fb, NULL);
+ drmmode_crtc_dpms(crtc, DPMSModeOff);
}
}
commit ceeacb455cd058492a493aac954deab8455804b5
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri May 18 12:13:23 2018 +0200
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 at amd.com>
Reviewed-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 0ee8996..5d46278 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -342,8 +342,7 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
/* Disable unused CRTCs and enable/disable active CRTCs */
if (!crtc->enabled || mode != DPMSModeOn) {
- drmmode_crtc_wait_pending_event(drmmode_crtc, pAMDGPUEnt->fd,
- drmmode_crtc->flip_pending);
+ drmmode_do_crtc_dpms(crtc, DPMSModeOff);
drmModeSetCrtc(pAMDGPUEnt->fd, drmmode_crtc->mode_crtc->crtc_id,
0, 0, 0, NULL, 0, NULL);
drmmode_fb_reference(pAMDGPUEnt->fd, &drmmode_crtc->fb, NULL);
More information about the xorg-commit
mailing list