drm/nv40/pm: parse geometric delta clock from vbios
authorBen Skeggs <bskeggs@redhat.com>
Mon, 18 Jul 2011 06:02:37 +0000 (16:02 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 20 Sep 2011 06:10:40 +0000 (16:10 +1000)
This changes the meaning of what we reported as "core" clock previously.

The shader/rop units are allegedly supposed to be run at the base clock
listed in the perf table, while the geometric clock can be bumped from
this value on some boards.

So that we can report both, we'll report the base clock as "shader" (since
the shaders *do* run at it), and the geometric clock as "core".

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_perf.c

index 854ca8573168655f8d7ebf51b1d547e58a1995c5..9f178aa94162cdc69ac943066272fd3ba899a062 100644 (file)
@@ -275,8 +275,9 @@ nouveau_perf_init(struct drm_device *dev)
                case 0x24:
                        perflvl->fanspeed = entry[4];
                        perflvl->volt_min = entry[5];
-                       perflvl->core = ROM16(entry[6]) * 1000;
-
+                       perflvl->shader = ROM16(entry[6]) * 1000;
+                       perflvl->core = perflvl->shader;
+                       perflvl->core += (signed char)entry[8] * 1000;
                        if (dev_priv->chipset == 0x49 ||
                            dev_priv->chipset == 0x4b)
                                perflvl->memory = ROM16(entry[11]) * 1000;