Re: [PATCH 12/14] drm/i915/dp: Drop compute_pipe_bpp parameter from intel_dp_dsc_compute_config()

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

 



On Fri, Jan 31, 2025 at 02:50:05PM +0200, Jani Nikula wrote:
> The parameter is basically just a proxy for whether the function is
> being called for DP SST or DP MST. We can figure this out from crtc
> state.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Reviewed-by: Imre Deak <imre.deak@xxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c     | 14 ++++++--------
>  drivers/gpu/drm/i915/display/intel_dp.h     |  3 +--
>  drivers/gpu/drm/i915/display/intel_dp_mst.c |  2 +-
>  3 files changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 7c6d277729d0..0f1fa4afb808 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2307,8 +2307,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
>  				struct intel_crtc_state *pipe_config,
>  				struct drm_connector_state *conn_state,
>  				const struct link_config_limits *limits,
> -				int timeslots,
> -				bool compute_pipe_bpp)
> +				int timeslots)
>  {
>  	struct intel_display *display = to_intel_display(intel_dp);
>  	const struct intel_connector *connector =
> @@ -2316,6 +2315,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
>  	const struct drm_display_mode *adjusted_mode =
>  		&pipe_config->hw.adjusted_mode;
>  	int num_joined_pipes = intel_crtc_num_joined_pipes(pipe_config);
> +	bool is_mst = intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST);
>  	int ret;
>  
>  	intel_dp_fec_compute_config(intel_dp, pipe_config);
> @@ -2324,12 +2324,10 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
>  		return -EINVAL;
>  
>  	/*
> -	 * compute pipe bpp is set to false for DP MST DSC case
> -	 * and compressed_bpp is calculated same time once
> -	 * vpci timeslots are allocated, because overall bpp
> -	 * calculation procedure is bit different for MST case.
> +	 * Link parameters, pipe bpp and compressed bpp have already been
> +	 * figured out for DP MST DSC.
>  	 */
> -	if (compute_pipe_bpp) {
> +	if (!is_mst) {
>  		if (intel_dp_is_edp(intel_dp))
>  			ret = intel_edp_dsc_compute_pipe_bpp(intel_dp, pipe_config,
>  							     conn_state, limits);
> @@ -2640,7 +2638,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
>  			return -EINVAL;
>  
>  		ret = intel_dp_dsc_compute_config(intel_dp, pipe_config,
> -						  conn_state, &limits, 64, true);
> +						  conn_state, &limits, 64);
>  		if (ret < 0)
>  			return ret;
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index ffc27f8ad226..9189db4c2594 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -76,8 +76,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
>  				struct intel_crtc_state *pipe_config,
>  				struct drm_connector_state *conn_state,
>  				const struct link_config_limits *limits,
> -				int timeslots,
> -				bool recompute_pipe_bpp);
> +				int timeslots);
>  void intel_dp_audio_compute_config(struct intel_encoder *encoder,
>  				   struct intel_crtc_state *pipe_config,
>  				   struct drm_connector_state *conn_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 60b003bcd1ee..868d0948ca27 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -657,7 +657,7 @@ static int mst_stream_compute_config(struct intel_encoder *encoder,
>  
>  		ret = intel_dp_dsc_compute_config(intel_dp, pipe_config,
>  						  conn_state, &limits,
> -						  pipe_config->dp_m_n.tu, false);
> +						  pipe_config->dp_m_n.tu);
>  	}
>  
>  	if (ret)
> -- 
> 2.39.5
> 



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

  Powered by Linux