Re: [PATCH] drm: renesas: shmobile: Call drm_helper_force_disable_all() at shutdown time

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

 



Hi Laurent,

On Tue, Dec 5, 2023 at 1:16 PM Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
> On Tue, Dec 05, 2023 at 12:30:02PM +0100, Geert Uytterhoeven wrote:
> > From: Douglas Anderson <dianders@xxxxxxxxxxxx>
> >
> > Based on grepping through the source code, this driver appears to be
> > missing a call to drm_atomic_helper_shutdown() at system shutdown 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() in the case of
> > OS shutdown comes straight out of the kernel doc "driver instance
> > overview" in drm_drv.c.
> >
> > Suggested-by: Maxime Ripard <mripard@xxxxxxxxxx>
> > Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
> > Link: https://lore.kernel.org/r/20230901164111.RFT.15.Iaf638a1d4c8b3c307a6192efabb4cbb06b195f15@changeid
> > [geert: s/drm_helper_force_disable_all/drm_atomic_helper_shutdown/]
> > [geert: shmob_drm_remove() already calls drm_atomic_helper_shutdown]
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

Thanks!

> > Panel-simple does print two new warnings:
> >
> >     +panel-simple panel: Skipping disable of already disabled panel
> >     +panel-simple panel: Skipping unprepare of already unprepared panel
>
> Have you investigated where this comes from ?

Meh, I knew I forgot something ;-)

The panel is unprepared and disabled a first time from shmob_drm's
.shutdown() callback:

  shmob_drm_shutdown
    drm_atomic_helper_shutdown
      drm_atomic_helper_disable_all
        drm_atomic_commit
          drm_atomic_helper_commit
            commit_tail
              drm_atomic_helper_commit_tail
                drm_atomic_helper_commit_modeset_disables
                  disable_outputs
                    drm_atomic_bridge_chain_disable
                        drm_panel_disable
                    drm_atomic_bridge_chain_post_disable
                        drm_panel_unprepare

And a second time from simple_panel's .shutdown() callback():

  panel_simple_platform_shutdown
    panel_simple_shutdown
      drm_panel_disable
      drm_panel_unprepare

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux