Permalink
Browse files

fix voltage range

  • Loading branch information...
mlankhorst committed Apr 19, 2012
1 parent 79f17b3 commit 75bbadc0901c3e182ce88af81856953d01aa946b
Showing with 5 additions and 1 deletion.
  1. +2 −1 pscnv/nouveau_perf.c
  2. +3 −0 pscnv/nouveau_volt.c
View
@@ -377,7 +377,8 @@ nouveau_perf_init(struct drm_device *dev)
if (pm->voltage.supported && perflvl->volt_min) {
vid = nouveau_volt_vid_lookup_range(dev, perflvl->volt_min, perflvl->volt_max);
if (vid < 0) {
- NV_WARN(dev, "perflvl %d, bad vid\n", i);
+ NV_WARN(dev, "perflvl %d, bad vid (%d-%d)\n", i,
+ perflvl->volt_min, perflvl->volt_max);
continue;
}
}
View
@@ -80,6 +80,9 @@ nouveau_volt_vid_lookup_range(struct drm_device *dev, int volt_min, int volt_max
NV_WARN(dev, "volt_max %d < volt_min %d\n", volt_min, volt_max);
volt_max = volt_min;
}
+ if (volt_min == volt_max)
+ volt_max = volt_min + 500;
+
for (i = 0; i < volt->nr_level; i++) {
if (volt->level[i].voltage < volt_min ||
volt->level[i].voltage > volt_max)

0 comments on commit 75bbadc

Please sign in to comment.