Skip to content

Commit

Permalink
drm/nv40/therm: reset temperature sensor on init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Feb 20, 2013
1 parent 134fc03 commit d0a5191
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};

0 comments on commit d0a5191

Please sign in to comment.