Add the DPCD registers and detection required to support UHBR link rates over Thunderbolt tunnels.
Showing the changes to include/drm (2 of 3 files). Show all
Unified · Split
| @@ -1497,6 +1497,18 @@ · 1496 unmodified lines | ||
| 1497 | 1497 | #define DP_TUNNELING_MAX_LANE_COUNT 0xe0029 |
| 1498 | 1498 | #define DP_TUNNELING_MAX_LANE_COUNT_MASK 0x1f |
| 1499 | 1499 | |
| 1500 | +#define DP_TUNNELING_MAIN_LINK_CHANNEL_CODING 0xe002b | |
| 1501 | +#define DP_128B132B_DP_SUPPORTED (1 << 0) | |
| 1502 | + | |
| 1503 | +#define DP_TUNNELING_128B132B_LINK_RATE 0xe002c | |
| 1504 | +#define DP_TUNNELING_13_5GBPS_PER_LANE_SUPPORT (1 << 2) | |
| 1505 | +#define DP_TUNNELING_20GBPS_PER_LANE_SUPPORT (1 << 1) | |
| 1506 | +#define DP_TUNNELING_10GBPS_PER_LANE_SUPPORT (1 << 0) | |
| 1507 | +#define DP_TUNNELING_128B132B_LINK_RATE_MASK (DP_TUNNELING_10GBPS_PER_LANE_SUPPORT | \ | |
| 1508 | + DP_TUNNELING_13_5GBPS_PER_LANE_SUPPORT | \ | |
| 1509 | + DP_TUNNELING_20GBPS_PER_LANE_SUPPORT) | |
| 1510 | +#define DP_TUNNELING_128B132B_LL_LANE0_MAPPING_SUPPORT (1 << 7) | |
| 1511 | + | |
| 1500 | 1512 | #define DP_DPTX_BW_ALLOCATION_MODE_CONTROL 0xe0030 |
| 1501 | 1513 | #define DP_DISPLAY_DRIVER_BW_ALLOCATION_MODE_ENABLE (1 << 7) |
| 1502 | 1514 | #define DP_UNMASK_BW_ALLOCATION_IRQ (1 << 6) |
| @@ -63,6 +63,9 @@ void drm_dp_tunnel_set_io_error(struct drm_dp_tunnel *tunnel); · 62 unmodified lines | ||
| 63 | 63 | int drm_dp_tunnel_handle_irq(struct drm_dp_tunnel_mgr *mgr, |
| 64 | 64 | struct drm_dp_aux *aux); |
| 65 | 65 | |
| 66 | +bool drm_dp_tunnel_128b132b_supported(const struct drm_dp_tunnel *tunnel); | |
| 67 | +bool drm_dp_tunnel_128b132b_lane0_mapping_supported(const struct drm_dp_tunnel *tunnel); | |
| 68 | +u8 drm_dp_tunnel_128b132b_dprx_rates(const struct drm_dp_tunnel *tunnel); | |
| 66 | 69 | int drm_dp_tunnel_max_dprx_rate(const struct drm_dp_tunnel *tunnel); |
| 67 | 70 | int drm_dp_tunnel_max_dprx_lane_count(const struct drm_dp_tunnel *tunnel); |
| 68 | 71 | int drm_dp_tunnel_available_bw(const struct drm_dp_tunnel *tunnel); |
| @@ -173,6 +176,24 @@ drm_dp_tunnel_handle_irq(struct drm_dp_tunnel_mgr *mgr, · 104 unmodified lines | ||
| 173 | 176 | return -EOPNOTSUPP; |
| 174 | 177 | } |
| 175 | 178 | |
| 179 | +static inline bool | |
| 180 | +drm_dp_tunnel_128b132b_supported(const struct drm_dp_tunnel *tunnel) | |
| 181 | +{ | |
| 182 | + return false; | |
| 183 | +} | |
| 184 | + | |
| 185 | +static inline bool | |
| 186 | +drm_dp_tunnel_128b132b_lane0_mapping_supported(const struct drm_dp_tunnel *tunnel) | |
| 187 | +{ | |
| 188 | + return false; | |
| 189 | +} | |
| 190 | + | |
| 191 | +static inline u8 | |
| 192 | +drm_dp_tunnel_128b132b_dprx_rates(const struct drm_dp_tunnel *tunnel) | |
| 193 | +{ | |
| 194 | + return 0; | |
| 195 | +} | |
| 196 | + | |
| 176 | 197 | static inline int |
| 177 | 198 | drm_dp_tunnel_max_dprx_rate(const struct drm_dp_tunnel *tunnel) |
| 178 | 199 | { |