|
10 | 10 | #include "intel_display_types.h" |
11 | 11 | #include "intel_display_utils.h" |
12 | 12 | #include "intel_dp.h" |
| 13 | +#include "intel_lt_phy.h" |
13 | 14 |
|
14 | 15 | /* HDMI/DVI modes ignore everything but the last 2 items. So we share |
15 | 16 | * 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 = { |
1115 | 1116 | .num_entries = ARRAY_SIZE(_mtl_c20_trans_uhbr), |
1116 | 1117 | }; |
1117 | 1118 |
|
| 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 | + |
1118 | 1182 | bool is_hobl_buf_trans(const struct intel_ddi_buf_trans *table) |
1119 | 1183 | { |
1120 | 1184 | return table == &tgl_combo_phy_trans_edp_hbr2_hobl; |
@@ -1707,11 +1771,26 @@ mtl_get_c20_buf_trans(struct intel_encoder *encoder, |
1707 | 1771 | return intel_get_buf_trans(&mtl_c20_trans_dp14, n_entries); |
1708 | 1772 | } |
1709 | 1773 |
|
| 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 | + |
1710 | 1787 | void intel_ddi_buf_trans_init(struct intel_encoder *encoder) |
1711 | 1788 | { |
1712 | 1789 | struct intel_display *display = to_intel_display(encoder); |
1713 | 1790 |
|
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) { |
1715 | 1794 | if (intel_encoder_is_c10phy(encoder)) |
1716 | 1795 | encoder->get_buf_trans = mtl_get_c10_buf_trans; |
1717 | 1796 | else |
|
0 commit comments