diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-04-15 15:52:04 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-04-15 15:52:04 -0400 |
commit | 5abcea88d1f3307a7d08ae7757c4b535df1503bf (patch) | |
tree | 5d0d5213b07d1b5a7220f536c1853f94f017ada0 /src | |
parent | bae88f81e2a01c0d547132b5b91e717ff9d0497d (diff) |
PM: don't touch clock gating regs unless ClockGating option is set
Fixes an M26 hang reported by tormod on IRC
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_pm.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/radeon_pm.c b/src/radeon_pm.c index 2fcf45a4..bd5699d2 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); } |