mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: <vkoul@kernel.org>, <alsa-devel@alsa-project.org>,
	<patches@opensource.cirrus.com>, <linux-kernel@vger.kernel.org>,
	<sanyog.r.kale@intel.com>, <yung-chuan.liao@linux.intel.com>
Subject: Re: [PATCH 4/4] soundwire: stream: Move remaining register accesses over to no_pm
Date: Tue, 15 Nov 2022 11:05:20 +0000	[thread overview]
Message-ID: <20221115110520.GN10437@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <9d701845-7ad1-046c-b7c2-dd2a131212c8@linux.intel.com>

On Mon, Nov 14, 2022 at 10:04:55AM -0600, Pierre-Louis Bossart wrote:
> 
> 
> On 11/14/22 04:29, Charles Keepax wrote:
> > There is no need to play with the runtime reference everytime a register
> > is accessed. All the remaining "pm" style register accesses trace back
> > to 4 functions:
> > 
> > sdw_prepare_stream
> > sdw_deprepare_stream
> > sdw_enable_stream
> > sdw_disable_stream
> > 
> > Any sensible implementation will need to hold a runtime reference
> > across all those functions, it makes no sense to be allowing the
> > device/bus to suspend whilst streams are being prepared/enabled. And
> > certainly in the case of the all existing users, they all call these
> > functions from hw_params/prepare/trigger/hw_free callbacks in ALSA,
> > which will have already runtime resumed all the audio devices
> > associated during the open callback.
> > 
> > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> 
> I tend to agree with this one, and if this ever fails that would point
> to a miss at a higher-level we'd need to address.

Exactly my concern here is the core is trying to be helpful, but
really it is just going to be hiding bugs in the callers.

Thanks,
Charles

      reply	other threads:[~2022-11-15 11:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 10:29 [PATCH 0/4] Minor SoundWire clean ups Charles Keepax
2022-11-14 10:29 ` [PATCH 1/4] soundwire: bus: export sdw_nwrite_no_pm and sdw_nread_no_pm functions Charles Keepax
2022-11-14 10:29 ` [PATCH 2/4] soundwire: Provide build stubs for common functions Charles Keepax
2022-11-14 16:13   ` Pierre-Louis Bossart
2022-11-15 11:03     ` Charles Keepax
2022-11-15 11:41       ` Richard Fitzgerald
2022-11-15 15:12         ` Pierre-Louis Bossart
2022-11-14 10:29 ` [PATCH 3/4] soundwire: debugfs: Switch to sdw_read_no_pm Charles Keepax
2022-11-14 16:14   ` Pierre-Louis Bossart
2022-11-15 10:14     ` Charles Keepax
2022-11-21 10:50   ` Dan Carpenter
2022-11-21 13:13     ` Charles Keepax
2022-11-14 10:29 ` [PATCH 4/4] soundwire: stream: Move remaining register accesses over to no_pm Charles Keepax
2022-11-14 16:04   ` Pierre-Louis Bossart
2022-11-15 11:05     ` Charles Keepax [this message]

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=20221115110520.GN10437@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /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

all inboxes | Powered by JetHome®