lkml.org 
[lkml]   [2012]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [BUGFIX] PM: Fix active child counting when disabled and forbidden
    On Wed, 7 Nov 2012, Rafael J. Wysocki wrote:

    > > The PCI subsystem assumes that
    > > driverless devices are not in use, so they are disabled for runtime PM
    > > and marked as suspended. This is not appropriate for VGA devices,
    > > which can indeed be used without a driver.
    > >
    > > I'm not sure what the best solution is. Maybe we should Ying's
    > > proposal a step farther:
    > >
    > > Make pm_runtime_set_suspended() fail if runtime PM is
    > > forbidden.
    > >
    > > Make pm_runtime_forbid() call pm_runtime_set_active()
    > > (and do a runtime resume of the parent) if disable_depth > 0.
    >
    > I'd prefer this one.

    That wasn't meant to be a choice. The first item is close to what the
    original patch did; I was suggesting that we should adopt all three
    items.

    If you adopt the second item but not the first then things won't work
    when a driver is removed after power/control is set to "on".

    > The callers of pm_runtime_forbid() may actually
    > reasonably expect something like this to happen.
    >
    > > Make the PCI runtime-idle routine call
    > > pm_runtime_set_suspended() if disable_depth > 0. Or maybe
    > > do this for all devices, in the runtime PM core.
    >
    > That would mean calling it on every call to pm_runtime_put() and friends
    > which seems to be a bit wasteful.

    Not on every call; only when disable_depth > 0. We don't expect to see
    idle calls very often under those circumstances.

    Alan Stern



    \
     
     \ /
      Last update: 2012-11-07 18:41    [W:2.605 / U:0.140 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site