diff options
author | Francesco Marella <fmarl@paranoici.org> | 2010-09-23 11:14:22 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-09-24 10:29:06 +0400 |
commit | 4164743c8249ef2867cf71ae2cb2380b5a550b06 (patch) | |
tree | 4da7ec21fe5ca5322187cb6acc88a53a8cc7c46b /drivers/gpu/drm/nouveau/nouveau_temp.c | |
parent | 5e6a74436e378eb021a74f3e5f329eecf49d928e (diff) | |
download | linux-4164743c8249ef2867cf71ae2cb2380b5a550b06.tar.xz |
drm/nv40: fix reading temp value
Signed-off-by: Francesco Marella <fmarl@paranoici.org>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_temp.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_temp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_temp.c b/drivers/gpu/drm/nouveau/nouveau_temp.c index 3394075e4c3c..3e0f19e1c72f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_temp.c +++ b/drivers/gpu/drm/nouveau/nouveau_temp.c @@ -178,7 +178,7 @@ nouveau_nv40_sensor_setup(struct drm_device *dev) msleep(5); /* read */ - return nv_rd32(dev, 0x0015b4); + return nv_rd32(dev, 0x0015b4) & 0x1fff; } s16 @@ -197,7 +197,7 @@ nouveau_temp_get(struct drm_device *dev) if (dev_priv->chipset >= 0x50) { core_temp = nv_rd32(dev, 0x20008); } else { - core_temp = nv_rd32(dev, 0x0015b4); + core_temp = nv_rd32(dev, 0x0015b4) & 0x1fff; /* Setup the sensor if the temperature is 0 */ if (core_temp == 0) core_temp = nouveau_nv40_sensor_setup(dev); |