drm/i915: Extract intel_dp_joiner_needs_dsc()
Pull the "does joiner need DSC?" check into a helper. MST will want to use this too at some point. Tested-by: Vidya Srinivas <vidya.srinivas@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240404213441.17637-9-ville.syrjala@linux.intel.com
This commit is contained in:
parent
c0b8afc3a7
commit
aa099402f9
@ -1310,11 +1310,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
|
||||
dsc = dsc_max_compressed_bpp && dsc_slice_count;
|
||||
}
|
||||
|
||||
/*
|
||||
* Big joiner configuration needs DSC for TGL which is not true for
|
||||
* XE_LPD where uncompressed joiner is supported.
|
||||
*/
|
||||
if (DISPLAY_VER(dev_priv) < 13 && bigjoiner && !dsc)
|
||||
if (intel_dp_joiner_needs_dsc(dev_priv, bigjoiner) && !dsc)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
if (mode_rate > max_rate && !dsc)
|
||||
@ -2405,6 +2401,16 @@ int intel_dp_config_required_rate(const struct intel_crtc_state *crtc_state)
|
||||
return intel_dp_link_required(adjusted_mode->crtc_clock, bpp);
|
||||
}
|
||||
|
||||
bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915, bool use_joiner)
|
||||
{
|
||||
/*
|
||||
* Pipe joiner needs compression up to display 12 due to bandwidth
|
||||
* limitation. DG2 onwards pipe joiner can be enabled without
|
||||
* compression.
|
||||
*/
|
||||
return DISPLAY_VER(i915) < 13 && use_joiner;
|
||||
}
|
||||
|
||||
static int
|
||||
intel_dp_compute_link_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_state *pipe_config,
|
||||
@ -2419,8 +2425,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
|
||||
&pipe_config->hw.adjusted_mode;
|
||||
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
|
||||
struct link_config_limits limits;
|
||||
bool joiner_needs_dsc = false;
|
||||
bool dsc_needed;
|
||||
bool dsc_needed, joiner_needs_dsc;
|
||||
int ret = 0;
|
||||
|
||||
if (pipe_config->fec_enable &&
|
||||
@ -2431,12 +2436,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
|
||||
adjusted_mode->crtc_clock))
|
||||
pipe_config->bigjoiner_pipes = GENMASK(crtc->pipe + 1, crtc->pipe);
|
||||
|
||||
/*
|
||||
* Pipe joiner needs compression up to display 12 due to bandwidth
|
||||
* limitation. DG2 onwards pipe joiner can be enabled without
|
||||
* compression.
|
||||
*/
|
||||
joiner_needs_dsc = DISPLAY_VER(i915) < 13 && pipe_config->bigjoiner_pipes;
|
||||
joiner_needs_dsc = intel_dp_joiner_needs_dsc(i915, pipe_config->bigjoiner_pipes);
|
||||
|
||||
dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
|
||||
!intel_dp_compute_config_limits(intel_dp, pipe_config,
|
||||
|
@ -120,6 +120,7 @@ int intel_dp_effective_data_rate(int pixel_clock, int bpp_x16,
|
||||
int bw_overhead);
|
||||
int intel_dp_max_link_data_rate(struct intel_dp *intel_dp,
|
||||
int max_dprx_rate, int max_dprx_lanes);
|
||||
bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915, bool use_joiner);
|
||||
bool intel_dp_has_bigjoiner(struct intel_dp *intel_dp);
|
||||
bool intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
|
||||
const struct drm_connector_state *conn_state);
|
||||
|
@ -1377,11 +1377,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
|
||||
dsc = dsc_max_compressed_bpp && dsc_slice_count;
|
||||
}
|
||||
|
||||
/*
|
||||
* Big joiner configuration needs DSC for TGL which is not true for
|
||||
* XE_LPD where uncompressed joiner is supported.
|
||||
*/
|
||||
if (DISPLAY_VER(dev_priv) < 13 && bigjoiner && !dsc) {
|
||||
if (intel_dp_joiner_needs_dsc(dev_priv, bigjoiner) && !dsc) {
|
||||
*status = MODE_CLOCK_HIGH;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user