Reviewed-by: Pierre Moreau <pierre.mor...@free.fr>
On 2017-09-15 — 17:11, Karol Herbst wrote: > Depending on the temperature, cstates might become unreachable or the maped > voltage of a cstate changes. We want to adjust to that. > > Signed-off-by: Karol Herbst <karolher...@gmail.com> > Reviewed-by: Martin Peres <martin.pe...@free.fr> > --- > drm/nouveau/nvkm/subdev/therm/base.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drm/nouveau/nvkm/subdev/therm/base.c > b/drm/nouveau/nvkm/subdev/therm/base.c > index 59f01fec..c90b9cfc 100644 > --- a/drm/nouveau/nvkm/subdev/therm/base.c > +++ b/drm/nouveau/nvkm/subdev/therm/base.c > @@ -23,6 +23,8 @@ > */ > #include "priv.h" > > +#include <subdev/clk.h> > + > int > nvkm_therm_temp_get(struct nvkm_therm *therm, int *val) > { > @@ -168,9 +170,15 @@ nvkm_therm_alarm(struct nvkm_alarm *alarm) > int temp; > struct nvkm_therm *therm = > container_of(alarm, struct nvkm_therm, alarm); > + struct nvkm_clk *clk = therm->subdev.device->clk; > + > if (nvkm_therm_temp_get(therm, &temp) >= 0) > therm->last_temp = temp; > + > nvkm_therm_update(therm, therm->last_temp, -1); > + > + if (clk) > + nvkm_clk_tstate(clk, therm->last_temp); > } > > int > -- > 2.14.1 > > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
signature.asc
Description: PGP signature
_______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau