From 6a0c01bbd4ed48c696c38952ee33ce21afec9f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 11 Jul 2018 18:59:58 +0200 Subject: Use drmmode_crtc_dpms in drmmode_set_desired_modes Simplifies the latter slightly. (Ported from amdgpu commit 74124f2c17dbb4b752707bb7eee398ae099e8a2c) Acked-by: Alex Deucher --- 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 cf1f6e80..25fcabfa 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -2763,7 +2763,6 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); - RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); unsigned num_desired = 0, num_on = 0; int c; @@ -2771,18 +2770,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(pRADEONEnt->fd, - drmmode_crtc->mode_crtc->crtc_id, - 0, 0, 0, NULL, 0, NULL); - drmmode_fb_reference(pRADEONEnt->fd, - &drmmode_crtc->fb, NULL); + drmmode_crtc_dpms(crtc, DPMSModeOff); } } -- cgit v1.2.3