diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-04-01 15:05:38 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-04-15 11:45:52 -0400 |
commit | 7e10b6222e8f44a3ecc6aaea55a7a7680d133bb3 (patch) | |
tree | 226438748f0e626ed6648037249de7a84590a897 /src/radeon_pm.c | |
parent | 533d01a5933cd491bbc09cd463ea62475abf4bf2 (diff) |
Add ForceLowPowerMode Option
Force the chip to a low power mode at the expense
of performance.
Diffstat (limited to 'src/radeon_pm.c')
-rw-r--r-- | src/radeon_pm.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/radeon_pm.c b/src/radeon_pm.c index 89e1d8ab..86d739b2 100644 --- a/src/radeon_pm.c +++ b/src/radeon_pm.c @@ -476,3 +476,29 @@ RADEONSetClockGating(ScrnInfoPtr pScrn, Bool enable) enable ? "En" : "Dis"); } +void RADEONStaticLowPowerMode(ScrnInfoPtr pScrn, Bool enable) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + int sclk = (int)info->sclk * 100; /* 10 khz */ + + RADEONWaitForIdleMMIO(pScrn); + + if (enable) { + if (info->IsAtomBios) + atombios_set_engine_clock(pScrn, sclk/2); + else + RADEONSetEngineClock(pScrn, sclk/2); + + info->low_power_mode = TRUE; + } else { + if (info->IsAtomBios) + atombios_set_engine_clock(pScrn, sclk); + else + RADEONSetEngineClock(pScrn, sclk); + + info->low_power_mode = FALSE; + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Low Power Mode %sabled\n", + enable ? "En" : "Dis"); +} |