From: Jeykumar Sankaran <jsanka@codeaurora.org>
To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org
Cc: hoegsberg@google.com, seanpaul@chromium.org
Subject: [PATCH v2 3/7] drm/msm/dpu: release resources on modeset failure
Date: Wed, 13 Feb 2019 17:19:12 -0800 [thread overview]
Message-ID: <1550107156-17625-4-git-send-email-jsanka@codeaurora.org> (raw)
In-Reply-To: <1550107156-17625-1-git-send-email-jsanka@codeaurora.org>
release resources allocated in mode_set if any of
the hw check fails. Most of these checks are not
necessary and they will be removed in the follow up
patches with state based resource allocations.
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 941ac25..45617b9 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -1025,13 +1025,13 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc,
if (!dpu_enc->hw_pp[i]) {
DPU_ERROR_ENC(dpu_enc, "no pp block assigned"
"at idx: %d\n", i);
- return;
+ goto error;
}
if (!hw_ctl[i]) {
DPU_ERROR_ENC(dpu_enc, "no ctl block assigned"
"at idx: %d\n", i);
- return;
+ goto error;
}
phys->hw_pp = dpu_enc->hw_pp[i];
@@ -1044,6 +1044,9 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc,
}
dpu_enc->mode_set_complete = true;
+
+error:
+ dpu_rm_release(&dpu_kms->rm, drm_enc);
}
static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-02-14 1:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 1:19 [PATCH v2 0/7] move dpu resource parsing to encoder modeset Jeykumar Sankaran
[not found] ` <1550107156-17625-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-02-14 1:19 ` [PATCH v2 1/7] drm/msm/dpu: move hw_inf encoder baseclass Jeykumar Sankaran
[not found] ` <1550107156-17625-2-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-04 18:08 ` Sean Paul
2019-02-14 1:19 ` [PATCH v2 2/7] drm/msm/dpu: remove phys_vid subclass Jeykumar Sankaran
[not found] ` <1550107156-17625-3-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-04 18:08 ` Sean Paul
2019-02-14 1:19 ` [PATCH v2 4/7] drm/msm/dpu: dont use encoder->crtc in atomic path Jeykumar Sankaran
[not found] ` <1550107156-17625-5-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-04 18:09 ` Sean Paul
2019-03-07 2:03 ` Jeykumar Sankaran
[not found] ` <ba0f304a0a28ed2be2ac585b671cfb1f-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-07 22:08 ` Sean Paul
2019-02-14 1:19 ` [PATCH v2 5/7] drm/msm/dpu: map mixer/ctl hw blocks in encoder modeset Jeykumar Sankaran
[not found] ` <1550107156-17625-6-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-04 18:12 ` Sean Paul
2019-02-14 1:19 ` [PATCH v2 6/7] drm/msm/dpu: assign intf to encoder in mode_set Jeykumar Sankaran
[not found] ` <1550107156-17625-7-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-04 18:15 ` Sean Paul
2019-02-14 1:19 ` [PATCH v2 7/7] drm/msm/dpu: check split role for single flush Jeykumar Sankaran
[not found] ` <1550107156-17625-8-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-04 18:16 ` Sean Paul
2019-02-14 1:39 ` [PATCH v2 0/7] move dpu resource parsing to encoder modeset Jeykumar Sankaran
2019-03-04 18:48 ` Sean Paul
2019-02-14 1:19 ` Jeykumar Sankaran [this message]
[not found] ` <1550107156-17625-4-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2019-03-04 18:09 ` [PATCH v2 3/7] drm/msm/dpu: release resources on modeset failure Sean Paul
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=1550107156-17625-4-git-send-email-jsanka@codeaurora.org \
--to=jsanka@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=hoegsberg@google.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=seanpaul@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