summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
diff options
context:
space:
mode:
authorHuang Rui2019-03-31 08:53:23 +0200
committerAlex Deucher2019-06-22 01:59:26 +0200
commit8b1f4c87a30e6497ea646737e0b4d8ef854878a5 (patch)
treec57548717d7c99698b8cf366ed7705a4137769d0 /drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
parentdrm/amd/powerplay: move PPTable_t uses into asic level (diff)
downloadkernel-qcow2-linux-8b1f4c87a30e6497ea646737e0b4d8ef854878a5.tar.gz
kernel-qcow2-linux-8b1f4c87a30e6497ea646737e0b4d8ef854878a5.tar.xz
kernel-qcow2-linux-8b1f4c87a30e6497ea646737e0b4d8ef854878a5.zip
drm/amd/powerplay: move SmuMetrics_t uses into asic level
This patch moves the rest of SmuMetrics_t uses into asic level. It's to avoid the conflicts with different asic. 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/amdgpu_smu.h')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h8
1 files changed, 8 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 0384c3df9dc2..2e5920e85f10 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
@@ -571,6 +571,10 @@ struct pptable_funcs {
void (*tables_init)(struct smu_context *smu, struct smu_table *tables);
int (*set_thermal_fan_table)(struct smu_context *smu);
int (*get_fan_speed_percent)(struct smu_context *smu, uint32_t *speed);
+ int (*get_gpu_power)(struct smu_context *smu, uint32_t *value);
+ int (*get_current_activity_percent)(struct smu_context *smu,
+ enum amd_pp_sensors sensor,
+ uint32_t *value);
};
struct smu_funcs
@@ -798,6 +802,10 @@ struct smu_funcs
((smu)->funcs->set_fan_control_mode ? (smu)->funcs->set_fan_control_mode((smu), (value)) : 0)
#define smu_get_fan_speed_percent(smu, speed) \
((smu)->ppt_funcs->get_fan_speed_percent ? (smu)->ppt_funcs->get_fan_speed_percent((smu), (speed)) : 0)
+#define smu_get_gpu_power(smu, val) \
+ ((smu)->ppt_funcs->get_gpu_power ? (smu)->ppt_funcs->get_gpu_power((smu), (val)) : 0)
+#define smu_get_current_activity_percent(smu, val) \
+ ((smu)->ppt_funcs->get_current_activity_percent ? (smu)->ppt_funcs->get_current_activity_percent((smu), (sensor), (val)) : 0)
#define smu_set_fan_speed_percent(smu, speed) \
((smu)->funcs->set_fan_speed_percent ? (smu)->funcs->set_fan_speed_percent((smu), (speed)) : 0)