diff options
author | Kevin Wang | 2019-01-11 07:51:24 +0100 |
---|---|---|
committer | Alex Deucher | 2019-03-19 21:03:57 +0100 |
commit | 4a5a2de66686e317ddcb090e3b1ee45b4219003a (patch) | |
tree | e5b1e9f5eed28c3920c9ee810849269342b434d6 /drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | |
parent | drm/amd/powerplay: implement is_support_sw_smu function for new smu (diff) | |
download | kernel-qcow2-linux-4a5a2de66686e317ddcb090e3b1ee45b4219003a.tar.gz kernel-qcow2-linux-4a5a2de66686e317ddcb090e3b1ee45b4219003a.tar.xz kernel-qcow2-linux-4a5a2de66686e317ddcb090e3b1ee45b4219003a.zip |
drm/amd/powerplay: implement sysfs of amdgpu_get_busy_percent for smu11
add interface amdgpu_get_busy_percent for smu11
v2: convert data pointer type to uint32_t *.
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 | 5 |
1 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 51fb1f9b2abf..43c2b9e981f5 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h @@ -23,6 +23,7 @@ #define __AMDGPU_SMU_H__ #include "amdgpu.h" +#include "kgd_pp_interface.h" enum smu_message_type { @@ -258,6 +259,8 @@ struct smu_funcs int (*get_current_clk_freq)(struct smu_context *smu, uint32_t clk_id, uint32_t *value); int (*init_max_sustainable_clocks)(struct smu_context *smu); int (*start_thermal_control)(struct smu_context *smu); + int (*read_sensor)(struct smu_context *smu, enum amd_pp_sensors sensor, + void *data, uint32_t *size); }; #define smu_init_microcode(smu) \ @@ -342,6 +345,8 @@ struct smu_funcs ((smu)->ppt_funcs->print_clk_levels ? (smu)->ppt_funcs->print_clk_levels((smu), (type), (buf)) : 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) \ + ((smu)->funcs->read_sensor? (smu)->funcs->read_sensor((smu), (sensor), (data), (size)) : 0) #define smu_msg_get_index(smu, msg) \ ((smu)->ppt_funcs? ((smu)->ppt_funcs->get_smu_msg_index? (smu)->ppt_funcs->get_smu_msg_index((smu), (msg)) : -EINVAL) : -EINVAL) |