Skip to content

Commit c4b2da6

Browse files
committed
drm/i915/ddi: Define LT Phy Swing tables
Define and initialize LT Phy Swing tables for DP 1.4, 2.1 and eDp. HDMI TMDS is not needed since LT Phy H/w handles that. Bspec: 74493 Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patch.msgid.link/20251101032513.4171255-19-suraj.kandpal@intel.com
1 parent 1092892 commit c4b2da6

2 files changed

Lines changed: 89 additions & 1 deletion

File tree

drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "intel_display_types.h"
1111
#include "intel_display_utils.h"
1212
#include "intel_dp.h"
13+
#include "intel_lt_phy.h"
1314

1415
/* HDMI/DVI modes ignore everything but the last 2 items. So we share
1516
* them for both DP and FDI transports, allowing those ports to
@@ -1115,6 +1116,69 @@ static const struct intel_ddi_buf_trans mtl_c20_trans_uhbr = {
11151116
.num_entries = ARRAY_SIZE(_mtl_c20_trans_uhbr),
11161117
};
11171118

1119+
/* DP1.4 */
1120+
static const union intel_ddi_buf_trans_entry _xe3plpd_lt_trans_dp14[] = {
1121+
{ .lt = { 1, 0, 0, 21, 0 } },
1122+
{ .lt = { 1, 1, 0, 24, 3 } },
1123+
{ .lt = { 1, 2, 0, 28, 7 } },
1124+
{ .lt = { 0, 3, 0, 35, 13 } },
1125+
{ .lt = { 1, 1, 0, 27, 0 } },
1126+
{ .lt = { 1, 2, 0, 31, 4 } },
1127+
{ .lt = { 0, 3, 0, 39, 9 } },
1128+
{ .lt = { 1, 2, 0, 35, 0 } },
1129+
{ .lt = { 0, 3, 0, 41, 7 } },
1130+
{ .lt = { 0, 3, 0, 48, 0 } },
1131+
};
1132+
1133+
/* DP2.1 */
1134+
static const union intel_ddi_buf_trans_entry _xe3plpd_lt_trans_uhbr[] = {
1135+
{ .lt = { 0, 0, 0, 48, 0 } },
1136+
{ .lt = { 0, 0, 0, 43, 5 } },
1137+
{ .lt = { 0, 0, 0, 40, 8 } },
1138+
{ .lt = { 0, 0, 0, 37, 11 } },
1139+
{ .lt = { 0, 0, 0, 33, 15 } },
1140+
{ .lt = { 0, 0, 2, 46, 0 } },
1141+
{ .lt = { 0, 0, 2, 42, 4 } },
1142+
{ .lt = { 0, 0, 2, 38, 8 } },
1143+
{ .lt = { 0, 0, 2, 35, 11 } },
1144+
{ .lt = { 0, 0, 2, 33, 13 } },
1145+
{ .lt = { 0, 0, 4, 44, 0 } },
1146+
{ .lt = { 0, 0, 4, 40, 4 } },
1147+
{ .lt = { 0, 0, 4, 37, 7 } },
1148+
{ .lt = { 0, 0, 4, 33, 11 } },
1149+
{ .lt = { 0, 0, 8, 40, 0 } },
1150+
{ .lt = { 1, 0, 2, 26, 2 } },
1151+
};
1152+
1153+
/* eDp */
1154+
static const union intel_ddi_buf_trans_entry _xe3plpd_lt_trans_edp[] = {
1155+
{ .lt = { 1, 0, 0, 12, 0 } },
1156+
{ .lt = { 1, 1, 0, 13, 1 } },
1157+
{ .lt = { 1, 2, 0, 15, 3 } },
1158+
{ .lt = { 1, 3, 0, 19, 7 } },
1159+
{ .lt = { 1, 1, 0, 14, 0 } },
1160+
{ .lt = { 1, 2, 0, 16, 2 } },
1161+
{ .lt = { 1, 3, 0, 21, 5 } },
1162+
{ .lt = { 1, 2, 0, 18, 0 } },
1163+
{ .lt = { 1, 3, 0, 22, 4 } },
1164+
{ .lt = { 1, 3, 0, 26, 0 } },
1165+
};
1166+
1167+
static const struct intel_ddi_buf_trans xe3plpd_lt_trans_dp14 = {
1168+
.entries = _xe3plpd_lt_trans_dp14,
1169+
.num_entries = ARRAY_SIZE(_xe3plpd_lt_trans_dp14),
1170+
};
1171+
1172+
static const struct intel_ddi_buf_trans xe3plpd_lt_trans_uhbr = {
1173+
.entries = _xe3plpd_lt_trans_uhbr,
1174+
.num_entries = ARRAY_SIZE(_xe3plpd_lt_trans_uhbr),
1175+
};
1176+
1177+
static const struct intel_ddi_buf_trans xe3plpd_lt_trans_edp = {
1178+
.entries = _xe3plpd_lt_trans_edp,
1179+
.num_entries = ARRAY_SIZE(_xe3plpd_lt_trans_edp),
1180+
};
1181+
11181182
bool is_hobl_buf_trans(const struct intel_ddi_buf_trans *table)
11191183
{
11201184
return table == &tgl_combo_phy_trans_edp_hbr2_hobl;
@@ -1707,11 +1771,26 @@ mtl_get_c20_buf_trans(struct intel_encoder *encoder,
17071771
return intel_get_buf_trans(&mtl_c20_trans_dp14, n_entries);
17081772
}
17091773

1774+
static const struct intel_ddi_buf_trans *
1775+
xe3plpd_get_lt_buf_trans(struct intel_encoder *encoder,
1776+
const struct intel_crtc_state *crtc_state,
1777+
int *n_entries)
1778+
{
1779+
if (intel_crtc_has_dp_encoder(crtc_state) && intel_dp_is_uhbr(crtc_state))
1780+
return intel_get_buf_trans(&xe3plpd_lt_trans_uhbr, n_entries);
1781+
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
1782+
return intel_get_buf_trans(&xe3plpd_lt_trans_edp, n_entries);
1783+
else
1784+
return intel_get_buf_trans(&xe3plpd_lt_trans_dp14, n_entries);
1785+
}
1786+
17101787
void intel_ddi_buf_trans_init(struct intel_encoder *encoder)
17111788
{
17121789
struct intel_display *display = to_intel_display(encoder);
17131790

1714-
if (DISPLAY_VER(display) >= 14) {
1791+
if (HAS_LT_PHY(display)) {
1792+
encoder->get_buf_trans = xe3plpd_get_lt_buf_trans;
1793+
} else if (DISPLAY_VER(display) >= 14) {
17151794
if (intel_encoder_is_c10phy(encoder))
17161795
encoder->get_buf_trans = mtl_get_c10_buf_trans;
17171796
else

drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,22 @@ struct dg2_snps_phy_buf_trans {
5050
u8 post_cursor;
5151
};
5252

53+
struct xe3plpd_lt_phy_buf_trans {
54+
u8 txswing;
55+
u8 txswing_level;
56+
u8 pre_cursor;
57+
u8 main_cursor;
58+
u8 post_cursor;
59+
};
60+
5361
union intel_ddi_buf_trans_entry {
5462
struct hsw_ddi_buf_trans hsw;
5563
struct bxt_ddi_buf_trans bxt;
5664
struct icl_ddi_buf_trans icl;
5765
struct icl_mg_phy_ddi_buf_trans mg;
5866
struct tgl_dkl_phy_ddi_buf_trans dkl;
5967
struct dg2_snps_phy_buf_trans snps;
68+
struct xe3plpd_lt_phy_buf_trans lt;
6069
};
6170

6271
struct intel_ddi_buf_trans {

0 commit comments

Comments
 (0)