xf86-video-ati: Branch 'master' - 2 commits

Michel Dänzer daenzer at kemper.freedesktop.org
Thu Jun 25 00:52:36 PDT 2015


 src/drmmode_display.c |   13 ++++++++++++-
 src/radeon_kms.c      |    6 ++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit ddaba449e8d6fe9fc0d97085e4045843fd8d7af9
Author: Piotr Redlewski <predlewski at gmail.com>
Date:   Wed Jun 24 18:44:39 2015 +0200

    Disable CRTCs when disabling the outputs
    
    When turning the outputs off (DPMSModeOff), CRTCs stayed enabled. This led
    to higher gpu temperatures than with fglrx driver.
    
    v2: when entering DPMS also disable active CRTCs
    v3: use drmmode_set_mode_major() for enabling CRTCs when leaving DPMS
    
    Signed-off-by: Piotr Redlewski <predlewski at gmail.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 205ef6a..4291f4d 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -342,7 +342,18 @@ 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 */
+	if (!crtc->enabled || mode != DPMSModeOn) {
+		drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+			       0, 0, 0, NULL, 0, NULL);
+		return;
+	}
+
+	crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation,
+				    crtc->x, crtc->y);
 }
 
 static PixmapPtr
commit acc11877423ecd81a6e0a7f38466f80e43efee20
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Tue Jun 16 17:34:57 2015 +0900

    Skip disabled CRTCs in radeon_scanout_(do_)update
    
    The vblank / page flip ioctls don't work as expected for a disabled CRTC.
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 12658ca..ec8f51c 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -338,7 +338,8 @@ radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id)
     RADEONInfoPtr info;
     Bool force;
 
-    if (drmmode_crtc->dpms_mode != DPMSModeOn ||
+    if (!xf86_crtc->enabled ||
+	drmmode_crtc->dpms_mode != DPMSModeOn ||
 	!drmmode_crtc->scanout[scanout_id].pixmap)
 	return FALSE;
 
@@ -409,7 +410,8 @@ radeon_scanout_update(xf86CrtcPtr xf86_crtc)
     DrawablePtr pDraw;
     BoxRec extents;
 
-    if (drmmode_crtc->scanout_update_pending ||
+    if (!xf86_crtc->enabled ||
+	drmmode_crtc->scanout_update_pending ||
 	!drmmode_crtc->scanout[0].pixmap ||
 	drmmode_crtc->dpms_mode != DPMSModeOn)
 	return;


More information about the xorg-commit mailing list