diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2013-02-03 19:12:49 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-02-20 16:00:42 +1000 |
commit | d0a5191dcf5f37cf0942c4b65fa4a2c975631c0b (patch) | |
tree | cc56c2d12cb9efbb136a230310d6d4ab7fae599d /drivers | |
parent | 134fc0327552f3ebee2cdcb50b956a31029661c0 (diff) | |
download | linux-3.10-d0a5191dcf5f37cf0942c4b65fa4a2c975631c0b.tar.gz linux-3.10-d0a5191dcf5f37cf0942c4b65fa4a2c975631c0b.tar.bz2 linux-3.10-d0a5191dcf5f37cf0942c4b65fa4a2c975631c0b.zip |
drm/nv40/therm: reset temperature sensor on init
Current uninitialized sensor detection does not work for me on nv4b and
sensor returns crazy values (>190°C). It stabilises later, but it's too
late - therm code shutdowns the machine...
Let's just reset it on init.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c b/drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c index accc628948c..0f5363edb96 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c @@ -173,13 +173,23 @@ nv40_therm_ctor(struct nouveau_object *parent, return nouveau_therm_preinit(&priv->base.base); } +static int +nv40_therm_init(struct nouveau_object *object) +{ + struct nouveau_therm *therm = (void *)object; + + nv40_sensor_setup(therm); + + return _nouveau_therm_init(object); +} + struct nouveau_oclass nv40_therm_oclass = { .handle = NV_SUBDEV(THERM, 0x40), .ofuncs = &(struct nouveau_ofuncs) { .ctor = nv40_therm_ctor, .dtor = _nouveau_therm_dtor, - .init = _nouveau_therm_init, + .init = nv40_therm_init, .fini = _nouveau_therm_fini, }, }; |