Re: [PATCH] gpu/drm/msm: fix shutdown hook in case GPU components failed to bind

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

 



On 17/03/2021 19:25, Rob Clark wrote:
On Mon, Mar 1, 2021 at 1:41 PM Dmitry Baryshkov
<dmitry.baryshkov@xxxxxxxxxx> 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
_______________________________________________
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