Re: [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-08-02 Thread Pierre-Louis Bossart
On 8/2/19 11:58 AM, Vinod Koul wrote: On 25-07-19, 18:40, Pierre-Louis Bossart wrote: Not all platforms support runtime_pm for now, let's use runtime_pm only when enabled. We discussed this with Ulf sometime back and it was a consensus the core should handle it, but that may take a while. So

Re: [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-08-02 Thread Vinod Koul
On 25-07-19, 18:40, Pierre-Louis Bossart wrote: > Not all platforms support runtime_pm for now, let's use runtime_pm > only when enabled. We discussed this with Ulf sometime back and it was a consensus the core should handle it, but that may take a while. So that led me to explore what others do

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-30 Thread Andy Shevchenko
On Tue, Jul 30, 2019 at 06:58:09PM +0300, Andy Shevchenko wrote: > On Tue, Jul 30, 2019 at 07:57:46AM -0500, Pierre-Louis Bossart wrote: > > On 7/30/19 6:21 AM, Andy Shevchenko wrote: > > > On Mon, Jul 29, 2019 at 05:07:39PM -0500, Pierre-Louis Bossart wrote: > > > > On 7/26/19 2:08 PM, Andy

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-30 Thread Andy Shevchenko
On Tue, Jul 30, 2019 at 07:57:46AM -0500, Pierre-Louis Bossart wrote: > On 7/30/19 6:21 AM, Andy Shevchenko wrote: > > On Mon, Jul 29, 2019 at 05:07:39PM -0500, Pierre-Louis Bossart wrote: > > > On 7/26/19 2:08 PM, Andy Shevchenko wrote: > > > > On Fri, Jul 26, 2019 at 01:08:57PM -0500,

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-30 Thread Pierre-Louis Bossart
On 7/30/19 6:21 AM, Andy Shevchenko wrote: On Mon, Jul 29, 2019 at 05:07:39PM -0500, Pierre-Louis Bossart wrote: On 7/26/19 2:08 PM, Andy Shevchenko wrote: On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: - if (ret < 0) + if (ret < 0 && ret != -EACCES)

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-30 Thread Andy Shevchenko
On Mon, Jul 29, 2019 at 05:07:39PM -0500, Pierre-Louis Bossart wrote: > On 7/26/19 2:08 PM, Andy Shevchenko wrote: > > On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: > > > - if (ret < 0) > > > + if (ret < 0 && ret != -EACCES) > > > > ...and here, the

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-29 Thread Pierre-Louis Bossart
On 7/26/19 2:08 PM, Andy Shevchenko wrote: On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: This thread became unreadable with interleaved top-posting, allow me restate the options and ask PM folks what they think On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote: Not all

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Andy Shevchenko
On Fri, Jul 26, 2019 at 08:25:35PM +0200, Guennadi Liakhovetski wrote: > On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: > > On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote: > > > Not all platforms support runtime_pm for now, let's use runtime_pm > > > only when enabled. > >

Re: [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Andy Shevchenko
On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: > This thread became unreadable with interleaved top-posting, allow me restate > the options and ask PM folks what they think > > On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote: > > Not all platforms support runtime_pm for now,

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Guennadi Liakhovetski
On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: > This thread became unreadable with interleaved top-posting, allow me restate > the options and ask PM folks what they think > > On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote: > > Not all platforms support runtime_pm for now,

Re: [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Pierre-Louis Bossart
This thread became unreadable with interleaved top-posting, allow me restate the options and ask PM folks what they think On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote: Not all platforms support runtime_pm for now, let's use runtime_pm only when enabled. Suggested-by: Srinivas Kandagatla

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Guennadi Liakhovetski
On Fri, Jul 26, 2019 at 08:33:35AM +, Jan Kotas wrote: > > > > On 26 Jul 2019, at 10:22, Guennadi Liakhovetski > > wrote: > > > > EXTERNAL MAIL > > > > > > Hi Jan, > > > > On Fri, Jul 26, 2019 at 07:47:04AM +, Jan Kotas wrote: > >> Hello, > >> > >> I while back I proposed a patch

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Jan Kotas
> On 26 Jul 2019, at 10:22, Guennadi Liakhovetski > wrote: > > EXTERNAL MAIL > > > Hi Jan, > > On Fri, Jul 26, 2019 at 07:47:04AM +, Jan Kotas wrote: >> Hello, >> >> I while back I proposed a patch for this, but it went nowhere. >> >>

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Guennadi Liakhovetski
Hi Jan, On Fri, Jul 26, 2019 at 07:47:04AM +, Jan Kotas wrote: > Hello, > > I while back I proposed a patch for this, but it went nowhere. > > https://patchwork.kernel.org/patch/10887405/ > Maybe something similar can be implemented? Yes, I was thinking about checkint -EACCESS too, but

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Jan Kotas
Hello, I while back I proposed a patch for this, but it went nowhere. https://patchwork.kernel.org/patch/10887405/ Maybe something similar can be implemented? Jan > On 26 Jul 2019, at 09:39, Guennadi Liakhovetski > wrote: > > EXTERNAL MAIL > > > Hi Pierre, > > I might be wrong but this

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Guennadi Liakhovetski
Hi Pierre, I might be wrong but this doesn't seem right to me. (Supposedly) all RT-PM functions check for "enabled" internally. The only thing that can happen is that if RT-PM isn't enabled some of those functions will return an error. So, in those cases where the return value of RT-PM functions

[RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-25 Thread Pierre-Louis Bossart
Not all platforms support runtime_pm for now, let's use runtime_pm only when enabled. Suggested-by: Srinivas Kandagatla Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git