Skip to content

Commit a4f2599

Browse files
Kenneth Fenggregkh
authored andcommitted
drm/amdgpu/pm: add gen5 display to the user on smu v14.0.2/3
commit 6719ab8 upstream. add gen5 display to the user on smu v14.0.2/3 Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org # 6.11.x Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ff34c90 commit a4f2599

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,9 @@ static int smu_smc_hw_setup(struct smu_context *smu)
16951695
return ret;
16961696
}
16971697

1698-
if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
1698+
if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN5)
1699+
pcie_gen = 4;
1700+
else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
16991701
pcie_gen = 3;
17001702
else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3)
17011703
pcie_gen = 2;
@@ -1708,7 +1710,9 @@ static int smu_smc_hw_setup(struct smu_context *smu)
17081710
* Bit 15:8: PCIE GEN, 0 to 3 corresponds to GEN1 to GEN4
17091711
* Bit 7:0: PCIE lane width, 1 to 7 corresponds is x1 to x32
17101712
*/
1711-
if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X16)
1713+
if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X32)
1714+
pcie_width = 7;
1715+
else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X16)
17121716
pcie_width = 6;
17131717
else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X12)
17141718
pcie_width = 5;

drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#define CTF_OFFSET_MEM 5
5454

5555
extern const int decoded_link_speed[5];
56-
extern const int decoded_link_width[7];
56+
extern const int decoded_link_width[8];
5757

5858
#define DECODE_GEN_SPEED(gen_speed_idx) (decoded_link_speed[gen_speed_idx])
5959
#define DECODE_LANE_WIDTH(lane_width_idx) (decoded_link_width[lane_width_idx])

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#define regMP1_SMN_IH_SW_INT_CTRL_mp1_14_0_0_BASE_IDX 0
5050

5151
const int decoded_link_speed[5] = {1, 2, 3, 4, 5};
52-
const int decoded_link_width[7] = {0, 1, 2, 4, 8, 12, 16};
52+
const int decoded_link_width[8] = {0, 1, 2, 4, 8, 12, 16, 32};
5353
/*
5454
* DO NOT use these for err/warn/info/debug messages.
5555
* Use dev_err, dev_warn, dev_info and dev_dbg instead.

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,13 +1186,15 @@ static int smu_v14_0_2_print_clk_levels(struct smu_context *smu,
11861186
(pcie_table->pcie_gen[i] == 0) ? "2.5GT/s," :
11871187
(pcie_table->pcie_gen[i] == 1) ? "5.0GT/s," :
11881188
(pcie_table->pcie_gen[i] == 2) ? "8.0GT/s," :
1189-
(pcie_table->pcie_gen[i] == 3) ? "16.0GT/s," : "",
1189+
(pcie_table->pcie_gen[i] == 3) ? "16.0GT/s," :
1190+
(pcie_table->pcie_gen[i] == 4) ? "32.0GT/s," : "",
11901191
(pcie_table->pcie_lane[i] == 1) ? "x1" :
11911192
(pcie_table->pcie_lane[i] == 2) ? "x2" :
11921193
(pcie_table->pcie_lane[i] == 3) ? "x4" :
11931194
(pcie_table->pcie_lane[i] == 4) ? "x8" :
11941195
(pcie_table->pcie_lane[i] == 5) ? "x12" :
1195-
(pcie_table->pcie_lane[i] == 6) ? "x16" : "",
1196+
(pcie_table->pcie_lane[i] == 6) ? "x16" :
1197+
(pcie_table->pcie_lane[i] == 7) ? "x32" : "",
11961198
pcie_table->clk_freq[i],
11971199
(gen_speed == DECODE_GEN_SPEED(pcie_table->pcie_gen[i])) &&
11981200
(lane_width == DECODE_LANE_WIDTH(pcie_table->pcie_lane[i])) ?

0 commit comments

Comments
 (0)