Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-13 Thread Rafael J. Wysocki
Hi Marek, On Wed, Jun 13, 2018 at 12:23 PM, Marek Szyprowski wrote: > Hi Rafael, > [cut] > Let's get back to my IOMMU and codec case, mentioned here: > https://marc.info/?l=linux-pm&m=152878741527962&w=2 > > Now, after applying your patch, when IOMMU creates a link with > DL

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-13 Thread Marek Szyprowski
Hi Rafael, On 2018-06-13 10:16, Rafael J. Wysocki wrote: > On Wed, Jun 13, 2018 at 8:23 AM, Marek Szyprowski > wrote: > On 2018-06-12 16:24, Rafael J. Wysocki wrote: >>> On Tuesday, June 12, 2018 2:44:23 PM CEST Marek Szyprowski wrote: On 2018-06-12 13:00, Rafael J. Wysocki wrote: > From

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-13 Thread Ulf Hansson
[...] > --- > From: Rafael J. Wysocki > Subject: [PATCH v2] PM / core: Fix supplier device runtime PM usage counter > imbalance > > If a device link is added via device_link_add() by the driver of the > link's consumer device, the supplier's runtime PM usage counter is > going to be dropped by t

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-13 Thread Ulf Hansson
On 13 June 2018 at 08:42, Marek Szyprowski wrote: > Hi Ulf, > > On 2018-06-12 21:43, Ulf Hansson wrote: >> On 12 June 2018 at 14:44, Marek Szyprowski wrote: >>> On 2018-06-12 13:00, Rafael J. Wysocki wrote: From: Rafael J. Wysocki If a device link is added via device_link_add() by

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-13 Thread Rafael J. Wysocki
On Wed, Jun 13, 2018 at 8:23 AM, Marek Szyprowski wrote: > Hi Rafael, Hi Marek, > On 2018-06-12 16:24, Rafael J. Wysocki wrote: >> On Tuesday, June 12, 2018 2:44:23 PM CEST Marek Szyprowski wrote: >>> On 2018-06-12 13:00, Rafael J. Wysocki wrote: From: Rafael J. Wysocki If a devi

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-13 Thread Rafael J. Wysocki
On Tue, Jun 12, 2018 at 9:43 PM, Ulf Hansson wrote: > On 12 June 2018 at 14:44, Marek Szyprowski wrote: [cut] >> >> Is there any way to keep old behavior? > > I think the old behavior is sub-optimal. I am sure there are users > that really don't want the driver core to runtime resume the suppli

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-12 Thread Marek Szyprowski
Hi Ulf, On 2018-06-12 21:43, Ulf Hansson wrote: > On 12 June 2018 at 14:44, Marek Szyprowski wrote: >> On 2018-06-12 13:00, Rafael J. Wysocki wrote: >>> From: Rafael J. Wysocki >>> >>> If a device link is added via device_link_add() by the driver of the >>> link's consumer device, the supplier's

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-12 Thread Marek Szyprowski
Hi Rafael, On 2018-06-12 16:24, Rafael J. Wysocki wrote: > On Tuesday, June 12, 2018 2:44:23 PM CEST Marek Szyprowski wrote: >> On 2018-06-12 13:00, Rafael J. Wysocki wrote: >>> From: Rafael J. Wysocki >>> >>> If a device link is added via device_link_add() by the driver of the >>> link's consume

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-12 Thread Ulf Hansson
On 12 June 2018 at 14:44, Marek Szyprowski wrote: > Hi Rafael, > > On 2018-06-12 13:00, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> If a device link is added via device_link_add() by the driver of the >> link's consumer device, the supplier's runtime PM usage counter is >> going to

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-12 Thread Rafael J. Wysocki
On Tuesday, June 12, 2018 2:44:23 PM CEST Marek Szyprowski wrote: > Hi Rafael, Hi, > On 2018-06-12 13:00, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > If a device link is added via device_link_add() by the driver of the > > link's consumer device, the supplier's runtime PM usage

Re: [PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-12 Thread Marek Szyprowski
Hi Rafael, On 2018-06-12 13:00, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If a device link is added via device_link_add() by the driver of the > link's consumer device, the supplier's runtime PM usage counter is > going to be dropped by the pm_runtime_put_suppliers() call in > driver

[PATCH] PM / core: Fix supplier device runtime PM usage counter imbalance

2018-06-12 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If a device link is added via device_link_add() by the driver of the link's consumer device, the supplier's runtime PM usage counter is going to be dropped by the pm_runtime_put_suppliers() call in driver_probe_device(). However, in that case it is not incremented unless