diff options
author | Martin Peres <martin.peres@free.fr> | 2014-08-24 21:15:11 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-09-15 12:25:02 (GMT) |
commit | 3a405258b2baa71e8f042f0b55392d40e3f99f3e (patch) | |
tree | 91b57627af5b56b0854a9b3c300af48c4e19ba76 /drivers | |
parent | c5b4865e20d47b7ebc1ad78602b744e0b4307224 (diff) | |
download | linux-3a405258b2baa71e8f042f0b55392d40e3f99f3e.tar.xz |
drm/nouveau/therm/nv84+: do not expose non-calibrated internal temp sensor
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c index 38b16d9..14e2e09 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c +++ b/drivers/gpu/drm/nouveau/core/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 |