mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
drm/amd/pm: Add ip version check for smu_v13_0_12 functions
Add ip version check to use smu_v13_0_12 specific functions Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d85212e1ce
commit
b02a284cc8
|
|
@ -748,7 +748,8 @@ static int smu_v13_0_6_setup_driver_pptable(struct smu_context *smu)
|
|||
int ret, i, retry = 100;
|
||||
uint32_t table_version;
|
||||
|
||||
if (smu_v13_0_6_cap_supported(smu, SMU_CAP(STATIC_METRICS)))
|
||||
if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 12) &&
|
||||
smu_v13_0_6_cap_supported(smu, SMU_CAP(STATIC_METRICS)))
|
||||
return smu_v13_0_12_setup_driver_pptable(smu);
|
||||
|
||||
/* Store one-time values in driver PPTable */
|
||||
|
|
@ -1131,7 +1132,8 @@ static int smu_v13_0_6_get_smu_metrics_data(struct smu_context *smu,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (smu_v13_0_6_cap_supported(smu, SMU_CAP(STATIC_METRICS)))
|
||||
if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 12) &&
|
||||
smu_v13_0_6_cap_supported(smu, SMU_CAP(STATIC_METRICS)))
|
||||
return smu_v13_0_12_get_smu_metrics_data(smu, member, value);
|
||||
|
||||
/* For clocks with multiple instances, only report the first one */
|
||||
|
|
@ -2496,7 +2498,8 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (smu_v13_0_6_cap_supported(smu, SMU_CAP(STATIC_METRICS)))
|
||||
if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 12) &&
|
||||
smu_v13_0_6_cap_supported(smu, SMU_CAP(STATIC_METRICS)))
|
||||
return smu_v13_0_12_get_gpu_metrics(smu, table);
|
||||
|
||||
metrics_v1 = (MetricsTableV1_t *)metrics_v0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user