diff mbox series

[2/6] drm/i915/dp: change the order of intel_dp_mtp_tu_compute_config() params

Message ID ea9669edc5973cdbca92aeb4e168850015e9d1bb.1738161945.git.jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series drm/i915: DP and DP MST cleanups | expand

Commit Message

Jani Nikula Jan. 29, 2025, 2:46 p.m. UTC
Pointers first, bpp params in min, max, step. This is slightly more
natural to follow.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c     | 2 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 8 +++-----
 drivers/gpu/drm/i915/display/intel_dp_mst.h | 3 +--
 3 files changed, 5 insertions(+), 8 deletions(-)

Comments

Imre Deak Jan. 30, 2025, 2:03 p.m. UTC | #1
On Wed, Jan 29, 2025 at 04:46:34PM +0200, Jani Nikula wrote:
> Pointers first, bpp params in min, max, step. This is slightly more
> natural to follow.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

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

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c     | 2 +-
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 8 +++-----
>  drivers/gpu/drm/i915/display/intel_dp_mst.h | 3 +--
>  3 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index d367f9c2fa23..c387de69d55e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2643,9 +2643,9 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
>  		if (!ret && intel_dp_is_uhbr(pipe_config))
>  			ret = intel_dp_mtp_tu_compute_config(intel_dp,
>  							     pipe_config,
> +							     conn_state,
>  							     pipe_config->pipe_bpp,
>  							     pipe_config->pipe_bpp,
> -							     conn_state,
>  							     0, false);
>  		if (ret)
>  			dsc_needed = true;
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 2acc26aad6a0..98d7cdddfead 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -211,9 +211,8 @@ static int intel_dp_mst_dsc_get_slice_count(const struct intel_connector *connec
>  
>  int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
>  				   struct intel_crtc_state *crtc_state,
> -				   int max_bpp, int min_bpp,
>  				   struct drm_connector_state *conn_state,
> -				   int step, bool dsc)
> +				   int min_bpp, int max_bpp, int step, bool dsc)
>  {
>  	struct intel_display *display = to_intel_display(intel_dp);
>  	struct drm_atomic_state *state = crtc_state->uapi.state;
> @@ -380,9 +379,8 @@ static int mst_stream_find_vcpi_slots_for_bpp(struct intel_dp *intel_dp,
>  	mst_state->pbn_div = drm_dp_get_vc_payload_bw(crtc_state->port_clock,
>  						      crtc_state->lane_count);
>  
> -	return intel_dp_mtp_tu_compute_config(intel_dp, crtc_state,
> -					      max_bpp, min_bpp,
> -					      conn_state, step, dsc);
> +	return intel_dp_mtp_tu_compute_config(intel_dp, crtc_state, conn_state,
> +					      min_bpp, max_bpp, step, dsc);
>  }
>  
>  static int mst_stream_compute_link_config(struct intel_dp *intel_dp,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h b/drivers/gpu/drm/i915/display/intel_dp_mst.h
> index c6bdc1d190a4..a713a1c10154 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
> @@ -33,8 +33,7 @@ bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
>  
>  int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
>  				   struct intel_crtc_state *crtc_state,
> -				   int max_bpp, int min_bpp,
>  				   struct drm_connector_state *conn_state,
> -				   int step, bool dsc);
> +				   int min_bpp, int max_bpp, int step, bool dsc);
>  
>  #endif /* __INTEL_DP_MST_H__ */
> -- 
> 2.39.5
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index d367f9c2fa23..c387de69d55e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2643,9 +2643,9 @@  intel_dp_compute_link_config(struct intel_encoder *encoder,
 		if (!ret && intel_dp_is_uhbr(pipe_config))
 			ret = intel_dp_mtp_tu_compute_config(intel_dp,
 							     pipe_config,
+							     conn_state,
 							     pipe_config->pipe_bpp,
 							     pipe_config->pipe_bpp,
-							     conn_state,
 							     0, false);
 		if (ret)
 			dsc_needed = true;
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 2acc26aad6a0..98d7cdddfead 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -211,9 +211,8 @@  static int intel_dp_mst_dsc_get_slice_count(const struct intel_connector *connec
 
 int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
 				   struct intel_crtc_state *crtc_state,
-				   int max_bpp, int min_bpp,
 				   struct drm_connector_state *conn_state,
-				   int step, bool dsc)
+				   int min_bpp, int max_bpp, int step, bool dsc)
 {
 	struct intel_display *display = to_intel_display(intel_dp);
 	struct drm_atomic_state *state = crtc_state->uapi.state;
@@ -380,9 +379,8 @@  static int mst_stream_find_vcpi_slots_for_bpp(struct intel_dp *intel_dp,
 	mst_state->pbn_div = drm_dp_get_vc_payload_bw(crtc_state->port_clock,
 						      crtc_state->lane_count);
 
-	return intel_dp_mtp_tu_compute_config(intel_dp, crtc_state,
-					      max_bpp, min_bpp,
-					      conn_state, step, dsc);
+	return intel_dp_mtp_tu_compute_config(intel_dp, crtc_state, conn_state,
+					      min_bpp, max_bpp, step, dsc);
 }
 
 static int mst_stream_compute_link_config(struct intel_dp *intel_dp,
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h b/drivers/gpu/drm/i915/display/intel_dp_mst.h
index c6bdc1d190a4..a713a1c10154 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
@@ -33,8 +33,7 @@  bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
 
 int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
 				   struct intel_crtc_state *crtc_state,
-				   int max_bpp, int min_bpp,
 				   struct drm_connector_state *conn_state,
-				   int step, bool dsc);
+				   int min_bpp, int max_bpp, int step, bool dsc);
 
 #endif /* __INTEL_DP_MST_H__ */