[PATCH xf86-video-amdgpu 2/2] Use drmmode_crtc_dpms in drmmode_set_desired_modes
Michel Dänzer
michel at daenzer.net
Fri May 18 10:33:54 UTC 2018
From: Michel Dänzer <michel.daenzer at amd.com>
Simplifies the latter slightly.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/drmmode_display.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 5d4627810..8a1a201a8 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);
}
}
--
2.17.0
More information about the amd-gfx
mailing list