diff options
author | Huang Rui <ray.huang@amd.com> | 2019-03-31 11:53:28 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-21 18:59:26 -0500 |
commit | 22c9c6ca9658f75b45806eaf551c0b2736979fe3 (patch) | |
tree | e5e623d6e20eab91783b2f4a8e10a3f1d467f5ad /drivers/gpu/drm/amd/powerplay/inc | |
parent | cdb0c632e4d0a6e882e585f458cb3448799d8ed7 (diff) | |
download | linux-22c9c6ca9658f75b45806eaf551c0b2736979fe3.tar.bz2 |
drm/amd/powerplay: add tables_init interface for each asic
The smc tables defines should be in the asic level.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h index cdd066a88617..2b1b4e99cf43 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h @@ -568,6 +568,7 @@ struct pptable_funcs { int (*set_ppfeature_status)(struct smu_context *smu, uint64_t ppfeatures); int (*get_ppfeature_status)(struct smu_context *smu, char *buf); bool (*is_dpm_running)(struct smu_context *smu); + void (*tables_init)(struct smu_context *smu, struct smu_table *tables); }; struct smu_funcs @@ -754,6 +755,8 @@ struct smu_funcs ((smu)->ppt_funcs->set_od_percentage ? (smu)->ppt_funcs->set_od_percentage((smu), (type), (value)) : 0) #define smu_od_edit_dpm_table(smu, type, input, size) \ ((smu)->ppt_funcs->od_edit_dpm_table ? (smu)->ppt_funcs->od_edit_dpm_table((smu), (type), (input), (size)) : 0) +#define smu_tables_init(smu, tab) \ + ((smu)->ppt_funcs->tables_init ? (smu)->ppt_funcs->tables_init((smu), (tab)) : 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) \ diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h b/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h index dcc1ede97c04..a708c5d5b82e 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h +++ b/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h @@ -40,6 +40,8 @@ #define TEMP_RANGE_MIN (0) #define TEMP_RANGE_MAX (80 * 1000) +#define SMU11_TOOL_SIZE 0x19000 + #define CLK_MAP(clk, index) \ [SMU_##clk] = index |