summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
diff options
context:
space:
mode:
authorKarol Herbst <karolherbst@gmail.com>2016-07-16 15:26:25 +0200
committerBen Skeggs <bskeggs@redhat.com>2016-10-12 17:29:24 +1000
commit1f7f3d91ad38afc706f838fb5a642b21d28e4485 (patch)
tree2e9b734e2d52c66b5d91687416d6d6db2c01fc1e /drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
parent0d6f81003e9ecc2d6552be92d3d894c916097552 (diff)
drm/nouveau/clk: Respect voltage limits in nvkm_cstate_prog
We should never allow to select a cstate which current voltage (depending on the temperature) is higher than 1. the max volt entries in the voltage map table. 2. what tha gpu actually can volt to. v3: Use find_best for all cstates before actually trying. Add nvkm_cstate_get function to get cstate by index. v5: Cstates with voltages lower then min_uv are valid. Move nvkm_cstate_get into the previous commit. Signed-off-by: Karol Herbst <karolherbst@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
index 40ba088a5c81..5e07bd3aaccc 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
@@ -88,7 +88,7 @@ nvkm_volt_map_min(struct nvkm_volt *volt, u8 id)
return id ? id * 10000 : -ENODEV;
}
-static int
+int
nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp)
{
struct nvkm_bios *bios = volt->subdev.device->bios;