diff options
author | Martin Peres <martin.peres@labri.fr> | 2012-09-01 20:55:58 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-02 23:13:14 -0400 |
commit | aa1b9b4836a8ab093ec06b0780553566a5430da7 (patch) | |
tree | 26c305c62178ad4f9bf9644b6b7766cb0af87b1f /drivers/gpu/drm/nouveau/nouveau_pm.h | |
parent | d46497dce7376e9d3e2e10c59d92e1c3b665b5dd (diff) |
drm/nouveau/therm: move thermal-related functions to the therm subdev
It looks scary because of the size, but I tried to keep the differences minimal.
Further patches will fix the actual "driver" code and add new features.
v2: change filenames, split to submodules
v3: add a missing include
v4: Ben Skeggs <bskeggs@redhat.com>
- fixed set_defaults() to allow min_duty < 30 (thermal table will
override this if it's actually necessary)
- fixed set_defaults() to not provide pwm_freq so nv4x (which only has
pwm_div) can actually work. the boards using pwm_freq will have a
thermal table entry to provide us the value.
- removed unused files
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_pm.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_pm.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.h b/drivers/gpu/drm/nouveau/nouveau_pm.h index 2e39ccbd5d46..73b789c230a9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.h +++ b/drivers/gpu/drm/nouveau/nouveau_pm.h | |||
@@ -150,14 +150,6 @@ struct nouveau_pm_threshold_temp { | |||
150 | s16 down_clock; | 150 | s16 down_clock; |
151 | }; | 151 | }; |
152 | 152 | ||
153 | struct nouveau_pm_fan { | ||
154 | u32 percent; | ||
155 | u32 min_duty; | ||
156 | u32 max_duty; | ||
157 | u32 pwm_freq; | ||
158 | u32 pwm_divisor; | ||
159 | }; | ||
160 | |||
161 | struct nouveau_pm { | 153 | struct nouveau_pm { |
162 | struct drm_device *dev; | 154 | struct drm_device *dev; |
163 | 155 | ||
@@ -166,7 +158,6 @@ struct nouveau_pm { | |||
166 | int nr_perflvl; | 158 | int nr_perflvl; |
167 | struct nouveau_pm_temp_sensor_constants sensor_constants; | 159 | struct nouveau_pm_temp_sensor_constants sensor_constants; |
168 | struct nouveau_pm_threshold_temp threshold_temp; | 160 | struct nouveau_pm_threshold_temp threshold_temp; |
169 | struct nouveau_pm_fan fan; | ||
170 | 161 | ||
171 | struct nouveau_pm_profile *profile_ac; | 162 | struct nouveau_pm_profile *profile_ac; |
172 | struct nouveau_pm_profile *profile_dc; | 163 | struct nouveau_pm_profile *profile_dc; |
@@ -185,9 +176,6 @@ struct nouveau_pm { | |||
185 | 176 | ||
186 | int (*voltage_get)(struct drm_device *); | 177 | int (*voltage_get)(struct drm_device *); |
187 | int (*voltage_set)(struct drm_device *, int voltage); | 178 | int (*voltage_set)(struct drm_device *, int voltage); |
188 | int (*pwm_get)(struct drm_device *, int line, u32*, u32*); | ||
189 | int (*pwm_set)(struct drm_device *, int line, u32, u32); | ||
190 | int (*temp_get)(struct drm_device *); | ||
191 | }; | 179 | }; |
192 | 180 | ||
193 | static inline struct nouveau_pm * | 181 | static inline struct nouveau_pm * |
@@ -270,13 +258,6 @@ int nvc0_pm_clocks_get(struct drm_device *, struct nouveau_pm_level *); | |||
270 | void *nvc0_pm_clocks_pre(struct drm_device *, struct nouveau_pm_level *); | 258 | void *nvc0_pm_clocks_pre(struct drm_device *, struct nouveau_pm_level *); |
271 | int nvc0_pm_clocks_set(struct drm_device *, void *); | 259 | int nvc0_pm_clocks_set(struct drm_device *, void *); |
272 | 260 | ||
273 | /* nouveau_temp.c */ | ||
274 | void nouveau_temp_init(struct drm_device *dev); | ||
275 | void nouveau_temp_fini(struct drm_device *dev); | ||
276 | void nouveau_temp_safety_checks(struct drm_device *dev); | ||
277 | int nv40_temp_get(struct drm_device *dev); | ||
278 | int nv84_temp_get(struct drm_device *dev); | ||
279 | |||
280 | /* nouveau_mem.c */ | 261 | /* nouveau_mem.c */ |
281 | int nouveau_mem_timing_calc(struct drm_device *, u32 freq, | 262 | int nouveau_mem_timing_calc(struct drm_device *, u32 freq, |
282 | struct nouveau_pm_memtiming *); | 263 | struct nouveau_pm_memtiming *); |