[Nouveau] [RFC PATCH 14/29] therm: Trigger reclock in temperature daemon
Pierre Moreau
pierre.morrow at free.fr
Sun Oct 8 18:13:51 UTC 2017
Reviewed-by: Pierre Moreau <pierre.morrow at 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 <karolherbst at gmail.com>
> Reviewed-by: Martin Peres <martin.peres at 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20171008/121f1ee7/attachment.sig>
More information about the Nouveau
mailing list