drm/amd/pm:add new gpu_metrics_v2_3 to acquire average temperature info
authorLi Ma <li.ma@amd.com>
Mon, 5 Sep 2022 09:20:58 +0000 (17:20 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Sep 2022 16:38:41 +0000 (12:38 -0400)
commit0d6516efff2cf275591c57faadce249257d58980
tree820740ad5c88468ad9ea60860a593e2a25ac8cfb
parentee10818362d81ca1796cacdfb8a6c6f857cdb34a
drm/amd/pm:add new gpu_metrics_v2_3 to acquire average temperature info

Add new gpu_metrics_v2_3 to acquire average temperature info from SMU metrics. To acquire average temp info from gpu_metrics interface, but gpu_metrics_v2_2 only has members to show current temp info.
---
v1:
Only add average_temperature_gfx in gpu_metrics_v2_3.
v2:
Add average temp members for soc, core and l3 in gpu_metrics_v2_3 and put these new members at the end of gpu_metrics_v2_3. Add operation to read average temp info from metrics table.
v3:
Merge v1 and v2 and rename the patch.
v4:
Merge v3. Add firmware version judgment in vangogh_common_get_gpu_metrics to maintain backward compatibility and rename the patch. "return ret" on error scenario in smu_cmn_get_smc_version.

Signed-off-by: Li Ma <li.ma@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/kgd_pp_interface.h
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c