drm/amd/powerplay: add sys interface for set sclk_od/mclk_od for smu

Add sys interface for set pp_sclk_od and pp_mclk_od for smu.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Likun Gao
2019-01-18 16:15:14 +08:00
committed by Alex Deucher
parent 31535a4080
commit e9c5b46e3c
3 changed files with 89 additions and 12 deletions

View File

@@ -414,6 +414,9 @@ struct pptable_funcs {
uint32_t index,
uint32_t value);
int (*get_od_percentage)(struct smu_context *smu, enum pp_clock_type type);
int (*set_od_percentage)(struct smu_context *smu,
enum pp_clock_type type,
uint32_t value);
int (*get_clock_by_type_with_latency)(struct smu_context *smu,
enum amd_pp_clock_type type,
struct
@@ -598,6 +601,8 @@ struct smu_funcs
((smu)->ppt_funcs->force_clk_levels ? (smu)->ppt_funcs->force_clk_levels((smu), (type), (level)) : 0)
#define smu_get_od_percentage(smu, type) \
((smu)->ppt_funcs->get_od_percentage ? (smu)->ppt_funcs->get_od_percentage((smu), (type)) : 0)
#define smu_set_od_percentage(smu, type, value) \
((smu)->ppt_funcs->set_od_percentage ? (smu)->ppt_funcs->set_od_percentage((smu), (type), (value)) : 0)
#define smu_start_thermal_control(smu) \
((smu)->funcs->start_thermal_control? (smu)->funcs->start_thermal_control((smu)) : 0)
#define smu_read_sensor(smu, sensor, data, size) \