[Intel-gfx] [PATCH] drm/i915: Fix intel_dp_atomic_find_vcpi_slots function

Stanislav Lisovskiy stanislav.lisovskiy at intel.com
Tue Sep 6 10:23:29 UTC 2022


drm_dp_atomic_find_vcpi_slots no longer exists and needs
to be used as drm_dp_atomic_find_time_slots.
Also rename the function itself.

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
Fixes: 7ae5ab441402 ("Extract drm_dp_atomic_find_vcpi_slots cycle to separate function")
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 8869b7707cda..54a7b31162c2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -44,7 +44,7 @@
 #include "intel_hotplug.h"
 #include "skl_scaler.h"
 
-static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
+static int intel_dp_mst_find_time_slots_for_bpp(struct intel_encoder *encoder,
 						struct intel_crtc_state *crtc_state,
 						int max_bpp,
 						int min_bpp,
@@ -64,7 +64,6 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
 		&crtc_state->hw.adjusted_mode;
 	int bpp, slots = -EINVAL;
 	int ret = 0;
-	int pbn_div;
 
 	mst_state = drm_atomic_get_mst_topology_state(state, &intel_dp->mst_mgr);
 	if (IS_ERR(mst_state))
@@ -73,9 +72,9 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
 	crtc_state->lane_count = limits->max_lane_count;
 	crtc_state->port_clock = limits->max_rate;
 
-	pbn_div = drm_dp_get_vc_payload_bw(&intel_dp->mst_mgr,
-					   crtc_state->port_clock,
-					   crtc_state->lane_count);
+	mst_state->pbn_div = drm_dp_get_vc_payload_bw(&intel_dp->mst_mgr,
+						      crtc_state->port_clock,
+						      crtc_state->lane_count);
 
 	for (bpp = max_bpp; bpp >= min_bpp; bpp -= step) {
 		crtc_state->pipe_bpp = bpp;
@@ -84,10 +83,9 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
 						       dsc ? bpp << 4 : crtc_state->pipe_bpp,
 						       dsc);
 
-		slots = drm_dp_atomic_find_vcpi_slots(state, &intel_dp->mst_mgr,
+		slots = drm_dp_atomic_find_time_slots(state, &intel_dp->mst_mgr,
 						      connector->port,
-						      crtc_state->pbn,
-						      pbn_div);
+						      crtc_state->pbn);
 		if (slots == -EDEADLK)
 			return slots;
 
@@ -126,7 +124,7 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 	bool constant_n = drm_dp_has_quirk(&intel_dp->desc, DP_DPCD_QUIRK_CONSTANT_N);
 	int slots = -EINVAL;
 
-	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, limits->max_bpp,
+	slots = intel_dp_mst_find_time_slots_for_bpp(encoder, crtc_state, limits->max_bpp,
 						     limits->min_bpp, limits,
 						     conn_state, 2 * 3, false);
 
@@ -184,7 +182,7 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	drm_dbg_kms(&i915->drm, "DSC Sink supported min bpp %d max bpp %d\n",
 		    min_bpp, max_bpp);
 
-	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
+	slots = intel_dp_mst_find_time_slots_for_bpp(encoder, crtc_state, max_bpp,
 						     min_bpp, limits,
 						     conn_state, 2 * 3, true);
 
-- 
2.37.3



More information about the Intel-gfx mailing list