summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-04-01 15:05:38 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-04-15 11:45:52 -0400
commit7e10b6222e8f44a3ecc6aaea55a7a7680d133bb3 (patch)
tree226438748f0e626ed6648037249de7a84590a897 /src/radeon_driver.c
parent533d01a5933cd491bbc09cd463ea62475abf4bf2 (diff)
Add ForceLowPowerMode Option
Force the chip to a low power mode at the expense of performance.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r--src/radeon_driver.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index fe00dd79..ac1a151e 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -195,6 +195,7 @@ static const OptionInfoRec RADEONOptions[] = {
{ OPTION_EXA_VSYNC, "EXAVSync", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_ATOM_TVOUT, "ATOMTVOut", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_R4XX_ATOM, "R4xxATOM", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_FORCE_LOW_POWER, "ForceLowPowerMode", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -3333,6 +3334,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
else
RADEONSetClockGating(pScrn, FALSE);
+ if (xf86ReturnOptValBool(info->Options, OPTION_FORCE_LOW_POWER, FALSE))
+ RADEONStaticLowPowerMode(pScrn, TRUE);
+
if (info->allowColorTiling && (pScrn->virtualX > info->MaxSurfaceWidth)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Color tiling not supported with virtual x resolutions larger than %d, disabling\n",
@@ -5593,6 +5597,9 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
else
RADEONSetClockGating(pScrn, FALSE);
+ if (xf86ReturnOptValBool(info->Options, OPTION_FORCE_LOW_POWER, FALSE))
+ RADEONStaticLowPowerMode(pScrn, TRUE);
+
for (i = 0; i < config->num_crtc; i++)
radeon_crtc_modeset_ioctl(config->crtc[i], TRUE);
@@ -5753,6 +5760,9 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"RADEONCloseScreen\n");
+ if (xf86ReturnOptValBool(info->Options, OPTION_FORCE_LOW_POWER, FALSE))
+ RADEONStaticLowPowerMode(pScrn, FALSE);
+
/* Mark acceleration as stopped or we might try to access the engine at
* wrong times, especially if we had DRI, after DRI has been stopped
*/