[Nouveau] [PATCH 3/3] therm/nv84+: do not expose non-calibrated internal temp sensor

Ben Skeggs skeggsb at gmail.com
Wed Aug 27 15:53:12 PDT 2014


On Mon, Aug 25, 2014 at 7:15 AM, Martin Peres <martin.peres at free.fr> wrote:
> Signed-off-by: Martin Peres <martin.peres at free.fr>
Hey Martin,

Merged all three patches.

Thanks :)

> ---
>  nvkm/subdev/therm/nv84.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/nvkm/subdev/therm/nv84.c b/nvkm/subdev/therm/nv84.c
> index 38b16d9..14e2e09 100644
> --- a/nvkm/subdev/therm/nv84.c
> +++ b/nvkm/subdev/therm/nv84.c
> @@ -33,7 +33,12 @@ struct nv84_therm_priv {
>  int
>  nv84_temp_get(struct nouveau_therm *therm)
>  {
> -       return nv_rd32(therm, 0x20400);
> +       struct nouveau_fuse *fuse = nouveau_fuse(therm);
> +
> +       if (nv_ro32(fuse, 0x1a8) == 1)
> +               return nv_rd32(therm, 0x20400);
> +       else
> +               return -ENODEV;
>  }
>
>  void
> --
> 2.0.0
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list