From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>, Jonathan Marek <jonathan@marek.ca>,
Stephen Boyd <sboyd@kernel.org>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
freedreno <freedreno@lists.freedesktop.org>
Subject: Re: [PATCH] gpu/drm/msm: fix shutdown hook in case GPU components failed to bind
Date: Thu, 18 Mar 2021 23:05:36 +0300 [thread overview]
Message-ID: <b0f44785-b56b-5451-9e7a-e75821d34563@linaro.org> (raw)
In-Reply-To: <CAF6AEGsN4s_wF0kHx4Y=vMM3AMTCewE4oiBdaxguVAku_nkODw@mail.gmail.com>
On 17/03/2021 19:25, Rob Clark wrote:
> On Mon, Mar 1, 2021 at 1:41 PM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
>>
>> if GPU components have failed to bind, shutdown callback would fail with
>> the following backtrace. Add safeguard check to stop that oops from
>> happening and allow the board to reboot.
[skipped]
>> diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c
>> index 6a326761dc4a..2fd0cf6421ad 100644
>> --- a/drivers/gpu/drm/msm/msm_atomic.c
>> +++ b/drivers/gpu/drm/msm/msm_atomic.c
>> @@ -207,7 +207,12 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
>> struct msm_kms *kms = priv->kms;
>> struct drm_crtc *async_crtc = NULL;
>> unsigned crtc_mask = get_crtc_mask(state);
>> - bool async = kms->funcs->vsync_time &&
>> + bool async;
>> +
>> + if (!kms)
>> + return;
>
> I think we could instead just check for null priv->kms in
> msm_pdev_shutdown() and not call drm_atomic_helper_shutdown()?
Good idea. Sending v2.
>
> BR,
> -R
>
>> +
>> + async = kms->funcs->vsync_time &&
>> can_do_async(state, &async_crtc);
>>
>> trace_msm_atomic_commit_tail_start(async, crtc_mask);
>> --
>> 2.30.1
>>
--
With best wishes
Dmitry
next prev parent reply other threads:[~2021-03-18 20:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 21:41 [PATCH] gpu/drm/msm: fix shutdown hook in case GPU components failed to bind Dmitry Baryshkov
2021-03-04 0:22 ` abhinavk
2021-03-17 16:25 ` Rob Clark
2021-03-18 20:05 ` Dmitry Baryshkov [this message]
2021-03-19 12:09 ` Fabio Estevam
2021-03-19 14:47 ` Rob Clark
2021-03-19 15:13 ` Fabio Estevam
2021-03-19 15:30 ` Rob Clark
2021-03-19 16:24 ` Fabio Estevam
2021-03-22 10:12 ` Dmitry Baryshkov
-- strict thread matches above, loose matches on Subject: below --
2021-03-18 20:05 Dmitry Baryshkov
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=b0f44785-b56b-5451-9e7a-e75821d34563@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sboyd@kernel.org \
--cc=sean@poorly.run \
/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