summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@cube.(none)>2008-04-04 18:40:16 -0400
committerAlex Deucher <alex@cube.(none)>2008-04-04 18:40:16 -0400
commitbc0407e53237d7968808110bc0243076377acf6e (patch)
treea7ead954da137b70ecfe2d131073d3c0d621d40c /src/radeon_driver.c
parent5f5e21bb50555c56bd371576074c28c929307ff1 (diff)
ATOMBIOS: Add support for DynamicClocks option
This patch adds support for dynamic clock gating and static power management using the atom command tables. In some cases the bios may already set this up during post, so YMMV. I was only able to test on desktop cards, so I haven't tested to see how much (if any) power this saves or how it affects the thermal footprint.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r--src/radeon_driver.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 9f008d4d..d5595eaa 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3067,11 +3067,16 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
RADEONBlank(pScrn);
if (info->IsMobility && !IS_AVIVO_VARIANT) {
- if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
+ if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
RADEONSetDynamicClock(pScrn, 1);
- } else {
+ } else {
RADEONSetDynamicClock(pScrn, 0);
- }
+ }
+ } else if (IS_AVIVO_VARIANT) {
+ if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
+ atombios_static_pwrmgt_setup(pScrn, 1);
+ atombios_dyn_clk_setup(pScrn, 1);
+ }
}
if (IS_R300_VARIANT || IS_RV100_VARIANT)
@@ -5173,11 +5178,16 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
RADEONWaitForIdleMMIO(pScrn);
if (info->IsMobility && !IS_AVIVO_VARIANT) {
- if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
+ if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
RADEONSetDynamicClock(pScrn, 1);
- } else {
+ } else {
RADEONSetDynamicClock(pScrn, 0);
- }
+ }
+ } else if (IS_AVIVO_VARIANT) {
+ if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
+ atombios_static_pwrmgt_setup(pScrn, 1);
+ atombios_dyn_clk_setup(pScrn, 1);
+ }
}
if (IS_R300_VARIANT || IS_RV100_VARIANT)