diff options
author | Imre Deak <imre.deak@intel.com> | 2023-10-24 04:09:05 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2023-11-08 17:22:10 +0200 |
commit | d91680efcaaba6cc2e7cd83e4aa5e1d0f1c6f684 (patch) | |
tree | 4cc5c64756df0e8e1e581efd17b73833744a102a /drivers/gpu/drm/i915/display/intel_dp_mst.c | |
parent | c1d6a22b7219bd52c66e9e038a282ba79f04be1f (diff) | |
download | linux-d91680efcaaba6cc2e7cd83e4aa5e1d0f1c6f684.tar.gz linux-d91680efcaaba6cc2e7cd83e4aa5e1d0f1c6f684.tar.bz2 linux-d91680efcaaba6cc2e7cd83e4aa5e1d0f1c6f684.zip |
drm/i915/dp_mst: Enable FEC early once it's known DSC is needed
Enable FEC in crtc_state, as soon as it's known it will be needed by
DSC. This fixes the calculation of BW allocation overhead, in case DSC
is enabled by falling back to it during the encoder compute config
phase (vs. enabling FEC due to DSC being enabled on other streams).
v2:
- Enable FEC only in intel_dp_mst_find_vcpi_slots_for_bpp(), since
only by that will crtc_state->port_clock be set, which in turn is
needed by intel_dp_is_uhbr().
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> (v1)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-11-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dp_mst.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_dp_mst.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 6f9c9f3b5b12..28db1775d3a5 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -95,6 +95,13 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder, crtc_state->lane_count = limits->max_lane_count; crtc_state->port_clock = limits->max_rate; + if (dsc) { + if (!intel_dp_supports_fec(intel_dp, connector, crtc_state)) + return -EINVAL; + + crtc_state->fec_enable = !intel_dp_is_uhbr(crtc_state); + } + mst_state->pbn_div = drm_dp_get_vc_payload_bw(&intel_dp->mst_mgr, crtc_state->port_clock, crtc_state->lane_count); |