intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: shashidhar.hiremath@intel.com
Subject: Re: [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation
Date: Wed, 03 Feb 2016 19:10:33 +0200	[thread overview]
Message-ID: <1454519433.8374.42.camel@intel.com> (raw)
In-Reply-To: <1454479186-32113-1-git-send-email-sagar.a.kamble@intel.com>

On ke, 2016-02-03 at 11:29 +0530, Sagar Arun Kamble wrote:
> The RC6 residency time unit is 1.33us on SKL according to the
> specification, so update the calculation accordingly.
> 
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_sysfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c
> b/drivers/gpu/drm/i915/i915_sysfs.c
> index c6188dd..9aa49a9 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -58,7 +58,8 @@ static u32 calc_residency(struct drm_device *dev,
>  	} else if (IS_BROXTON(dev)) {
>  		units = 1;
>  		div = 1200;		/* 833.33ns */
> -	}
> +	} else if (IS_SKYLAKE(dev))
> +		units = 133ULL;

Hrm. The SKL/GT_GFX_RC6 description in ConfigDB doesn't say anything
about the units, the BSpec "Timestamp Bases" provides two values for
two different modes:

1.33us and 1.28us

Not sure what are these different modes.

BSpec GT_GFX_RC6 description specifies 1.28us.

Running igt/pm_rc6_residency calculating with the current 1.28us results in:
Residency in rc6 or deeper state: 2983 ms (sleep duration 3003 ms) (ratio to expected duration: 0,99)
Subtest rc6-accuracy: SUCCESS (0,000s)

and after applying your patch (calculating with 1.33us):
Residency in rc6 or deeper state: 3101 ms (sleep duration 3001 ms) (ratio to expected duration: 1,03)
(pm_rc6_residency:6281) CRITICAL: Test assertion failure function residency_accuracy, file pm_rc6_residency.c:110:
(pm_rc6_residency:6281) CRITICAL: Failed assertion: ratio > 0.9 && ratio <= 1
(pm_rc6_residency:6281) CRITICAL: Sysfs RC6 residency counter is inaccurate.

While the measurement can be inaccurate, normally we should only err by
measuring less duration in RC6 than the duration of the actual sleep.
So I'm not convinced that 1.33us is the correct value..

--Imre

>  
>  	raw_time = I915_READ(reg) * units;
>  	ret = DIV_ROUND_UP_ULL(raw_time, div);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-02-03 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03  5:59 [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation Sagar Arun Kamble
2016-02-03 10:16 ` ✓ Fi.CI.BAT: success for series starting with [1/1] " Patchwork
2016-02-03 17:10 ` Imre Deak [this message]
2016-02-04 10:09   ` [PATCH 1/1] " Kamble, Sagar A
2016-02-04 12:30     ` Imre Deak

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=1454519433.8374.42.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sagar.a.kamble@intel.com \
    --cc=shashidhar.hiremath@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).