mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 00:04:47 +08:00
drm/nv40/therm: increase the sensor's settling delay to 20ms
Based on my experience, 10ms wasn't always enough. Let's bump that to a little more. If this turns out to be insufficient-enough again, then an approach based on letting the sensor settle for several seconds before starting polling on the temperature would be better suited. This way, boot time wouldn't be impacted by those waits too much. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
7ae9712c60
commit
eea4eb14a0
@ -66,10 +66,11 @@ nv40_sensor_setup(struct nouveau_therm *therm)
|
||||
if (style == NEW_STYLE) {
|
||||
nv_mask(therm, 0x15b8, 0x80000000, 0);
|
||||
nv_wr32(therm, 0x15b0, 0x80003fff);
|
||||
mdelay(10); /* wait for the temperature to stabilize */
|
||||
mdelay(20); /* wait for the temperature to stabilize */
|
||||
return nv_rd32(therm, 0x15b4) & 0x3fff;
|
||||
} else if (style == OLD_STYLE) {
|
||||
nv_wr32(therm, 0x15b0, 0xff);
|
||||
mdelay(20); /* wait for the temperature to stabilize */
|
||||
return nv_rd32(therm, 0x15b4) & 0xff;
|
||||
} else
|
||||
return -ENODEV;
|
||||
|
Loading…
Reference in New Issue
Block a user