Skip to content

Commit 7ca302d

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amd/pm: workaround for compute workload type on some skus
On smu 13.0.0, the compute workload type cannot be set on all the skus due to some other problems. This workaround is to make sure compute workload type can also run on some specific skus. v2: keep the variable consistent Signed-off-by: Kenneth Feng <[email protected]> Acked-by: Lijo Lazar <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.1.x
1 parent 7ab1a49 commit 7ca302d

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,10 +1696,39 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
16961696
}
16971697
}
16981698

1699-
/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
1700-
workload_type = smu_cmn_to_asic_specific_index(smu,
1699+
if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_COMPUTE &&
1700+
(((smu->adev->pdev->device == 0x744C) && (smu->adev->pdev->revision == 0xC8)) ||
1701+
((smu->adev->pdev->device == 0x744C) && (smu->adev->pdev->revision == 0xCC)))) {
1702+
ret = smu_cmn_update_table(smu,
1703+
SMU_TABLE_ACTIVITY_MONITOR_COEFF,
1704+
WORKLOAD_PPLIB_COMPUTE_BIT,
1705+
(void *)(&activity_monitor_external),
1706+
false);
1707+
if (ret) {
1708+
dev_err(smu->adev->dev, "[%s] Failed to get activity monitor!", __func__);
1709+
return ret;
1710+
}
1711+
1712+
ret = smu_cmn_update_table(smu,
1713+
SMU_TABLE_ACTIVITY_MONITOR_COEFF,
1714+
WORKLOAD_PPLIB_CUSTOM_BIT,
1715+
(void *)(&activity_monitor_external),
1716+
true);
1717+
if (ret) {
1718+
dev_err(smu->adev->dev, "[%s] Failed to set activity monitor!", __func__);
1719+
return ret;
1720+
}
1721+
1722+
workload_type = smu_cmn_to_asic_specific_index(smu,
1723+
CMN2ASIC_MAPPING_WORKLOAD,
1724+
PP_SMC_POWER_PROFILE_CUSTOM);
1725+
} else {
1726+
/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
1727+
workload_type = smu_cmn_to_asic_specific_index(smu,
17011728
CMN2ASIC_MAPPING_WORKLOAD,
17021729
smu->power_profile_mode);
1730+
}
1731+
17031732
if (workload_type < 0)
17041733
return -EINVAL;
17051734

0 commit comments

Comments
 (0)