On Mon, Oct 08, 2018 at 09:27:28PM -0700, Jeykumar Sankaran wrote: > Now that we have crtc state tracking the reserved > HW resources, we have access to them after atomic swap. > So avoid reserving the resources in mode_set. > > Signed-off-by: Jeykumar Sankaran <jsanka@xxxxxxxxxxxxxx> Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 17 ++--------------- > 1 file changed, 2 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index a8fd14e..dd482ca 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -636,7 +636,6 @@ static int dpu_encoder_virt_atomic_check( > > topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); > > - /* Reserve dynamic resources now. Indicating AtomicTest phase */ > if (!ret) { > /* > * Avoid reserving resources when mode set is pending. Topology > @@ -645,7 +644,7 @@ static int dpu_encoder_virt_atomic_check( > if (drm_atomic_crtc_needs_modeset(crtc_state) > && dpu_enc->mode_set_complete) { > ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, crtc_state, > - topology, true); > + topology, false); > dpu_enc->mode_set_complete = false; > } > } > @@ -1002,8 +1001,7 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, > struct list_head *connector_list; > struct drm_connector *conn = NULL, *conn_iter; > struct dpu_crtc_state *dpu_cstate; > - struct msm_display_topology topology; > - int i = 0, ret; > + int i = 0; > > if (!drm_enc) { > DPU_ERROR("invalid encoder\n"); > @@ -1031,17 +1029,6 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, > return; > } > > - topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); > - > - /* Reserve dynamic resources now. Indicating non-AtomicTest phase */ > - ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, drm_enc->crtc->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_enc->crtc->state); > > for (i = 0; i < dpu_enc->num_phys_encs; i++) { > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > > _______________________________________________ > Freedreno mailing list > Freedreno@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/freedreno -- Sean Paul, Software Engineer, Google / Chromium OS