[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YhXBIxbx63IXBU7L@pendragon.ideasonboard.com>
Date: Wed, 23 Feb 2022 07:07:47 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Douglas Anderson <dianders@...omium.org>,
dri-devel@...ts.freedesktop.org,
Brian Norris <briannorris@...omium.org>,
Andrzej Hajda <andrzej.hajda@...el.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Jonas Karlman <jonas@...boo.se>,
Neil Armstrong <narmstrong@...libre.com>,
Robert Foss <robert.foss@...aro.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: Properly undo autosuspend
On Tue, Feb 22, 2022 at 11:44:54PM +0100, Linus Walleij wrote:
> On Tue, Feb 22, 2022 at 11:19 PM Douglas Anderson <dianders@...omium.org> wrote:
> >
> > The PM Runtime docs say:
> > Drivers in ->remove() callback should undo the runtime PM changes done
> > in ->probe(). Usually this means calling pm_runtime_disable(),
> > pm_runtime_dont_use_autosuspend() etc.
> >
> > We weren't doing that for autosuspend. Let's do it.
> >
> > Fixes: 9bede63127c6 ("drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend")
> > Signed-off-by: Douglas Anderson <dianders@...omium.org>
>
> Hm. I know a few places in drivers where I don't do this :/
It seems to be a very common problem indeed, I haven't seen any driver
yet that uses pm_runtime_dont_use_autosuspend(). We could play a game of
whack-a-mole, but we'll never win. Could this be solved in the runtime
PM framework instead ? pm_runtime_disable() could disable auto-suspend.
If there are legitimate use cases for disabling runtime PM temporarily
without disabling auto-suspend, then a new function designed
specifically for remove() that would take care of cleaning everything up
could be another option.
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists