lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Feb 2022 08:37:44 -0800
From:   Doug Anderson <dianders@...omium.org>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        dri-devel <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>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: Properly undo autosuspend

Hi,

On Wed, Feb 23, 2022 at 7:55 AM Laurent Pinchart
<laurent.pinchart@...asonboard.com> wrote:
>
> > How about a middle ground, though: we could add a devm function that
> > does all the magic. Somewhat recently devm_pm_runtime_enable() was
> > added. What if we add a variant for those that use autosuspend, like:
> >
> > devm_pm_runtime_enable_with_autosuspend(dev, initial_delay)
> >
> > That would:
> > * pm_runtime_enable()
> > * pm_runtime_set_autosuspend_delay()
> > * pm_runtime_use_autosuspend()
> > * Use devm_add_action_or_reset() to undo everything.
> >
> > Assuming that the pm_runtime folks are OK with that, we could
> > transition things over to the new function once it rolls into
> > mainline.
> >
> > So this doesn't magically fix all existing code but provides a path to
> > make this more discoverable.
>
> Sounds like a good idea. I wonder if this could be handled by
> devm_pm_runtime_enable() actually. If a driver calls
> devm_pm_runtime_enable() and then enables auto-suspend, can't the
> runtime PM core reasonably expect that auto-suspend should be disabled
> at .remove() time ? The pm_runtime_disable_action() function could
> disable auto-suspend unconditionally (assuming
> pm_runtime_use_autosuspend() and pm_runtime_dont_use_autosuspend() don't
> need to be balanced, if they do, then I'll just go cry in a corner).

I like your idea. I think you're right that we can just leverage the
existing function. This yak didn't look to hairy, so I posted a patch:

https://lore.kernel.org/r/20220223083441.1.I925ce9fa12992a58caed6b297e0171d214866fe7@changeid

I guess now we see what Rafael thinks. ;-)

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ