drm/nouveau/clk: Don't create cstates with voltages higher than what the gpu can do

nvkm_volt_map_min is a copy of nvkm_volt_map, which always returns the
lowest possible voltage for a cstate.

nvkm_volt_map will get a temperature parameter there later and also fix
the voltage calculation, so that this functions will be completly
different later.

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Martin Peres <martin.peres@free.fr>
Tested-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Karol Herbst
2016-07-12 21:36:08 +02:00
committed by Ben Skeggs
parent 17f486de6a
commit 17d063dbdc
3 changed files with 27 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ struct nvkm_volt {
u32 min_uv;
};
int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);
int nvkm_volt_get(struct nvkm_volt *);
int nvkm_volt_set_id(struct nvkm_volt *, u8 id, int condition);