Skip to content

Commit dc8a887

Browse files
Yang Wangalexdeucher
authored andcommitted
drm/amd/pm: force send pcie parmater on navi1x
v1: the PMFW didn't initialize the PCIe DPM parameters and requires the KMD to actively provide these parameters. v2: clean & remove unused code logic (lijo) Fixes: 1a18607 ("drm/amd/pm: override pcie dpm parameters only if it is necessary") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4671 Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit b0dbd5d)
1 parent 4f74c2d commit dc8a887

1 file changed

Lines changed: 15 additions & 18 deletions

File tree

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

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,24 +2455,21 @@ static int navi10_update_pcie_parameters(struct smu_context *smu,
24552455
}
24562456

24572457
for (i = 0; i < NUM_LINK_LEVELS; i++) {
2458-
if (pptable->PcieGenSpeed[i] > pcie_gen_cap ||
2459-
pptable->PcieLaneCount[i] > pcie_width_cap) {
2460-
dpm_context->dpm_tables.pcie_table.pcie_gen[i] =
2461-
pptable->PcieGenSpeed[i] > pcie_gen_cap ?
2462-
pcie_gen_cap : pptable->PcieGenSpeed[i];
2463-
dpm_context->dpm_tables.pcie_table.pcie_lane[i] =
2464-
pptable->PcieLaneCount[i] > pcie_width_cap ?
2465-
pcie_width_cap : pptable->PcieLaneCount[i];
2466-
smu_pcie_arg = i << 16;
2467-
smu_pcie_arg |= dpm_context->dpm_tables.pcie_table.pcie_gen[i] << 8;
2468-
smu_pcie_arg |= dpm_context->dpm_tables.pcie_table.pcie_lane[i];
2469-
ret = smu_cmn_send_smc_msg_with_param(smu,
2470-
SMU_MSG_OverridePcieParameters,
2471-
smu_pcie_arg,
2472-
NULL);
2473-
if (ret)
2474-
break;
2475-
}
2458+
dpm_context->dpm_tables.pcie_table.pcie_gen[i] =
2459+
pptable->PcieGenSpeed[i] > pcie_gen_cap ?
2460+
pcie_gen_cap : pptable->PcieGenSpeed[i];
2461+
dpm_context->dpm_tables.pcie_table.pcie_lane[i] =
2462+
pptable->PcieLaneCount[i] > pcie_width_cap ?
2463+
pcie_width_cap : pptable->PcieLaneCount[i];
2464+
smu_pcie_arg = i << 16;
2465+
smu_pcie_arg |= dpm_context->dpm_tables.pcie_table.pcie_gen[i] << 8;
2466+
smu_pcie_arg |= dpm_context->dpm_tables.pcie_table.pcie_lane[i];
2467+
ret = smu_cmn_send_smc_msg_with_param(smu,
2468+
SMU_MSG_OverridePcieParameters,
2469+
smu_pcie_arg,
2470+
NULL);
2471+
if (ret)
2472+
return ret;
24762473
}
24772474

24782475
return ret;

0 commit comments

Comments
 (0)