From 0c101461e267850925218d6a6872c379f2498b16 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 28 Jul 2011 10:17:40 +1000 Subject: drm/nv40/pm: parse fan pwm divisor from vbios tables Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_perf.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index dfddb7e078a..999bcb6a20b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -525,6 +525,7 @@ struct nouveau_pm_engine { struct nouveau_pm_memtimings memtimings; struct nouveau_pm_temp_sensor_constants sensor_constants; struct nouveau_pm_threshold_temp threshold_temp; + u32 pwm_divisor; struct nouveau_pm_level boot; struct nouveau_pm_level *cur; diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c index 33d03fbf00d..3d20dca08fe 100644 --- a/drivers/gpu/drm/nouveau/nouveau_perf.c +++ b/drivers/gpu/drm/nouveau/nouveau_perf.c @@ -210,6 +210,9 @@ nouveau_perf_init(struct drm_device *dev) recordlen = perf[2] + (perf[3] * perf[4]); entries = perf[5]; } + + if (version < 0x30) + pm->pwm_divisor = ROM16(perf[6]); } else { if (bios->data[bios->offset + 6] < 0x25) { legacy_perf_init(dev); @@ -283,7 +286,6 @@ nouveau_perf_init(struct drm_device *dev) perflvl->memory = ROM16(entry[11]) * 1000; else perflvl->memory = ROM16(entry[11]) * 2000; - break; case 0x25: perflvl->fanspeed = entry[4]; -- cgit v1.2.3-70-g09d2