Re: [PATCH] drm/msm: Fix shutdown

From: Doug Anderson
Date: Wed May 04 2022 - 19:49:45 EST


Hi,

On Wed, May 4, 2022 at 4:29 PM Dmitry Baryshkov
<dmitry.baryshkov@xxxxxxxxxx> wrote:
>
> On Thu, 5 May 2022 at 01:49, Douglas Anderson <dianders@xxxxxxxxxxxx> wrote:
> >
> > When rebooting on my sc7280-herobrine based device, I got a
> > crash. Upon debugging, I found that I was in msm_drv_shutdown() and my
> > "pdev" was the one associated with mdss_probe().
> >
> > From source, I found that mdss_probe() has the line:
> > platform_set_drvdata(pdev, mdss);
> > ...where "mdss" is of type "struct msm_mdss *".msm_drv_probe
> >
> > Also from source, I saw that in msm_drv_shutdown() we have the line:
> > struct msm_drm_private *priv = platform_get_drvdata(pdev);
> >
> > This is a mismatch and is the root of the problem.
> >
> > Further digging made it apparent that msm_drv_shutdown() is only
> > supposed to be used for parts of the msm display framework that also
> > call msm_drv_probe() but mdss_probe() doesn't call
> > msm_drv_probe(). Let's remove the shutdown functon from msm_mdss.c.
> >
> > Digging a little further, code inspection found that two drivers that
> > use msm_drv_probe() weren't calling msm_drv_shutdown(). Let's add it
> > to them.
> >
> > Fixes: ecb23f2e3009 ("drm/msm: split the main platform driver")
>
> More likely:
> Fixes: 6874f48bb8b0 ("drm/msm: make mdp5/dpu devices master components")

Oh, I see! The commit I tagged is the one that set the shutdown in
msm_mdss.c, but at the time of that commit it actually _did_ call
msm_drv_probe().

v2 coming right up.

-Doug