diff options
author | Martin Peres <martin.peres@labri.fr> | 2012-12-05 20:28:09 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-02-20 16:00:21 +1000 |
commit | 694472f4170c52a18893b0db8c8e3b865a85a457 (patch) | |
tree | 5ef92e9ab2545ca3db9e931465dde8277c46c459 /drivers/gpu/drm/nouveau/core/subdev/therm/priv.h | |
parent | fa37e8dda2617d48fbc6b17dd6e986e7f4c2bc8b (diff) | |
download | op-kernel-dev-694472f4170c52a18893b0db8c8e3b865a85a457.zip op-kernel-dev-694472f4170c52a18893b0db8c8e3b865a85a457.tar.gz |
drm/nouveau/therm: implement automatic fan management
v2: improved design but drops safety monitoring (to be in a later patch)
v3: fix locking and mode management
v4: gently fallback to the no-control mode when temperature cannot be got
and use kernel-provided min/max macros
v5 (Ben Skeggs):
- rebased on my previous patches
v6: fix hysterisis management in trip-based auto fan management
This commit also forbids access to fan management to nvc0+ chipsets as
fan management is already taken care of my PDAEMON's default fw.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev/therm/priv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/priv.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/priv.h b/drivers/gpu/drm/nouveau/core/subdev/therm/priv.h index fca580f..5c628b5 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/priv.h +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/priv.h @@ -36,7 +36,6 @@ struct nouveau_fan { struct nouveau_therm *parent; const char *type; - enum nouveau_therm_fan_mode mode; struct nvbios_therm_fan bios; struct nvbios_perf_fan perf; @@ -54,6 +53,12 @@ struct nouveau_fan { struct nouveau_therm_priv { struct nouveau_therm base; + /* automatic thermal management */ + struct nouveau_alarm alarm; + spinlock_t lock; + struct nouveau_therm_trip_point *last_trip; + int mode; + /* bios */ struct nvbios_therm_sensor bios_sensor; @@ -78,8 +83,6 @@ int nouveau_therm_fan_get(struct nouveau_therm *therm); int nouveau_therm_fan_set(struct nouveau_therm *therm, bool now, int percent); int nouveau_therm_fan_user_get(struct nouveau_therm *therm); int nouveau_therm_fan_user_set(struct nouveau_therm *therm, int percent); -int nouveau_therm_fan_set_mode(struct nouveau_therm *therm, - enum nouveau_therm_fan_mode mode); int nouveau_therm_fan_sense(struct nouveau_therm *therm); |