Browse Source

drm/nva3/pm: fixup for NVAF special

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 14 years ago
parent
commit
378f85ed54
1 changed files with 7 additions and 1 deletions
  1. 7 1
      drivers/gpu/drm/nouveau/nva3_pm.c

+ 7 - 1
drivers/gpu/drm/nouveau/nva3_pm.c

@@ -46,8 +46,14 @@ read_clk(struct drm_device *dev, int clk, bool ignore_en)
 	u32 sctl, sdiv, sclk;
 
 	/* refclk for the 0xe8xx plls is a fixed frequency */
-	if (clk >= 0x40)
+	if (clk >= 0x40) {
+		if (dev_priv->chipset == 0xaf) {
+			/* no joke.. seriously.. sigh.. */
+			return nv_rd32(dev, 0x00471c) * 1000;
+		}
+
 		return dev_priv->crystal;
+	}
 
 	sctl = nv_rd32(dev, 0x4120 + (clk * 4));
 	if (!ignore_en && !(sctl & 0x00000100))