From: abhinavk@codeaurora.org
To: Fabio Estevam <festevam@gmail.com>
Cc: robdclark@gmail.com, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, dmitry.baryshkov@linaro.org,
stable@vger.kernel.org
Subject: Re: [Freedreno] [PATCH] drm/msm: Do not run snapshot on non-DPU devices
Date: Wed, 15 Sep 2021 19:22:25 -0700 [thread overview]
Message-ID: <96038e06b1141ad3348611a25544356e@codeaurora.org> (raw)
In-Reply-To: <20210914174831.2044420-1-festevam@gmail.com>
Hi Fabio
On 2021-09-14 10:48, Fabio Estevam wrote:
> Since commit 98659487b845 ("drm/msm: add support to take dpu snapshot")
> the following NULL pointer dereference is seen on i.MX53:
>
> [ 3.275493] msm msm: bound 30000000.gpu (ops a3xx_ops)
> [ 3.287174] [drm] Initialized msm 1.8.0 20130625 for msm on minor 0
> [ 3.293915] 8<--- cut here ---
> [ 3.297012] Unable to handle kernel NULL pointer dereference at
> virtual address 00000028
> [ 3.305244] pgd = (ptrval)
> [ 3.307989] [00000028] *pgd=00000000
> [ 3.311624] Internal error: Oops: 805 [#1] SMP ARM
> [ 3.316430] Modules linked in:
> [ 3.319503] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
> 5.14.0+g682d702b426b #1
> [ 3.326652] Hardware name: Freescale i.MX53 (Device Tree Support)
> [ 3.332754] PC is at __mutex_init+0x14/0x54
> [ 3.336969] LR is at msm_disp_snapshot_init+0x24/0xa0
>
> i.MX53 does not use the DPU controller.
>
> Fix the problem by only calling msm_disp_snapshot_init() on platforms
> that
> use the DPU controller.
>
> Cc: stable@vger.kernel.org
> Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot")
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c
> b/drivers/gpu/drm/msm/msm_drv.c
> index 2e6fc185e54d..2aa2266454b7 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -630,10 +630,11 @@ static int msm_drm_init(struct device *dev,
> const struct drm_driver *drv)
> if (ret)
> goto err_msm_uninit;
>
> - ret = msm_disp_snapshot_init(ddev);
> - if (ret)
> - DRM_DEV_ERROR(dev, "msm_disp_snapshot_init failed ret = %d\n", ret);
> -
> + if (kms) {
> + ret = msm_disp_snapshot_init(ddev);
> + if (ret)
> + DRM_DEV_ERROR(dev, "msm_disp_snapshot_init failed ret = %d\n",
> ret);
> + }
Are you not using DPU or are you not using mdp4/mdp5 as well? Even if
you are using any of mdps, kms should
not be NULL. Hence wanted to check the test case.
> drm_mode_config_reset(ddev);
>
> #ifdef CONFIG_DRM_FBDEV_EMULATION
next prev parent reply other threads:[~2021-09-16 2:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 17:48 [PATCH] drm/msm: Do not run snapshot on non-DPU devices Fabio Estevam
2021-09-16 2:22 ` abhinavk [this message]
2021-09-16 11:42 ` [Freedreno] " Fabio Estevam
2021-09-16 16:15 ` abhinavk
2021-09-16 16:24 ` Fabio Estevam
2021-09-16 16:37 ` abhinavk
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=96038e06b1141ad3348611a25544356e@codeaurora.org \
--to=abhinavk@codeaurora.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=freedreno@lists.freedesktop.org \
--cc=robdclark@gmail.com \
--cc=stable@vger.kernel.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