Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269593
b: refs/heads/master
c: 03ce8d9
h: refs/heads/master
i:
  269591: 573062c
v: v3
  • Loading branch information
Ben Skeggs committed Sep 20, 2011
1 parent cbaad24 commit 0894203
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da1dc4cfecdf314241cc5e0c5df1f66b4cc80cc7
refs/heads/master: 03ce8d9e63199fd5983129941a6694123b885753
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ struct nouveau_pm_voltage_level {

struct nouveau_pm_voltage {
bool supported;
u8 version;
u8 vid_mask;

struct nouveau_pm_voltage_level *level;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,16 @@ nouveau_perf_voltage(struct drm_device *dev, struct bit_entry *P,
id = perflvl->volt_min;
perflvl->volt_min = 0;

/* pre-fermi vbios stores the voltage level directly in the
* perflvl entry as a multiple of 10mV
/* boards using voltage table version <0x40 store the voltage
* level directly in the perflvl entry as a multiple of 10mV
*/
if (dev_priv->card_type < NV_C0) {
if (dev_priv->engine.pm.voltage.version < 0x40) {
perflvl->volt_min = id * 10000;
perflvl->volt_max = perflvl->volt_min;
return;
}

/* from fermi onwards, the perflvl stores an index into yet another
/* on newer ones, the perflvl stores an index into yet another
* vbios table containing a min/max voltage value for the perflvl
*/
if (P->version != 2 || P->length < 34) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_volt.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ nouveau_volt_init(struct drm_device *dev)
}

/* parse vbios entries into common format */
if (volt[0] < 0x40) {
voltage->version = volt[0];
if (voltage->version < 0x40) {
voltage->nr_level = entries;
voltage->level =
kcalloc(entries, sizeof(*voltage->level), GFP_KERNEL);
Expand Down

0 comments on commit 0894203

Please sign in to comment.