aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2017-09-06 03:27:59 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-18 23:30:34 -0400
commitcfa289fd4986c504b0396cce167802dfcf4943d0 (patch)
tree8c616086e99e4a5b777a22d8f6e95b22bd4d1a9d /drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
parent698f88e697cc8852558d120fdecfdb38c18c2ff7 (diff)
drm/amdgpu: rename amdgpu_dpm_funcs to amd_pm_funcs
renamed amdgpu_dpm_funcs and moved to amd_shared.h so can shared with powerplay. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h47
1 files changed, 2 insertions, 45 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
index 3eba4137508b..2f2bdb032d30 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
@@ -241,49 +241,6 @@ enum amdgpu_pcie_gen {
241 AMDGPU_PCIE_GEN_INVALID = 0xffff 241 AMDGPU_PCIE_GEN_INVALID = 0xffff
242}; 242};
243 243
244struct amdgpu_dpm_funcs {
245 int (*get_temperature)(struct amdgpu_device *adev);
246 int (*pre_set_power_state)(struct amdgpu_device *adev);
247 int (*set_power_state)(struct amdgpu_device *adev);
248 void (*post_set_power_state)(struct amdgpu_device *adev);
249 void (*display_configuration_changed)(struct amdgpu_device *adev);
250 u32 (*get_sclk)(struct amdgpu_device *adev, bool low);
251 u32 (*get_mclk)(struct amdgpu_device *adev, bool low);
252 void (*print_power_state)(struct amdgpu_device *adev, struct amdgpu_ps *ps);
253 void (*debugfs_print_current_performance_level)(struct amdgpu_device *adev, struct seq_file *m);
254 int (*force_performance_level)(struct amdgpu_device *adev, enum amd_dpm_forced_level level);
255 bool (*vblank_too_short)(struct amdgpu_device *adev);
256 void (*powergate_uvd)(struct amdgpu_device *adev, bool gate);
257 void (*powergate_vce)(struct amdgpu_device *adev, bool gate);
258 void (*enable_bapm)(struct amdgpu_device *adev, bool enable);
259 void (*set_fan_control_mode)(struct amdgpu_device *adev, u32 mode);
260 u32 (*get_fan_control_mode)(struct amdgpu_device *adev);
261 int (*set_fan_speed_percent)(struct amdgpu_device *adev, u32 speed);
262 int (*get_fan_speed_percent)(struct amdgpu_device *adev, u32 *speed);
263 int (*force_clock_level)(struct amdgpu_device *adev, enum pp_clock_type type, uint32_t mask);
264 int (*print_clock_levels)(struct amdgpu_device *adev, enum pp_clock_type type, char *buf);
265 int (*get_sclk_od)(struct amdgpu_device *adev);
266 int (*set_sclk_od)(struct amdgpu_device *adev, uint32_t value);
267 int (*get_mclk_od)(struct amdgpu_device *adev);
268 int (*set_mclk_od)(struct amdgpu_device *adev, uint32_t value);
269 int (*check_state_equal)(struct amdgpu_device *adev,
270 struct amdgpu_ps *cps,
271 struct amdgpu_ps *rps,
272 bool *equal);
273 int (*read_sensor)(struct amdgpu_device *adev, int idx, void *value,
274 int *size);
275
276 struct amd_vce_state* (*get_vce_clock_state)(struct amdgpu_device *adev, unsigned idx);
277 int (*reset_power_profile_state)(struct amdgpu_device *adev,
278 struct amd_pp_profile *request);
279 int (*get_power_profile_state)(struct amdgpu_device *adev,
280 struct amd_pp_profile *query);
281 int (*set_power_profile_state)(struct amdgpu_device *adev,
282 struct amd_pp_profile *request);
283 int (*switch_power_profile)(struct amdgpu_device *adev,
284 enum amd_pp_profile_type type);
285};
286
287#define amdgpu_dpm_pre_set_power_state(adev) (adev)->pm.funcs->pre_set_power_state((adev)) 244#define amdgpu_dpm_pre_set_power_state(adev) (adev)->pm.funcs->pre_set_power_state((adev))
288#define amdgpu_dpm_set_power_state(adev) (adev)->pm.funcs->set_power_state((adev)) 245#define amdgpu_dpm_set_power_state(adev) (adev)->pm.funcs->set_power_state((adev))
289#define amdgpu_dpm_post_set_power_state(adev) (adev)->pm.funcs->post_set_power_state((adev)) 246#define amdgpu_dpm_post_set_power_state(adev) (adev)->pm.funcs->post_set_power_state((adev))
@@ -485,7 +442,7 @@ struct amdgpu_pm {
485 struct amdgpu_dpm dpm; 442 struct amdgpu_dpm dpm;
486 const struct firmware *fw; /* SMC firmware */ 443 const struct firmware *fw; /* SMC firmware */
487 uint32_t fw_version; 444 uint32_t fw_version;
488 const struct amdgpu_dpm_funcs *funcs; 445 const struct amd_pm_funcs *funcs;
489 uint32_t pcie_gen_mask; 446 uint32_t pcie_gen_mask;
490 uint32_t pcie_mlw_mask; 447 uint32_t pcie_mlw_mask;
491 struct amd_pp_display_configuration pm_display_cfg;/* set by DAL */ 448 struct amd_pp_display_configuration pm_display_cfg;/* set by DAL */
@@ -551,6 +508,6 @@ u16 amdgpu_get_pcie_lane_support(struct amdgpu_device *adev,
551u8 amdgpu_encode_pci_lane_width(u32 lanes); 508u8 amdgpu_encode_pci_lane_width(u32 lanes);
552 509
553struct amd_vce_state* 510struct amd_vce_state*
554amdgpu_get_vce_clock_state(struct amdgpu_device *adev, unsigned idx); 511amdgpu_get_vce_clock_state(void *handle, u32 idx);
555 512
556#endif 513#endif