From: Kalyan Thota <quic_kalyant@quicinc.com>
To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org, devicetree@vger.kernel.org
Cc: Kalyan Thota <quic_kalyant@quicinc.com>,
linux-kernel@vger.kernel.org, robdclark@chromium.org,
dianders@chromium.org, swboyd@chromium.org,
quic_vpolimer@quicinc.com, dmitry.baryshkov@linaro.org,
quic_abhinavk@quicinc.com, marijn.suijten@somainline.org
Subject: [PATCH v3 3/4] drm/msm/dpu: avoid unnecessary check in DPU reservations
Date: Wed, 8 Feb 2023 05:42:03 -0800 [thread overview]
Message-ID: <1675863724-28412-4-git-send-email-quic_kalyant@quicinc.com> (raw)
In-Reply-To: <1675863724-28412-1-git-send-email-quic_kalyant@quicinc.com>
Return immediately on failure, this will make dpu reservations
part look cleaner.
Signed-off-by: Kalyan Thota <quic_kalyant@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 46d2a5c..3920efd 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -636,25 +636,22 @@ static int dpu_encoder_virt_atomic_check(
if (ret) {
DPU_ERROR_ENC(dpu_enc,
"mode unsupported, phys idx %d\n", i);
- break;
+ return ret;
}
}
topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode, crtc_state);
- /* Reserve dynamic resources now. */
- if (!ret) {
- /*
- * Release and Allocate resources on every modeset
- * Dont allocate when active is false.
- */
- if (drm_atomic_crtc_needs_modeset(crtc_state)) {
- dpu_rm_release(global_state, drm_enc);
+ /*
+ * Release and Allocate resources on every modeset
+ * Dont allocate when active is false.
+ */
+ if (drm_atomic_crtc_needs_modeset(crtc_state)) {
+ dpu_rm_release(global_state, drm_enc);
- if (!crtc_state->active_changed || crtc_state->active)
- ret = dpu_rm_reserve(&dpu_kms->rm, global_state,
- drm_enc, crtc_state, topology);
- }
+ if (!crtc_state->active_changed || crtc_state->active)
+ ret = dpu_rm_reserve(&dpu_kms->rm, global_state,
+ drm_enc, crtc_state, topology);
}
trace_dpu_enc_atomic_check_flags(DRMID(drm_enc), adj_mode->flags);
--
2.7.4
next prev parent reply other threads:[~2023-02-08 13:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 13:42 [PATCH v3 0/4] Reserve DSPPs based on user request Kalyan Thota
2023-02-08 13:42 ` [PATCH v3 1/4] drm/msm/dpu: clear DSPP reservations in rm release Kalyan Thota
2023-02-08 13:42 ` [PATCH v3 2/4] drm/msm/dpu: add DSPPs into reservation upon a CTM request Kalyan Thota
2023-02-08 13:42 ` Kalyan Thota [this message]
2023-02-08 13:42 ` [PATCH v3 4/4] drm/msm/dpu: reserve the resources on topology change Kalyan Thota
2023-02-08 14:30 ` Dmitry Baryshkov
2023-02-08 17:13 ` [PATCH v3 0/4] Reserve DSPPs based on user request Doug Anderson
2023-02-09 4:16 ` Kalyan Thota
2023-02-09 4:24 ` Doug Anderson
2023-02-09 11:26 ` Kalyan Thota
2023-02-09 15:45 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1675863724-28412-4-git-send-email-quic_kalyant@quicinc.com \
--to=quic_kalyant@quicinc.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_vpolimer@quicinc.com \
--cc=robdclark@chromium.org \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®