From: Ben Skeggs Date: Mon, 4 Oct 2010 05:27:58 +0000 (+1000) Subject: drm/nouveau: parse voltage from perf 0x40 entires X-Git-Tag: v2.6.37-rc1~77^2~28^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca8e7c6ccdfb9a77de9b9719e6ef768373fb607c;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git drm/nouveau: parse voltage from perf 0x40 entires 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 --- diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c index 3be875f..ac62a1b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_perf.c +++ b/drivers/gpu/drm/nouveau/nouveau_perf.c @@ -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;