Skip to content

Commit 6719ab8

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amdgpu/pm: add gen5 display to the user on smu v14.0.2/3
add gen5 display to the user on smu v14.0.2/3 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Yang Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.11.x
1 parent 097c69d commit 6719ab8

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

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

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

1707-
if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
1707+
if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN5)
1708+
pcie_gen = 4;
1709+
else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
17081710
pcie_gen = 3;
17091711
else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3)
17101712
pcie_gen = 2;
@@ -1717,7 +1719,9 @@ static int smu_smc_hw_setup(struct smu_context *smu)
17171719
* Bit 15:8: PCIE GEN, 0 to 3 corresponds to GEN1 to GEN4
17181720
* Bit 7:0: PCIE lane width, 1 to 7 corresponds is x1 to x32
17191721
*/
1720-
if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X16)
1722+
if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X32)
1723+
pcie_width = 7;
1724+
else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X16)
17211725
pcie_width = 6;
17221726
else if (adev->pm.pcie_mlw_mask & CAIL_PCIE_LINK_WIDTH_SUPPORT_X12)
17231727
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
@@ -1173,13 +1173,15 @@ static int smu_v14_0_2_print_clk_levels(struct smu_context *smu,
11731173
(pcie_table->pcie_gen[i] == 0) ? "2.5GT/s," :
11741174
(pcie_table->pcie_gen[i] == 1) ? "5.0GT/s," :
11751175
(pcie_table->pcie_gen[i] == 2) ? "8.0GT/s," :
1176-
(pcie_table->pcie_gen[i] == 3) ? "16.0GT/s," : "",
1176+
(pcie_table->pcie_gen[i] == 3) ? "16.0GT/s," :
1177+
(pcie_table->pcie_gen[i] == 4) ? "32.0GT/s," : "",
11771178
(pcie_table->pcie_lane[i] == 1) ? "x1" :
11781179
(pcie_table->pcie_lane[i] == 2) ? "x2" :
11791180
(pcie_table->pcie_lane[i] == 3) ? "x4" :
11801181
(pcie_table->pcie_lane[i] == 4) ? "x8" :
11811182
(pcie_table->pcie_lane[i] == 5) ? "x12" :
1182-
(pcie_table->pcie_lane[i] == 6) ? "x16" : "",
1183+
(pcie_table->pcie_lane[i] == 6) ? "x16" :
1184+
(pcie_table->pcie_lane[i] == 7) ? "x32" : "",
11831185
pcie_table->clk_freq[i],
11841186
(gen_speed == DECODE_GEN_SPEED(pcie_table->pcie_gen[i])) &&
11851187
(lane_width == DECODE_LANE_WIDTH(pcie_table->pcie_lane[i])) ?

0 commit comments

Comments
 (0)