From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, linux-pm@vger.kernel.org,
tiwai@suse.de, gregkh@linuxfoundation.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org, vkoul@kernel.org,
broonie@kernel.org, srinivas.kandagatla@linaro.org,
jank@cadence.com, slawomir.blauciak@intel.com,
Sanyog Kale <sanyog.r.kale@intel.com>
Subject: Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled
Date: Tue, 30 Jul 2019 18:58:09 +0300 [thread overview]
Message-ID: <20190730155809.GS23480@smile.fi.intel.com> (raw)
In-Reply-To: <a1b383b3-7846-3545-38a5-beece3e52849@linux.intel.com>
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, Pierre-Louis Bossart wrote:
> >
> > > > > - if (ret < 0)
> > > > > + if (ret < 0 && ret != -EACCES)
> > > >
> > > > ...and here, the pm_runtime_put_noidle() call is missed.
> > >
> > > yes but in the example you provided, they actually do more work than just
> > > decrement the device usage counter:
> >
> > In their case they would like to do that. You decide what is appropriate call
> > in your case.
> >
> > My point is, that reference counter in case of error handling should be
> > returned back to its value.
>
> Agree on the reference count.
> I am however not clear on the next step and 'what is appropriate'.
>
> If pm_runtime_get_sync() failed, then technically the device was not resumed
Not so straight. It depends on reference count. It might be true (most cases
I think), or not true, if device had been resumed previously by other call.
> so marking it as last_busy+autosuspend, or using a plain vanilla put() will
> not result in any action. I must be missing something here.
put_noidle(). Because if it failed on the first call and was resumed, put()
will try to shut it down (since reference count goes to no-user base).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2019-07-30 15:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com>
[not found] ` <20190725234032.21152-18-pierre-louis.bossart@linux.intel.com>
2019-07-26 18:08 ` [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled Pierre-Louis Bossart
2019-07-26 18:25 ` [alsa-devel] " Guennadi Liakhovetski
2019-07-26 19:11 ` Andy Shevchenko
2019-07-26 19:08 ` Andy Shevchenko
2019-07-29 22:07 ` [alsa-devel] " Pierre-Louis Bossart
2019-07-30 11:21 ` Andy Shevchenko
2019-07-30 12:57 ` Pierre-Louis Bossart
2019-07-30 15:58 ` Andy Shevchenko [this message]
2019-07-30 15:59 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190730155809.GS23480@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jank@cadence.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rafael@kernel.org \
--cc=sanyog.r.kale@intel.com \
--cc=slawomir.blauciak@intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).