lkml.org 
[lkml]   [2012]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pci/runtime-pm: respect devices autosuspend timeout on config access

> >
> > Cc: Huang Ying <ying.huang@intel.com>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Signed-off-by: Dave Airlie <airlied@redhat.com>
> > ---
> > drivers/pci/pci-sysfs.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> > index 02d107b..12d3d52 100644
> > --- a/drivers/pci/pci-sysfs.c
> > +++ b/drivers/pci/pci-sysfs.c
> > @@ -487,7 +487,7 @@ pci_config_pm_runtime_put(struct pci_dev *pdev)
> > struct device *dev = &pdev->dev;
> > struct device *parent = dev->parent;
> >
> > - pm_runtime_put(dev);
> > + pm_runtime_put_autosuspend(dev);
> > if (parent)
> > pm_runtime_put_sync(parent);
> > }
>
> I think you do not need that. You can implement timeout
> in .runtime_idle callback of the driver.

If I understand what you are suggesting, I should setup some kinda of timer callback to later call suspend, but that seems pointless for me if we have the autosuspend mechanism in place.

Won't I end up racing my timer against other pm stuff? I'm not really runtime pm expert so maybe I'm just missing something.

Dave.


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