提交 4164743c 编写于 作者: F Francesco Marella 提交者: Ben Skeggs

drm/nv40: fix reading temp value

Signed-off-by: NFrancesco Marella <fmarl@paranoici.org>
Signed-off-by: NFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 5e6a7443
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册