[PATCH] Radeon 11/11 : Do not play with dynamic clocks on non-mobility chips

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Dec 5 02:00:13 PST 2004


I added this patch by Alex Deucher since it also adds a couple of fixes that were
part of my patch set previously and should be merged asap. It prevents playing
with dynamic clocks on non-mobility chips, make sure we don't toy with the
dynamic clocks on the second instance of the driver on dual head (usually reverting
whatever we did on the first instance) and fix a bit definition of a register
related to the dynamic clocking.

Index: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
===================================================================
--- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2004-12-05 20:49:58.439158160 +1100
+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2004-12-05 20:50:01.719659448 +1100
@@ -4785,10 +4785,12 @@
 
     RADEONSave(pScrn);
 
-    if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
-	RADEONSetDynamicClock(pScrn, 1);
-    } else {
-	RADEONSetDynamicClock(pScrn, 0);
+    if ((!info->IsSecondary) && info->IsMobility) {
+        if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
+	    RADEONSetDynamicClock(pScrn, 1);
+        } else {
+	    RADEONSetDynamicClock(pScrn, 0);
+        }
     }
 
     if (info->FBDev) {
Index: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h
===================================================================
--- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h	2004-10-25 04:17:36.000000000 +1000
+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h	2004-12-05 20:50:01.728658080 +1100
@@ -821,7 +821,7 @@
 #       define RADEON_MC_MCLK_MAX_DYN_STOP_LAT (1<<12)
 #       define RADEON_IO_MCLK_MAX_DYN_STOP_LAT (1<<13)
 #       define RADEON_MC_MCLK_DYN_ENABLE    (1 << 14)
-#       define RADEON_IO_MCLK_DYN_ENABLE    (1 << 14)
+#       define RADEON_IO_MCLK_DYN_ENABLE    (1 << 15)
 #define RADEON_MDGPIO_A_REG                 0x01ac
 #define RADEON_MDGPIO_EN_REG                0x01b0
 #define RADEON_MDGPIO_MASK                  0x0198





More information about the xorg mailing list