xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Wed Apr 15 12:53:31 PDT 2009


 src/radeon_pm.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 5abcea88d1f3307a7d08ae7757c4b535df1503bf
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Wed Apr 15 15:52:04 2009 -0400

    PM: don't touch clock gating regs unless ClockGating option is set
    
    Fixes an M26 hang reported by tormod on IRC

diff --git a/src/radeon_pm.c b/src/radeon_pm.c
index 2fcf45a..bd5699d 100644
--- a/src/radeon_pm.c
+++ b/src/radeon_pm.c
@@ -611,13 +611,12 @@ void RADEONPMInit(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr  info       = RADEONPTR(pScrn);
 
-    if (xf86ReturnOptValBool(info->Options, OPTION_CLOCK_GATING, FALSE))
+    if (xf86ReturnOptValBool(info->Options, OPTION_CLOCK_GATING, FALSE)) {
 	info->pm.clock_gating_enabled = TRUE;
-    else
+	RADEONSetClockGating(pScrn, info->pm.clock_gating_enabled);
+    } else
 	info->pm.clock_gating_enabled = FALSE;
 
-    RADEONSetClockGating(pScrn, info->pm.clock_gating_enabled);
-
     info->pm.mode[0].type = POWER_DEFAULT;
     info->pm.mode[0].sclk = (uint32_t)info->sclk * 100; /* 10 khz */
     info->pm.mode[0].mclk = (uint32_t)info->mclk * 100; /* 10 khz */
@@ -670,7 +669,8 @@ void RADEONPMEnterVT(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr  info       = RADEONPTR(pScrn);
 
-    RADEONSetClockGating(pScrn, info->pm.clock_gating_enabled);
+    if (info->pm.clock_gating_enabled)
+	RADEONSetClockGating(pScrn, info->pm.clock_gating_enabled);
     if (info->pm.force_low_power_enabled || info->pm.dynamic_mode_enabled)
 	RADEONSetStaticPowerMode(pScrn, POWER_HIGH);
 }
@@ -679,7 +679,8 @@ void RADEONPMLeaveVT(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr  info       = RADEONPTR(pScrn);
 
-    RADEONSetClockGating(pScrn, FALSE);
+    if (info->pm.clock_gating_enabled)
+	RADEONSetClockGating(pScrn, FALSE);
     if (info->pm.force_low_power_enabled || info->pm.dynamic_mode_enabled)
 	RADEONSetStaticPowerMode(pScrn, POWER_DEFAULT);
 }
@@ -688,7 +689,8 @@ void RADEONPMFini(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr info = RADEONPTR(pScrn);
 
-    RADEONSetClockGating(pScrn, FALSE);
+    if (info->pm.clock_gating_enabled)
+	RADEONSetClockGating(pScrn, FALSE);
     if (info->pm.force_low_power_enabled || info->pm.dynamic_mode_enabled)
 	RADEONSetStaticPowerMode(pScrn, POWER_DEFAULT);
 }


More information about the xorg-commit mailing list