All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] tests/pm_rps: Round requested freq correctly
Date: Fri, 7 Feb 2014 16:52:30 +0200	[thread overview]
Message-ID: <20140207145230.GX3891@intel.com> (raw)
In-Reply-To: <20140207144414.GF19424@jeffdesk>

On Fri, Feb 07, 2014 at 08:44:14AM -0600, Jeff McGee wrote:
> On Fri, Feb 07, 2014 at 11:15:15AM +0100, Daniel Vetter wrote:
> > On Fri, Feb 7, 2014 at 10:33 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > > On Fri, Feb 07, 2014 at 10:03:33AM +0100, Daniel Vetter wrote:
> > >> The kernel will round it, so if we don't we'll have a spurious
> > >> mismatch. Happens on my machine here with 650-1300MHz range, where the
> > >> midpoint is 975.
> > >>
> > >> Cc: Jeff McGee <jeff.mcgee@intel.com>
> > >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > >> ---
> > >>  tests/pm_rps.c | 3 +++
> > >>  1 file changed, 3 insertions(+)
> > >>
> > >> diff --git a/tests/pm_rps.c b/tests/pm_rps.c
> > >> index 467038104ec6..27e758755e3f 100644
> > >> --- a/tests/pm_rps.c
> > >> +++ b/tests/pm_rps.c
> > >> @@ -350,6 +350,9 @@ static void min_max_config(void (*check)(void))
> > >>  {
> > >>       int fmid = (origfreqs[RPn] + origfreqs[RP0]) / 2;
> > >>
> > >> +     /* hw (and so kernel) currently rounds to 50 MHz ... */
> > >
> > > s/rounds/truncates/ or if it really does round, you need to adjust the
> > > calculation.
> > 
> > We just need to use something divisible by 50 so that the value we
> > write and the one we get match up. Whether it's truncating or rounding
> > doesn't matter really.
> > -Daniel
> 
> Darn, I considered this possibility but forgot to account for it in the test.
> I think what I was going to do was to create another writeval variant
> which doesn't do read back matching check. This was because I didn't want to
> assume that all systems use a 50 Mhz frequency increment (do they all?).

VLV sure doesn't.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-02-07 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07  9:03 [PATCH 1/2] tests/pm_rps: Round requested freq correctly Daniel Vetter
2014-02-07  9:03 ` [PATCH 2/2] tests/pm_rps: remove setfreq Daniel Vetter
2014-02-07  9:33 ` [PATCH 1/2] tests/pm_rps: Round requested freq correctly Chris Wilson
2014-02-07 10:15   ` Daniel Vetter
2014-02-07 14:44     ` Jeff McGee
2014-02-07 14:52       ` Ville Syrjälä [this message]
2014-02-07 15:08         ` Daniel Vetter

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=20140207145230.GX3891@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.