diff options
author | Darren Powell <darren.powell@amd.com> | 2020-11-04 03:45:14 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-02-27 01:18:01 +0300 |
commit | 9ab5001a99e1f1006192cf59915feeb9f03108bb (patch) | |
tree | ff39d887e50ab53b79dd180474b2c6f4623a69be /drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | |
parent | 8dfc8c53c3c4144fce1c601e874eda79148cc88a (diff) | |
download | linux-9ab5001a99e1f1006192cf59915feeb9f03108bb.tar.xz |
amdgpu/pm: Powerplay API for smu , changed 5 dpm powergating & sensor functions to use API
v2: add comment to highlight assignment that changes uint32_t value to int
fix errors flagged by checkpatch.pl
New Functions
smu_get_baco_capability() - Implement Powerplay API get_asic_baco_capability
smu_baco_set_state() - Implement Powerplay API set_asic_baco_state
Modified Functions
smu_read_sensor() - modifed signature to match Powerplay API read_sensor
Other Changes
added 3 above smu Powerplay functions to swsmu_dpm_funcs
removed special smu handling in 5 dpm functions and called through Powerplay API
Signed-off-by: Darren Powell <darren.powell@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h')
-rw-r--r-- | drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h index a3413df5981b..fd075644fa67 100644 --- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h +++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h @@ -1243,9 +1243,7 @@ int smu_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TABLE_COMMAND type, long *input, uint32_t size); -int smu_read_sensor(struct smu_context *smu, - enum amd_pp_sensors sensor, - void *data, uint32_t *size); +int smu_read_sensor(void *handle, int sensor, void *data, int *size); int smu_get_power_profile_mode(struct smu_context *smu, char *buf); int smu_set_power_profile_mode(struct smu_context *smu, @@ -1275,11 +1273,14 @@ int smu_set_xgmi_pstate(void *handle, int smu_set_azalia_d3_pme(struct smu_context *smu); bool smu_baco_is_support(struct smu_context *smu); +int smu_get_baco_capability(void *handle, bool *cap); int smu_baco_get_state(struct smu_context *smu, enum smu_baco_state *state); int smu_baco_enter(struct smu_context *smu); int smu_baco_exit(struct smu_context *smu); +int smu_baco_set_state(void *handle, int state); + bool smu_mode1_reset_is_support(struct smu_context *smu); int smu_mode1_reset(struct smu_context *smu); |