drm/nouveau/therm: remove some confusion introduced by therm_mode
The kernel message "[ PTHERM][0000:01:00.0] Thermal management: disabled" is misleading as it actually means "fan management: disabled". This patch fixes both the source and the message to improve readability. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
7591782b9f
commit
c4ce9246ca
|
@ -4,7 +4,7 @@
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
#include <core/subdev.h>
|
#include <core/subdev.h>
|
||||||
|
|
||||||
enum nouveau_therm_mode {
|
enum nouveau_therm_fan_mode {
|
||||||
NOUVEAU_THERM_CTRL_NONE = 0,
|
NOUVEAU_THERM_CTRL_NONE = 0,
|
||||||
NOUVEAU_THERM_CTRL_MANUAL = 1,
|
NOUVEAU_THERM_CTRL_MANUAL = 1,
|
||||||
NOUVEAU_THERM_CTRL_AUTO = 2,
|
NOUVEAU_THERM_CTRL_AUTO = 2,
|
||||||
|
|
|
@ -134,7 +134,7 @@ nouveau_therm_alarm(struct nouveau_alarm *alarm)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
nouveau_therm_mode(struct nouveau_therm *therm, int mode)
|
nouveau_therm_fan_mode(struct nouveau_therm *therm, int mode)
|
||||||
{
|
{
|
||||||
struct nouveau_therm_priv *priv = (void *)therm;
|
struct nouveau_therm_priv *priv = (void *)therm;
|
||||||
struct nouveau_device *device = nv_device(therm);
|
struct nouveau_device *device = nv_device(therm);
|
||||||
|
@ -152,7 +152,7 @@ nouveau_therm_mode(struct nouveau_therm *therm, int mode)
|
||||||
if (priv->mode == mode)
|
if (priv->mode == mode)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
nv_info(therm, "Thermal management: %s\n", name[mode]);
|
nv_info(therm, "fan management: %s\n", name[mode]);
|
||||||
nouveau_therm_update(therm, mode);
|
nouveau_therm_update(therm, mode);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ nouveau_therm_attr_set(struct nouveau_therm *therm,
|
||||||
priv->fan->bios.max_duty = value;
|
priv->fan->bios.max_duty = value;
|
||||||
return 0;
|
return 0;
|
||||||
case NOUVEAU_THERM_ATTR_FAN_MODE:
|
case NOUVEAU_THERM_ATTR_FAN_MODE:
|
||||||
return nouveau_therm_mode(therm, value);
|
return nouveau_therm_fan_mode(therm, value);
|
||||||
case NOUVEAU_THERM_ATTR_THRS_FAN_BOOST:
|
case NOUVEAU_THERM_ATTR_THRS_FAN_BOOST:
|
||||||
priv->bios_sensor.thrs_fan_boost.temp = value;
|
priv->bios_sensor.thrs_fan_boost.temp = value;
|
||||||
priv->sensor.program_alarms(therm);
|
priv->sensor.program_alarms(therm);
|
||||||
|
@ -263,7 +263,7 @@ _nouveau_therm_init(struct nouveau_object *object)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (priv->suspend >= 0)
|
if (priv->suspend >= 0)
|
||||||
nouveau_therm_mode(therm, priv->mode);
|
nouveau_therm_fan_mode(therm, priv->mode);
|
||||||
priv->sensor.program_alarms(therm);
|
priv->sensor.program_alarms(therm);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ nouveau_therm_preinit(struct nouveau_therm *therm)
|
||||||
nouveau_therm_sensor_ctor(therm);
|
nouveau_therm_sensor_ctor(therm);
|
||||||
nouveau_therm_fan_ctor(therm);
|
nouveau_therm_fan_ctor(therm);
|
||||||
|
|
||||||
nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_NONE);
|
nouveau_therm_fan_mode(therm, NOUVEAU_THERM_CTRL_NONE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ struct nouveau_therm_priv {
|
||||||
struct i2c_client *ic;
|
struct i2c_client *ic;
|
||||||
};
|
};
|
||||||
|
|
||||||
int nouveau_therm_mode(struct nouveau_therm *therm, int mode);
|
int nouveau_therm_fan_mode(struct nouveau_therm *therm, int mode);
|
||||||
int nouveau_therm_attr_get(struct nouveau_therm *therm,
|
int nouveau_therm_attr_get(struct nouveau_therm *therm,
|
||||||
enum nouveau_therm_attr_type type);
|
enum nouveau_therm_attr_type type);
|
||||||
int nouveau_therm_attr_set(struct nouveau_therm *therm,
|
int nouveau_therm_attr_set(struct nouveau_therm *therm,
|
||||||
|
|
|
@ -123,7 +123,7 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
|
||||||
case NOUVEAU_THERM_THRS_FANBOOST:
|
case NOUVEAU_THERM_THRS_FANBOOST:
|
||||||
if (active) {
|
if (active) {
|
||||||
nouveau_therm_fan_set(therm, true, 100);
|
nouveau_therm_fan_set(therm, true, 100);
|
||||||
nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_AUTO);
|
nouveau_therm_fan_mode(therm, NOUVEAU_THERM_CTRL_AUTO);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NOUVEAU_THERM_THRS_DOWNCLOCK:
|
case NOUVEAU_THERM_THRS_DOWNCLOCK:
|
||||||
|
|
Loading…
Reference in New Issue