[PATCH xf86-video-amdgpu] Enable/disable CRTCs in DPMS hook
Piotr Redlewski
predlewski at gmail.com
Sun Jun 28 14:20:22 PDT 2015
The CRTC DPMS hook hasn't enabled or disabled hardware CRTCs.
(Based on radeon commit 48e5be1d5a82c1e0ccf6b7d52924c92a630e52a8)
Signed-off-by: Piotr Redlewski <predlewski at gmail.com>
---
src/drmmode_display.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index c418dfd..0f23296 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -300,7 +300,16 @@ drmmode_do_crtc_dpms(xf86CrtcPtr crtc, int mode)
static void
drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
{
- /* Nothing to do. drmmode_do_crtc_dpms() is called as appropriate */
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+ /* Disable unused CRTCs and enable/disable active CRTCs */
+ if (!crtc->enabled || mode != DPMSModeOn)
+ drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+ 0, 0, 0, NULL, 0, NULL);
+ else
+ crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation,
+ crtc->x, crtc->y);
}
/* TODO: currently this function only clear the front buffer to zero */
--
2.4.4
More information about the xorg-driver-ati
mailing list