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

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

 



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@xxxxxxxxxxxxxx>
Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

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);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux