From: Francesco Marella Date: Thu, 23 Sep 2010 07:14:22 +0000 (+0200) Subject: drm/nv40: fix reading temp value X-Git-Tag: v2.6.37-rc1~77^2~28^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4164743c8249ef2867cf71ae2cb2380b5a550b06;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git drm/nv40: fix reading temp value Signed-off-by: Francesco Marella Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_temp.c b/drivers/gpu/drm/nouveau/nouveau_temp.c index 3394075..3e0f19e 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);