提交 76c0295c 编写于 作者: M Martin Peres 提交者: Ben Skeggs

drm/nv40/therm: reserve negative temperatures for errors

Signed-off-by: NMartin Peres <martin.peres@labri.fr>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 ad40d73e
......@@ -102,6 +102,10 @@ nv40_temp_get(struct nouveau_therm *therm)
core_temp = core_temp + sensor->offset_num / sensor->offset_den;
core_temp = core_temp + sensor->offset_constant - 8;
/* reserve negative temperatures for errors */
if (core_temp < 0)
core_temp = 0;
return core_temp;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册