diff options
author | Kevin Wang | 2018-12-11 10:16:10 +0100 |
---|---|---|
committer | Alex Deucher | 2019-03-19 21:03:55 +0100 |
commit | b0b4b413a9be3d497f706217c37da150201c43ff (patch) | |
tree | 543176d31ea38d79c003a29428ffdb82ec1cdf98 /drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | |
parent | drm/amd/powerplay: add new ppsmc header for smu11 (v2) (diff) | |
download | kernel-qcow2-linux-b0b4b413a9be3d497f706217c37da150201c43ff.tar.gz kernel-qcow2-linux-b0b4b413a9be3d497f706217c37da150201c43ff.tar.xz kernel-qcow2-linux-b0b4b413a9be3d497f706217c37da150201c43ff.zip |
drm/amd/powerplay: implement smu send message functions for smu11 (v3)
Add function of smu send message for smu11
v2: fix the missing ) in define of smu_send_smc_msg_with_param
v3: Use adev usec timeout for smu as well, the origin time 10 us is not enough. (Ray)
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Kevin Wang <Kevin1.Wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h index b08c0c918491..9e467d32aa85 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h @@ -52,6 +52,9 @@ struct smu_funcs int (*write_watermarks_table)(struct smu_context *smu); int (*set_last_dcef_min_deep_sleep_clk)(struct smu_context *smu); int (*system_features_control)(struct smu_context *smu, bool en); + int (*send_smc_msg)(struct smu_context *smu, uint16_t msg); + int (*send_smc_msg_with_param)(struct smu_context *smu, uint16_t msg, uint32_t param); + }; #define smu_init_microcode(smu) \ @@ -90,7 +93,10 @@ struct smu_funcs ((smu)->funcs->set_last_dcef_min_deep_sleep_clk ? (smu)->funcs->set_last_dcef_min_deep_sleep_clk((smu)) : 0) #define smu_system_features_control(smu, en) \ ((smu)->funcs->system_features_control ? (smu)->funcs->system_features_control((smu), (en)) : 0) - +#define smu_send_smc_msg(smu, msg) \ + ((smu)->funcs->send_smc_msg? (smu)->funcs->send_smc_msg((smu), (msg)) : 0) +#define smu_send_smc_msg_with_param(smu, msg, param) \ + ((smu)->funcs->send_smc_msg_with_param? (smu)->funcs->send_smc_msg_with_param((smu), (msg), (param)) : 0) extern const struct amd_ip_funcs smu_ip_funcs; |