Skip to content

Commit fbf1035

Browse files
superm1alexdeucher
authored andcommitted
drm/amd: Disable PP_PCIE_DPM_MASK when dynamic speed switching not supported
Rather than individual ASICs checking for the quirk, set the quirk at the driver level. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 541c341 commit fbf1035

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,6 +2315,8 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
23152315
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
23162316
if (amdgpu_sriov_vf(adev) && adev->asic_type == CHIP_SIENNA_CICHLID)
23172317
adev->pm.pp_feature &= ~PP_OVERDRIVE_MASK;
2318+
if (!amdgpu_device_pcie_dynamic_switching_supported())
2319+
adev->pm.pp_feature &= ~PP_PCIE_DPM_MASK;
23182320

23192321
total = true;
23202322
for (i = 0; i < adev->num_ip_blocks; i++) {

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,9 +1823,7 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
18231823

18241824
data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
18251825
data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
1826-
data->pcie_dpm_key_disabled =
1827-
!amdgpu_device_pcie_dynamic_switching_supported() ||
1828-
!(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
1826+
data->pcie_dpm_key_disabled = !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
18291827
/* need to set voltage control types before EVV patching */
18301828
data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
18311829
data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;

drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ static int sienna_cichlid_update_pcie_parameters(struct smu_context *smu,
21152115
min_lane_width = min_lane_width > max_lane_width ?
21162116
max_lane_width : min_lane_width;
21172117

2118-
if (!amdgpu_device_pcie_dynamic_switching_supported()) {
2118+
if (!(smu->adev->pm.pp_feature & PP_PCIE_DPM_MASK)) {
21192119
pcie_table->pcie_gen[0] = max_gen_speed;
21202120
pcie_table->pcie_lane[0] = max_lane_width;
21212121
} else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2438,7 +2438,7 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu,
24382438
uint32_t smu_pcie_arg;
24392439
int ret, i;
24402440

2441-
if (!amdgpu_device_pcie_dynamic_switching_supported()) {
2441+
if (!(smu->adev->pm.pp_feature & PP_PCIE_DPM_MASK)) {
24422442
if (pcie_table->pcie_gen[num_of_levels - 1] < pcie_gen_cap)
24432443
pcie_gen_cap = pcie_table->pcie_gen[num_of_levels - 1];
24442444

0 commit comments

Comments
 (0)