diff options
author | Karol Herbst <karolherbst@gmail.com> | 2016-07-16 15:26:25 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-10-12 09:29:24 +0200 |
commit | 1f7f3d91ad38afc706f838fb5a642b21d28e4485 (patch) | |
tree | 2e9b734e2d52c66b5d91687416d6d6db2c01fc1e /drivers/gpu/drm/nouveau/include | |
parent | drm/nouveau/clk: Fixup cstate selection (diff) | |
download | linux-1f7f3d91ad38afc706f838fb5a642b21d28e4485.tar.xz linux-1f7f3d91ad38afc706f838fb5a642b21d28e4485.zip |
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/include')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h index 6fd933df763e..441f6e7079d2 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h @@ -27,6 +27,7 @@ struct nvkm_volt { u8 max2_id; }; +int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature); 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, u8 min_id, u8 temp, |