[PATCH r128] Only enable CRTCs for DPMSModeOn

Connor Behan connor.behan at gmail.com
Fri Jul 4 18:45:34 PDT 2014


This was suggested as a power saving tip.

Signed-off-by: Connor Behan <connor.behan at gmail.com>
---
 src/r128_crtc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/r128_crtc.c b/src/r128_crtc.c
index 882f01f..9c3d0a9 100644
--- a/src/r128_crtc.c
+++ b/src/r128_crtc.c
@@ -84,6 +84,20 @@ static void r128_crtc_dpms(xf86CrtcPtr crtc, int mode)
         break;
     }
 
+    if (mode != DPMSModeOn) {
+        if (r128_crtc->crtc_id) {
+            OUTREGP(R128_CRTC2_GEN_CNTL, 0, ~R128_CRTC2_EN);
+        } else {
+            OUTREGP(R128_CRTC_GEN_CNTL, 0, ~R128_CRTC_EN);
+        }
+    } else {
+        if (r128_crtc->crtc_id) {
+            OUTREGP(R128_CRTC2_GEN_CNTL, R128_CRTC2_EN, ~R128_CRTC2_EN);
+        } else {
+            OUTREGP(R128_CRTC_GEN_CNTL, R128_CRTC_EN, ~R128_CRTC_EN);
+        }
+    }
+
     if (mode != DPMSModeOff)
         r128_crtc_load_lut(crtc);
 }
-- 
2.0.0



More information about the xorg-driver-ati mailing list