drm/nouveau: parse voltage from perf 0x40 entires
authorBen Skeggs <bskeggs@redhat.com>
Mon, 4 Oct 2010 05:27:58 +0000 (15:27 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 4 Oct 2010 23:59:39 +0000 (09:59 +1000)
This was disabled previously because of some uncertainty that +2 was
indeed the voltage.  It appears it is, checked on a NVA8 and a NVA3M.

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

index 3be875f1d98346f2af0d623496641289955cce85..ac62a1b8c4fc307afad07c9fafbb034f3301efcb 100644 (file)
@@ -173,7 +173,7 @@ nouveau_perf_init(struct drm_device *dev)
                case 0x40:
 #define subent(n) entry[perf[2] + ((n) * perf[3])]
                        perflvl->fanspeed = 0; /*XXX*/
-                       perflvl->voltage = 0; /*XXX: entry[2] */;
+                       perflvl->voltage = entry[2];
                        perflvl->core = (ROM16(subent(0)) & 0xfff) * 1000;
                        perflvl->shader = (ROM16(subent(1)) & 0xfff) * 1000;
                        perflvl->memory = (ROM16(subent(2)) & 0xfff) * 1000;