[v2,3/4] drm/msm/dpu: remove reserve in encoder mode_set

Submitted by Jeykumar Sankaran on Feb. 14, 2019, 1:52 a.m.

Details

Message ID 1550109142-28303-4-git-send-email-jsanka@codeaurora.org
State New
Headers show
Series "reserve RM resources in private obj state" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Jeykumar Sankaran Feb. 14, 2019, 1:52 a.m.
Now that we have dpu private state tracking the reserved
HW resources, we have access to them after atomic swap.
So avoid reserving the resources in mode_set.

changes in v2:
	- removal applied on private object based reservation

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index bd646c5..86c025b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -605,8 +605,6 @@  static int dpu_encoder_virt_atomic_check(
 	}
 
 	/*
-	 * Reserve dynamic resources now. Indicating AtomicTest phase
-	 *
 	 * Avoid reserving resources when mode set is pending. Topology
 	 * info may not be available to complete reservation.
 	 */
@@ -620,7 +618,7 @@  static int dpu_encoder_virt_atomic_check(
 					       to_dpu_crtc(crtc_state->crtc));
 
 		ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc,
-				     &dpu_priv_state->base, topology, true);
+				     &dpu_priv_state->base, topology, false);
 		dpu_enc->mode_set_complete = false;
 	}
 
@@ -966,10 +964,9 @@  static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc,
 	struct drm_connector *conn = NULL, *conn_iter;
 	struct drm_crtc *drm_crtc;
 	struct dpu_crtc_state *dpu_cstate;
-	struct msm_display_topology topology;
 	struct dpu_crtc *dpu_crtc;
 	struct dpu_private_state *dpu_private_state;
-	int i, j, ret;
+	int i, j;
 
 	if (!drm_enc) {
 		DPU_ERROR("invalid encoder\n");
@@ -1001,18 +998,7 @@  static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc,
 		if (drm_crtc->state->encoder_mask & drm_encoder_mask(drm_enc))
 			break;
 
-	topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode);
 	dpu_crtc = to_dpu_crtc(drm_crtc);
-
-	/* Reserve dynamic resources now. Indicating non-AtomicTest phase */
-	ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, dpu_crtc->priv_obj.state,
-			     topology, false);
-	if (ret) {
-		DPU_ERROR_ENC(dpu_enc,
-			     "failed to reserve hw resources, %d\n", ret);
-		return;
-	}
-
 	dpu_cstate = to_dpu_crtc_state(drm_crtc->state);
 	dpu_private_state = container_of(dpu_crtc->priv_obj.state,
 					 struct dpu_private_state, base);