drm/nouveau/volt: Parse the max voltage map entries

There are at least three "max" entries, which specify the max voltage.
Because they are actually normal voltage map entries, they can also be
affected by the temperature.

Nvidia respects those entries and if they get changed, nvidia uses the
lower voltage from all three.

We shouldn't exceed those voltages at any given time.

v2: State what those entries do in the source.
v3: Add the third max entry.
v5: Better describe the entries.

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
このコミットが含まれているのは:
Karol Herbst
2016-07-12 21:36:08 +02:00
committed by Ben Skeggs
コミット 4a4555a7f1
4個のファイルの変更36行の追加0行の削除

ファイルの表示

@@ -1,6 +1,9 @@
#ifndef __NVBIOS_VMAP_H__
#define __NVBIOS_VMAP_H__
struct nvbios_vmap {
u8 max0;
u8 max1;
u8 max2;
};
u16 nvbios_vmap_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);

ファイルの表示

@@ -15,6 +15,16 @@ struct nvkm_volt {
u32 max_uv;
u32 min_uv;
/*
* These are fully functional map entries creating a sw ceiling for
* the voltage. These all can describe different kind of curves, so
* that for any given temperature a different one can return the lowest
* value of all three.
*/
u8 max0_id;
u8 max1_id;
u8 max2_id;
};
int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);