Skip to content

Commit fd13841

Browse files
committed
drm/i915/dp_mst: Account for channel coding efficiency in the DSC DPT bpp limit
The DSC DPT interface BW limit check should take into account the link clock's (aka DDI clock in bspec) channel coding efficiency overhead. Bspec suggests that the FEC overhead needs to be applied, however HW people claim this isn't the case, nor is any overhead applicable. However based on testing various 5k/6k modes both on the DELL U3224KBA monitor and the Unigraf UCD-500 CTS test device, both the channel coding efficiency (which includes the FEC overhead) and an additional 3% overhead must be accounted for to get these modes working. Bspec: 49259 v2: - Apply an additional 3% overhead, add a commit log and code comment about these overheads and the relation to the Bspec BW limit formula. Reviewed-by: Ankit Nautiyal <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1ff65bf commit fd13841

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,30 @@ static int intel_dp_mst_check_constraints(struct drm_i915_private *i915, int bpp
5959
if (intel_dp_is_uhbr(crtc_state) && DISPLAY_VER(i915) < 14 && dsc) {
6060
int output_bpp = bpp;
6161
int symbol_clock = intel_dp_link_symbol_clock(crtc_state->port_clock);
62+
/*
63+
* Bspec/49259 suggests that the FEC overhead needs to be
64+
* applied here, though HW people claim that neither this FEC
65+
* or any other overhead is applicable here (that is the actual
66+
* available_bw is just symbol_clock * 72). However based on
67+
* testing on MTL-P the
68+
* - DELL U3224KBA display
69+
* - Unigraf UCD-500 CTS test sink
70+
* devices the
71+
* - 5120x2880/995.59Mhz
72+
* - 6016x3384/1357.23Mhz
73+
* - 6144x3456/1413.39Mhz
74+
* modes (all the ones having a DPT limit on the above devices),
75+
* both the channel coding efficiency and an additional 3%
76+
* overhead needs to be accounted for.
77+
*/
78+
int available_bw = mul_u32_u32(symbol_clock * 72,
79+
drm_dp_bw_channel_coding_efficiency(true)) /
80+
1030000;
6281

6382
if (output_bpp * adjusted_mode->crtc_clock >
64-
symbol_clock * 72) {
83+
available_bw) {
6584
drm_dbg_kms(&i915->drm, "UHBR check failed(required bw %d available %d)\n",
66-
output_bpp * adjusted_mode->crtc_clock, symbol_clock * 72);
85+
output_bpp * adjusted_mode->crtc_clock, available_bw);
6786
return -EINVAL;
6887
}
6988
}

0 commit comments

Comments
 (0)