Re: [PATCH 07/19] drm/i915/display: Use joined pipes in intel_dp_joiner_needs_dsc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 12, 2024 at 03:50:34PM +0530, Nautiyal, Ankit K wrote:
> 
> On 9/12/2024 1:47 AM, Ville Syrjälä wrote:
> > On Wed, Sep 11, 2024 at 06:43:37PM +0530, Ankit Nautiyal wrote:
> >> In preparation of ultrajoiner, use number of joined pipes in the
> >> intel_dp_joiner_needs_dsc helper, instead of joiner flag.
> >>
> >> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx>
> >> ---
> >>   drivers/gpu/drm/i915/display/intel_dp.c     | 9 +++++----
> >>   drivers/gpu/drm/i915/display/intel_dp.h     | 3 ++-
> >>   drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 +++--
> >>   3 files changed, 10 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> >> index 65044f63d1f5..6c503b5968d2 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> >> @@ -1412,7 +1412,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
> >>   		dsc = dsc_max_compressed_bpp && dsc_slice_count;
> >>   	}
> >>   
> >> -	if (intel_dp_joiner_needs_dsc(dev_priv, joiner) && !dsc)
> >> +	if (intel_dp_joiner_needs_dsc(dev_priv, num_joined_pipes) && !dsc)
> >>   		return MODE_CLOCK_HIGH;
> >>   
> >>   	if (mode_rate > max_rate && !dsc)
> >> @@ -2520,14 +2520,15 @@ 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)
> >> +bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915,
> >> +			       int num_joined_pipes)
> >>   {
> >>   	/*
> >>   	 * 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;
> >> +	return DISPLAY_VER(i915) < 13 && (num_joined_pipes == 2);
> > Pointless parens.
> 
> Noted. Will remove these.
> 
> Besides this, I am wondering if I should change the variable 
> num_joined_pipes to num_pipes or num_pipes_used? So its values 1, 2, 4 
> make more sense?

I think 'num_joined_pipes' might be the best since it reminds the
casual reader that this can have something do with joining, as
opposed to just about the number of pipes generally available on
the platform/etc.

-- 
Ville Syrjälä
Intel



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux