Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org,
	"Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Kristo, Tero" <t-kristo@ti.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jarkko Nikula" <jarkko.nikula@linux.intel.com>,
	"Pavel Machel" <pavel@ucw.cz>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH] ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches
Date: Tue, 13 Sep 2016 06:45:14 -0700	[thread overview]
Message-ID: <20160913134512.7cpq3nuosn7rcgwl@atomide.com> (raw)
In-Reply-To: <6f6c2c1c-5ca4-f821-0690-c6c726b1263e@ti.com>

* Peter Ujfalusi <peter.ujfalusi@ti.com> [160913 04:45]:
> On 09/10/16 02:45, Tony Lindgren wrote:
> >> In any way, according to the numbers:
> >> C7 is (7505 + 15274) vs (10000 + 30000)
> >> C6 is (7580 + 4134) vs (3000 + 8500)
> >> C5 is (855 + 1146) vs (2500 + 7500)
> >> C4 is (121 + 3374) vs (1500 + 1800)
> >> C3 is (107 + 410) vs (50 + 50)
> >>
> >> with the 30ms QoS we set we will still hit OFF on OMAP3430, it should minimum
> >> 11.715ms for omap3430, but that will block C6 on omap36xx.
> > 
> > Yeah those don't seem to be correct. The Nokia N9(50) kernel seems to have
> > some measured numbers for 36xx.
> 
> True, probably we should give those numbers a try? It looks like they have
> C1...C8 compared to mainline which have C1...C7.

Well some of those numbers are based on OSWR (Open SWitch Retention), not
sure if that works properly with mainline. Worth trying though.

> >> If we could have the data for the struct cpuidle_state coming from DT and not
> >> wired in the cpuidle34xx/44xx files then the McBSP driver could look up the C7
> >> number and block that...
> > 
> > I'm now thinking that your fifo threshold calculation is what we should
> > do, then fix the cpuidle latencies and playback should hit retention idle.
> 
> Right. So the QoS should be set time(FIFOsize - FIFOthreshold) - margin?
> What margin we should use? The DMA does not need setup time as it will just
> continue where it stopped, so probably we can ignore the margin and use the
> number we got from the FIFO use?

Yeah seems safe assuming the mystery numbers are wrong C state latencies :)

> During hw_param we can calculate this, but we need to consider on more thing:
> we need to make sure that the QoS we place covers the capture and the playback
> as well, so we need to use the worst case number. the FIFO threshold can be
> different for capture and playback.

OK makes sense to me.

Regards,

Tony

  reply	other threads:[~2016-09-13 13:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 18:27 [PATCH] ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches Tony Lindgren
     [not found] ` <201608300739.JrTVlIyd%fengguang.wu@intel.com>
2016-08-30 18:38   ` Tony Lindgren
2016-08-31 17:24     ` Mark Brown
2016-08-31 17:42       ` Tony Lindgren
2016-08-31 11:37 ` Peter Ujfalusi
2016-08-31 14:13   ` Tony Lindgren
2016-08-31 16:59     ` Tony Lindgren
2016-08-31 18:33       ` Peter Ujfalusi
2016-08-31 19:41         ` Tony Lindgren
2016-09-01  6:57           ` Peter Ujfalusi
2016-09-01 14:50             ` Tony Lindgren
2016-09-02  7:30               ` Peter Ujfalusi
2016-09-02 14:56                 ` Tony Lindgren
2016-09-02 19:38                   ` Peter Ujfalusi
2016-09-02 20:40                     ` Tony Lindgren
2016-09-05  7:53                       ` Peter Ujfalusi
2016-09-06 20:16                         ` Tony Lindgren
2016-09-07 14:31                           ` Peter Ujfalusi
2016-09-08  3:53                             ` Tony Lindgren
2016-09-08 10:41                               ` Peter Ujfalusi
2016-09-08 10:49                                 ` Peter Ujfalusi
2016-09-08 14:48                                   ` Tony Lindgren
2016-09-09  6:51                                     ` Peter Ujfalusi
2016-09-09 23:45                                       ` Tony Lindgren
2016-09-13 11:45                                         ` Peter Ujfalusi
2016-09-13 13:45                                           ` Tony Lindgren [this message]
2016-09-02 15:54                 ` Pavel Machek
2016-09-02 19:45                   ` Peter Ujfalusi
2016-09-02 20:09                     ` Tony Lindgren
2016-09-03 16:08                       ` Sebastian Reichel
2016-09-06 20:08                         ` Tony Lindgren

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=20160913134512.7cpq3nuosn7rcgwl@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=peter.ujfalusi@ti.com \
    --cc=sre@kernel.org \
    --cc=t-kristo@ti.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