On Tue, 2026-06-09 at 16:46 +0300, Imre Deak wrote: > On Mon, Jun 08, 2026 at 05:11:19PM +0300, Jouni Högander wrote: > > Intel_dsc_enabled_on_link is not really about DSC being enabled on > > crtc. It > > is telling if FEC is enabled on link. Instead of > > intel_dsc_enabled_on_link > > check status directly from crtc->dsc.compression_enable. > > > > Also rename intel_dsc_enabled_on_link as intel_fec_enabled_on_link. > > The reason to track the DSC enabled state on the MST link as a whole > was > to determine if that enabled state is compatible with enabling Panel > Replay anywhere on the same link, according to the restrictions > indicated by the branch device via > > DP_PANEL_REPLAY_CAP_CAPABILITY 0xb1 > > For instance, if there is only one branch device in a hub/dock, DSC > will > be enabled for the branch device as a whole (via DSC_ENABLE 0x160) if > any stream is compressed, while there could be other uncompressed > streams going through the same branch device. Based on the definition > of > the DP_PANEL_REPLAY_CAP_CAPABILITY register, enabling the Panel > Replay > on any streams via the branch device - including the uncompressed > streams - should be done considering the branch device's enabled DSC > mode. IOW, enabling Panel Replay on an uncompressed stream through > the > branch device should consider any stream in compressed mode through > the > same branch device.
This case is not that well documented in the DP specification. Options here are (as I see them): 1. Keep dsc_enabled_on_link() and link_dsc_pipes renamed in patch 3/7 as they. Add link_fec_pipes and move all FEC enabling to use that instead of link_fec_pipes. Check during panel replay compute config if branch device is doing decoding and capable to decode DSC/Panel Replay stream and choose if Panel Replay can be enabled or not. 2. Keep changes in my patches and add one more patch to disable Panel Replay completely for this case as it anyways seems to be not that well documented in DP spec. Might be also that devices having this case + Panel Replay capability doesn't even exist. > > The above is in contrast to the case where DSC/Panel Replay of each > of > the DFP connectors of the hub can be controlled via a per-DFP > peer-to-peer branch device. Thank you Imre for pointing this out. I missed this one branch device case completely. BR, Jouni Högander > > > Signed-off-by: Jouni Högander <[email protected]> > > --- > > drivers/gpu/drm/i915/display/intel_psr.c | 6 +++--- > > drivers/gpu/drm/i915/display/intel_vdsc.c | 2 +- > > drivers/gpu/drm/i915/display/intel_vdsc.h | 2 +- > > 3 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c > > b/drivers/gpu/drm/i915/display/intel_psr.c > > index ad2f6c79f5808..f58200d38ac2c 100644 > > --- a/drivers/gpu/drm/i915/display/intel_psr.c > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c > > @@ -1740,7 +1740,7 @@ static bool > > intel_sel_update_config_valid(struct intel_crtc_state *crtc_state, > > if (!connector->dp.panel_replay_caps.su_support) > > goto unsupported; > > > > - if (intel_dsc_enabled_on_link(crtc_state) && > > + if (crtc_state->dsc.compression_enable && > > connector->dp.panel_replay_caps.dsc_support != > > INTEL_DP_PANEL_REPLAY_DSC_SELECTIVE_UPDATE) { > > drm_dbg_kms(display->drm, > > @@ -1840,7 +1840,7 @@ static bool > > _panel_replay_compute_config(struct intel_crtc_state *crtc_state, > > return false; > > } > > > > - if (intel_dsc_enabled_on_link(crtc_state) && > > + if (crtc_state->dsc.compression_enable && > > connector->dp.panel_replay_caps.dsc_support == > > INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED) { > > drm_dbg_kms(display->drm, > > @@ -3235,7 +3235,7 @@ verify_panel_replay_dsc_state(const struct > > intel_crtc_state *crtc_state) > > return; > > > > drm_WARN_ON(display->drm, > > - intel_dsc_enabled_on_link(crtc_state) && > > + crtc_state->dsc.compression_enable && > > crtc_state->panel_replay_dsc_support == > > INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED); > > } > > diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c > > b/drivers/gpu/drm/i915/display/intel_vdsc.c > > index 8f06c3a4d56df..35c93fcbb6427 100644 > > --- a/drivers/gpu/drm/i915/display/intel_vdsc.c > > +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c > > @@ -431,7 +431,7 @@ void intel_dsc_enable_on_crtc(struct > > intel_crtc_state *crtc_state) > > crtc_state->dsc.compression_enable = true; > > } > > > > -bool intel_dsc_enabled_on_link(const struct intel_crtc_state > > *crtc_state) > > +bool intel_fec_enabled_on_link(const struct intel_crtc_state > > *crtc_state) > > { > > struct intel_display *display = > > to_intel_display(crtc_state); > > > > diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.h > > b/drivers/gpu/drm/i915/display/intel_vdsc.h > > index 3372f8694054d..60d86399808c0 100644 > > --- a/drivers/gpu/drm/i915/display/intel_vdsc.h > > +++ b/drivers/gpu/drm/i915/display/intel_vdsc.h > > @@ -28,7 +28,7 @@ void intel_dsc_enable(const struct > > intel_crtc_state *crtc_state); > > void intel_dsc_disable(const struct intel_crtc_state *crtc_state); > > int intel_dsc_compute_params(struct intel_crtc_state > > *pipe_config); > > void intel_dsc_enable_on_crtc(struct intel_crtc_state > > *crtc_state); > > -bool intel_dsc_enabled_on_link(const struct intel_crtc_state > > *crtc_state); > > +bool intel_fec_enabled_on_link(const struct intel_crtc_state > > *crtc_state); > > void intel_dsc_get_config(struct intel_crtc_state *crtc_state); > > enum intel_display_power_domain > > intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder > > cpu_transcoder); > > -- > > 2.43.0 > >
