Skip to content

Commit

Permalink
drm/nv40/pm: parse fan pwm divisor from vbios tables
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Dec 21, 2011
1 parent d0d110e commit 0c10146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/nouveau_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 0c10146

Please sign in to comment.