[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWOB7d-KE3F7aeZvVimNuy_U30uk=PND7=tWmPzCd7_eg@mail.gmail.com>
Date: Mon, 4 Sep 2023 09:27:48 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Douglas Anderson <dianders@...omium.org>
Cc: dri-devel@...ts.freedesktop.org,
Maxime Ripard <mripard@...nel.org>, airlied@...il.com,
biju.das.jz@...renesas.com, daniel@...ll.ch,
kieran.bingham+renesas@...asonboard.com,
laurent.pinchart@...asonboard.com, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, paul@...pouillou.net,
tzimmermann@...e.de
Subject: Re: [RFT PATCH 15/15] drm/renesas/shmobile: Call drm_helper_force_disable_all()
at shutdown/remove time
Hi Douglas,
On Sat, Sep 2, 2023 at 1:42 AM Douglas Anderson <dianders@...omium.org> wrote:
> Based on grepping through the source code, this driver appears to be
> missing a call to drm_atomic_helper_shutdown(), or in this case the
> non-atomic equivalent drm_helper_force_disable_all(), at system
> shutdown time and at driver remove time. This is important because
> drm_helper_force_disable_all() will cause panels to get disabled
> cleanly which may be important for their power sequencing. Future
> changes will remove any custom powering off in individual panel
> drivers so the DRM drivers need to start getting this right.
>
> The fact that we should call drm_atomic_helper_shutdown(), or in this
> case the non-atomic equivalent drm_helper_force_disable_all(), in the
> case of OS shutdown/restart comes straight out of the kernel doc
> "driver instance overview" in drm_drv.c.
>
> Suggested-by: Maxime Ripard <mripard@...nel.org>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
Thanks for your patch!
> --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
> @@ -179,12 +180,20 @@ static int shmob_drm_remove(struct platform_device *pdev)
>
> drm_dev_unregister(ddev);
> drm_kms_helper_poll_fini(ddev);
> + drm_helper_force_disable_all(ddev);
After "[PATCH v3 36/41] drm: renesas: shmobile: Atomic conversion part
1"[1], this function will already call drm_atomic_helper_shutdown()...
> free_irq(sdev->irq, ddev);
> drm_dev_put(ddev);
>
> return 0;
> }
>
> +static void shmob_drm_shutdown(struct platform_device *pdev)
> +{
> + struct shmob_drm_device *sdev = platform_get_drvdata(pdev);
> +
> + drm_helper_force_disable_all(sdev->ddev);
... and this should be replaced by a call to drm_atomic_helper_shutdown().
[1] https://lore.kernel.org/dri-devel/fd7a6702490bd431f314d6591551bb39e77e3304.1692178020.git.geert+renesas@glider.be
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists