From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
subhransu.s.prusty@intel.com, lgirdwood@gmail.com
Subject: Re: [PATCH 5/7] ASoC: Intel: sst: add power management handling
Date: Fri, 18 Jul 2014 19:53:09 +0530 [thread overview]
Message-ID: <20140718142309.GF1985@intel.com> (raw)
In-Reply-To: <20140718114611.GM17528@sirena.org.uk>
[-- Attachment #1.1: Type: text/plain, Size: 2681 bytes --]
On Fri, Jul 18, 2014 at 12:46:11PM +0100, Mark Brown wrote:
> On Wed, Jul 09, 2014 at 02:57:53PM +0530, Vinod Koul wrote:
>
> > +static int sst_save_dsp_context_v2(struct intel_sst_drv *sst)
>
> _v2?
v1 support older moorestown platforms. SO v2 here :)
>
> > +static int intel_sst_runtime_suspend(struct device *dev)
> > +{
> > + int ret = 0;
> > + struct intel_sst_drv *ctx = dev_get_drvdata(dev);
> > +
> > + pr_info("runtime_suspend called\n");
>
> This is way too noisy.
>
> > + if (ctx->sst_state == SST_RESET) {
> > + pr_debug("LPE is already in RESET state, No action");
> > + return 0;
> > + }
> > + /*save fw context*/
> > + if (ctx->ops->save_dsp_context(ctx))
> > + return -EBUSY;
> > +
> > + /* Move the SST state to Reset */
> > + sst_set_fw_state_locked(ctx, SST_RESET);
> > +
> > + flush_workqueue(ctx->post_msg_wq);
> > + synchronize_irq(ctx->irq_num);
>
> This is very strange - we're flushing the work *after* resetting the DSP
> which suggests there might be something else trying to access the DSP
> while it is being put into reset. Presumably that'd be bad.
the macro sst_set_fw_state_locked is used here :)
And state is marked reset, we dont do HW reset, so this is okay. After we return the
suspend handler, PCI will put the device to D3.
> > + /* When fw_clear_cache is set, clear the cached firmware copy */
> > + /* fw_clear_cache is set through debugfs support */
> > + if (atomic_read(&ctx->fw_clear_cache) && ctx->fw_in_mem) {
>
> Why? It'd seem more direct to just have the debugfs write trigger
> trashing of the firmware on demand...
That would work too but then sequencing the DSP while running would cause
issues elsewhere. Since we dont have debugs support in the series we cna
push this bits later when we send debugfs series amoung others :)
> > +static int intel_sst_suspend(struct device *dev)
> > +{
> > +
> > + return intel_sst_runtime_suspend(dev);
> > +}
>
> You currently need to check that the device isn't runtime suspended
> before you try to reuse runtime PM ops in suspend.
Sorry didnt quite get why?
>
> > +static int intel_sst_runtime_idle(struct device *dev)
> > +{
> > + struct intel_sst_drv *ctx = dev_get_drvdata(dev);
> > +
> > + pr_info("runtime_idle called\n");
> > + if (ctx->sst_state != SST_RESET) {
> > + pm_schedule_suspend(dev, SST_SUSPEND_DELAY);
> > + return -EBUSY;
> > + } else {
> > + return 0;
> > + }
> > + return -EBUSY;
> > +
> > +}
>
> This is very strange, what is going on?
schedule suspend after SST_SUSPEND_DELAY. This should be updated with PM
framework calls for delay, will update
--
~Vinod
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2014-07-18 14:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 9:27 [PATCH 0/8] ASoC: Intel: sst - add the merrifield DSP driver Vinod Koul
2014-07-09 9:27 ` [PATCH 1/7] ASoC: Intel: add sst shim register start-end variables Vinod Koul
2014-07-14 18:45 ` Mark Brown
2014-07-09 9:27 ` [PATCH 2/7] ASoC: Intel: mfld: add dsp error codes Vinod Koul
2014-07-14 18:45 ` Mark Brown
2014-07-09 9:27 ` [PATCH 3/7] ASoC: Intel: mrlfd - add generic parameter interface Vinod Koul
2014-07-14 18:46 ` Mark Brown
2014-07-15 5:25 ` Vinod Koul
2014-07-15 12:38 ` Mark Brown
2014-07-09 9:27 ` [PATCH 4/7] ASoC: Intel: mrfld - add the dsp sst driver Vinod Koul
2014-07-18 11:35 ` Mark Brown
2014-07-18 14:13 ` Vinod Koul
2014-07-18 16:59 ` Mark Brown
2014-07-19 6:31 ` Vinod Koul
2014-07-09 9:27 ` [PATCH 5/7] ASoC: Intel: sst: add power management handling Vinod Koul
2014-07-18 11:46 ` Mark Brown
2014-07-18 14:23 ` Vinod Koul [this message]
2014-07-18 17:14 ` Mark Brown
2014-07-19 6:37 ` Vinod Koul
2014-07-09 9:27 ` [PATCH 6/7] ASoC: Intel: sst: load firmware using async callback Vinod Koul
2014-07-09 9:27 ` [PATCH 7/7] ASoC: Intel: sst - add compressed ops handling Vinod Koul
2014-07-18 11:48 ` Mark Brown
2014-07-18 14:23 ` Vinod Koul
2014-07-09 9:27 ` [PATCH 0/8] ASoC: Intel: sst - add the merrifield DSP driver Vinod Koul
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=20140718142309.GF1985@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=subhransu.s.prusty@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;
as well as URLs for NNTP newsgroup(s).