summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-11-03 09:44:32 +1000
committerDave Airlie <airlied@redhat.com>2008-11-03 09:44:32 +1000
commitbe3dac976e07fbfd727a2d0216ea9ba3247db348 (patch)
tree93bb6aea8f918df43d90f83dd05a28f9581bbe5f
parent31f8d4218c0f6455751d8bbc788172912359b0df (diff)
radeon: only enable dynclks if asked for
-rw-r--r--linux-core/radeon_drv.c2
-rw-r--r--shared-core/radeon_cp.c26
2 files changed, 16 insertions, 12 deletions
diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c
index f1fe3012..daa335b9 100644
--- a/linux-core/radeon_drv.c
+++ b/linux-core/radeon_drv.c
@@ -37,7 +37,7 @@
#include "drm_pciids.h"
int radeon_no_wb;
-int radeon_dynclks = 1;
+int radeon_dynclks = -1;
int radeon_r4xx_atom = 0;
int radeon_agpmode = 0;
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 942ccc51..3f8f0c94 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -2601,19 +2601,23 @@ int radeon_static_clocks_init(struct drm_device *dev)
{
drm_radeon_private_t *dev_priv = dev->dev_private;
- if (dev_priv->chip_family == CHIP_RS400 ||
- dev_priv->chip_family == CHIP_RS480)
- radeon_dynclks = 0;
-
- if ((dev_priv->flags & RADEON_IS_MOBILITY) && !radeon_is_avivo(dev_priv)) {
- radeon_set_dynamic_clock(dev, radeon_dynclks);
- } else if (radeon_is_avivo(dev_priv)) {
- if (radeon_dynclks) {
- radeon_atom_static_pwrmgt_setup(dev, 1);
- radeon_atom_dyn_clk_setup(dev, 1);
+ if (radeon_dynclks != -1) {
+
+ if (dev_priv->chip_family == CHIP_RS400 ||
+ dev_priv->chip_family == CHIP_RS480)
+ radeon_dynclks = 0;
+
+ if ((dev_priv->flags & RADEON_IS_MOBILITY) && !radeon_is_avivo(dev_priv)) {
+ radeon_set_dynamic_clock(dev, radeon_dynclks);
+ } else if (radeon_is_avivo(dev_priv)) {
+ if (radeon_dynclks) {
+ radeon_atom_static_pwrmgt_setup(dev, 1);
+ radeon_atom_dyn_clk_setup(dev, 1);
+ }
}
}
- radeon_force_some_clocks(dev);
+ if (radeon_is_r300(dev_priv) || radeon_is_rv100(dev_priv))
+ radeon_force_some_clocks(dev);
return 0;
}