From: "Kamble, Sagar A" <sagar.a.kamble@intel.com>
To: imre.deak@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: Thu, 4 Feb 2016 15:39:07 +0530 [thread overview]
Message-ID: <56B32343.9010509@intel.com> (raw)
In-Reply-To: <1454519433.8374.42.camel@intel.com>
Ok. I related my change to below definition:
#define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
(IS_BROXTON(dev_priv) ? \
INTERVAL_0_833_US(us) : \
INTERVAL_1_33_US(us)) : \
INTERVAL_1_28_US(us))
This is using 1.33us unit for SKL.
May be we need to define these based on mode (normal/PSMI).
Not sure how to determine modes.
Thanks
Sagar
On 2/3/2016 10:40 PM, Imre Deak wrote:
> 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
next prev parent reply other threads:[~2016-02-04 10:09 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 ` [PATCH 1/1] " Imre Deak
2016-02-04 10:09 ` Kamble, Sagar A [this message]
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=56B32343.9010509@intel.com \
--to=sagar.a.kamble@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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 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.