aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorFrancesco Marella <fmarl@paranoici.org>2010-09-23 03:14:22 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-09-24 02:29:06 -0400
commit4164743c8249ef2867cf71ae2cb2380b5a550b06 (patch)
tree4da7ec21fe5ca5322187cb6acc88a53a8cc7c46b /drivers/gpu/drm/nouveau
parent5e6a74436e378eb021a74f3e5f329eecf49d928e (diff)
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')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_temp.c4
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 3394075e4c3..3e0f19e1c72 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)
178 msleep(5); 178 msleep(5);
179 179
180 /* read */ 180 /* read */
181 return nv_rd32(dev, 0x0015b4); 181 return nv_rd32(dev, 0x0015b4) & 0x1fff;
182} 182}
183 183
184s16 184s16
@@ -197,7 +197,7 @@ nouveau_temp_get(struct drm_device *dev)
197 if (dev_priv->chipset >= 0x50) { 197 if (dev_priv->chipset >= 0x50) {
198 core_temp = nv_rd32(dev, 0x20008); 198 core_temp = nv_rd32(dev, 0x20008);
199 } else { 199 } else {
200 core_temp = nv_rd32(dev, 0x0015b4); 200 core_temp = nv_rd32(dev, 0x0015b4) & 0x1fff;
201 /* Setup the sensor if the temperature is 0 */ 201 /* Setup the sensor if the temperature is 0 */
202 if (core_temp == 0) 202 if (core_temp == 0)
203 core_temp = nouveau_nv40_sensor_setup(dev); 203 core_temp = nouveau_nv40_sensor_setup(dev);