drm/nv40/therm: reset temperature sensor on init
Subsystems (3)
PATCH 2/3 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.
--- drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c +11 -1
@@ -173,13 +173,23 @@ nv40_therm_ctor(struct nouveau_object *parent,return nouveau_therm_preinit (&priv->base.base); } +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, }, };
Signature · 6 lines
1.8.1 _______________________________________________ Nouveau mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 1359922077-3347-2-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 16 lines · Marcin Slusarz
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 <[email protected]>--- drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c +0
-0
drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c nv40_therm_ctor(struct nouveau_object *parent, · line 177
Quoted 5 lines
drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c +2
-0@@ -173,13 +173,23 @@ nv40_therm_ctor(struct nouveau_object *parent,return nouveau_therm_preinit (&priv->base.base); } +int +nv40_therm_init (struct nouveau_object *object)
Tiny issue: this function should be static.
Quoted 22 lines
drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c +9
-1+{ +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, }, };Signature · 1 line
1.8.1
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 7 lines · Marcin Slusarz
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 <[email protected]>
Hmm, so it means the bios initializes your sensor at POST. This was not the case on mine and we used to rely on the fact that nv4x's sensor was not initialized.
Anyway, forcing a reset is not a bad idea. Please add my signed-off-by.
Thanks for your ptherm patchset :)
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau