* [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation @ 2016-02-03 5:59 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 0 siblings, 2 replies; 5+ messages in thread From: Sagar Arun Kamble @ 2016-02-03 5:59 UTC (permalink / raw) To: intel-gfx; +Cc: shashidhar.hiremath 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; raw_time = I915_READ(reg) * units; ret = DIV_ROUND_UP_ULL(raw_time, div); -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/1] drm/i915/skl: fix RC6 residency time calculation 2016-02-03 5:59 [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation Sagar Arun Kamble @ 2016-02-03 10:16 ` Patchwork 2016-02-03 17:10 ` [PATCH 1/1] " Imre Deak 1 sibling, 0 replies; 5+ messages in thread From: Patchwork @ 2016-02-03 10:16 UTC (permalink / raw) To: sagar.a.kamble; +Cc: intel-gfx == Summary == Series 3036v1 Series without cover letter http://patchwork.freedesktop.org/api/1.0/series/3036/revisions/1/mbox/ Test gem_sync: Subgroup basic-blt: pass -> INCOMPLETE (skl-i5k-2) Test kms_pipe_crc_basic: Subgroup suspend-read-crc-pipe-c: incomplete -> PASS (hsw-gt2) bdw-nuci7 total:156 pass:147 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:159 pass:147 dwarn:0 dfail:0 fail:0 skip:12 bsw-nuc-2 total:159 pass:131 dwarn:0 dfail:0 fail:0 skip:28 byt-nuc total:159 pass:136 dwarn:0 dfail:0 fail:0 skip:23 hsw-brixbox total:159 pass:146 dwarn:0 dfail:0 fail:0 skip:13 hsw-gt2 total:159 pass:149 dwarn:0 dfail:0 fail:0 skip:10 ivb-t430s total:159 pass:145 dwarn:0 dfail:0 fail:0 skip:14 skl-i5k-2 total:55 pass:46 dwarn:0 dfail:0 fail:0 skip:8 snb-dellxps total:159 pass:137 dwarn:0 dfail:0 fail:0 skip:22 snb-x220t total:159 pass:137 dwarn:0 dfail:0 fail:1 skip:21 Results at /archive/results/CI_IGT_test/Patchwork_1349/ 02932377a975a59ccd83095816d5b23183107d79 drm-intel-nightly: 2016y-02m-03d-01h-54m-27s UTC integration manifest 8fa052d0f4208c867a0b051064b95c0bd1de0b0a drm/i915/skl: fix RC6 residency time calculation _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation 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 2016-02-04 10:09 ` Kamble, Sagar A 1 sibling, 1 reply; 5+ messages in thread From: Imre Deak @ 2016-02-03 17:10 UTC (permalink / raw) To: Sagar Arun Kamble, intel-gfx; +Cc: shashidhar.hiremath 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation 2016-02-03 17:10 ` [PATCH 1/1] " Imre Deak @ 2016-02-04 10:09 ` Kamble, Sagar A 2016-02-04 12:30 ` Imre Deak 0 siblings, 1 reply; 5+ messages in thread From: Kamble, Sagar A @ 2016-02-04 10:09 UTC (permalink / raw) To: imre.deak, intel-gfx; +Cc: shashidhar.hiremath 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] drm/i915/skl: fix RC6 residency time calculation 2016-02-04 10:09 ` Kamble, Sagar A @ 2016-02-04 12:30 ` Imre Deak 0 siblings, 0 replies; 5+ messages in thread From: Imre Deak @ 2016-02-04 12:30 UTC (permalink / raw) To: Kamble, Sagar A, intel-gfx; +Cc: shashidhar.hiremath On to, 2016-02-04 at 15:39 +0530, Kamble, Sagar A wrote: > 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. Hm, good point. Looking at this now, the above macro is used for registers that have the same contradicting description in BSpec: all specify 1.28us units, but the "Timestamp Bases" section kind of suggests that you need to use the units defined there for these registers too, which could be 1.28us or 1.33us depending on the mode. It's also possible that GT_GFX_RC6 really uses different units than these registers. We'd really need a clarification on these in BSpec before making changes. --Imre > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-04 12:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2016-02-04 12:30 ` Imre Deak
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).