* [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes @ 2017-11-24 17:16 Tvrtko Ursulin 2017-11-24 18:18 ` Chris Wilson ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: Tvrtko Ursulin @ 2017-11-24 17:16 UTC (permalink / raw) To: Intel-gfx From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Since i915 PMU is removing separate RC6 counters and now aggregates all under a single one, catch up the test and intel-gpu-overlay with those changes. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- lib/igt_perf.h | 4 +--- overlay/rc6.c | 45 +++++++-------------------------------------- tests/perf_pmu.c | 53 ----------------------------------------------------- 3 files changed, 8 insertions(+), 94 deletions(-) diff --git a/lib/igt_perf.h b/lib/igt_perf.h index 5428feb0c746..7b66fc582b88 100644 --- a/lib/igt_perf.h +++ b/lib/igt_perf.h @@ -64,10 +64,8 @@ enum drm_i915_pmu_engine_sample { #define I915_PMU_REQUESTED_FREQUENCY __I915_PMU_OTHER(1) #define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2) #define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3) -#define I915_PMU_RC6p_RESIDENCY __I915_PMU_OTHER(4) -#define I915_PMU_RC6pp_RESIDENCY __I915_PMU_OTHER(5) -#define I915_PMU_LAST I915_PMU_RC6pp_RESIDENCY +#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY static inline int perf_event_open(struct perf_event_attr *attr, diff --git a/overlay/rc6.c b/overlay/rc6.c index 8977f0993095..b5286f0cf8c6 100644 --- a/overlay/rc6.c +++ b/overlay/rc6.c @@ -35,34 +35,12 @@ #include "rc6.h" -#define RC6 (1<<0) -#define RC6p (1<<1) -#define RC6pp (1<<2) - -static int perf_open(unsigned *flags) -{ - int fd; - - fd = perf_i915_open_group(I915_PMU_RC6_RESIDENCY, -1); - if (fd < 0) - return -1; - - *flags |= RC6; - if (perf_i915_open_group(I915_PMU_RC6p_RESIDENCY, fd) >= 0) - *flags |= RC6p; - - if (perf_i915_open_group(I915_PMU_RC6pp_RESIDENCY, fd) >= 0) - *flags |= RC6pp; - - return fd; -} - int rc6_init(struct rc6 *rc6) { memset(rc6, 0, sizeof(*rc6)); - rc6->fd = perf_open(&rc6->flags); - if (rc6->fd == -1) { + rc6->fd = perf_i915_open(I915_PMU_RC6_RESIDENCY); + if (rc6->fd < 0) { struct stat st; if (stat("/sys/class/drm/card0/power", &st) < 0) return rc6->error = errno; @@ -110,7 +88,7 @@ int rc6_update(struct rc6 *rc6) if (rc6->error) return rc6->error; - if (rc6->fd == -1) { + if (rc6->fd < 0) { struct stat st; if (stat("/sys/class/drm/card0/power/rc6_residency_ms", &st) < 0) @@ -121,22 +99,13 @@ int rc6_update(struct rc6 *rc6) s->rc6pp_residency = file_to_u64("/sys/class/drm/card0/power/rc6pp_residency_ms"); s->timestamp = clock_ms_to_u64(); } else { - uint64_t data[5]; - int len; + uint64_t data[2]; - len = read(rc6->fd, data, sizeof(data)); - if (len < 0) + if (read(rc6->fd, data, sizeof(data)) < sizeof(data)) return rc6->error = errno; - s->timestamp = data[1] / (1000*1000); - - len = 2; - if (rc6->flags & RC6) - s->rc6_residency = data[len++] / 1e6; - if (rc6->flags & RC6p) - s->rc6p_residency = data[len++] / 1e6; - if (rc6->flags & RC6pp) - s->rc6pp_residency = data[len++] / 1e6; + s->timestamp = data[1] / 1e6; + s->rc6_residency = data[0] / 1e6; } if (rc6->count == 1) diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index a19fd2ac45a2..8d58ecea3528 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -1019,53 +1019,6 @@ test_rc6(int gem_fd) assert_within_epsilon(busy - prev, 0.0, tolerance); } -static void -test_rc6p(int gem_fd) -{ - int64_t duration_ns = 2e9; - unsigned int num_pmu = 1; - uint64_t idle[3], busy[3], prev[3]; - unsigned int slept, i; - int fd, ret, fw; - - fd = open_group(I915_PMU_RC6_RESIDENCY, -1); - ret = perf_i915_open_group(I915_PMU_RC6p_RESIDENCY, fd); - if (ret > 0) { - num_pmu++; - ret = perf_i915_open_group(I915_PMU_RC6pp_RESIDENCY, fd); - if (ret > 0) - num_pmu++; - } - - igt_require(num_pmu == 3); - - gem_quiescent_gpu(gem_fd); - usleep(100e3); /* wait for the rc6 cycle counter to kick in */ - - /* Go idle and check full RC6. */ - pmu_read_multi(fd, num_pmu, prev); - slept = measured_usleep(duration_ns / 1000); - pmu_read_multi(fd, num_pmu, idle); - - for (i = 0; i < num_pmu; i++) - assert_within_epsilon(idle[i] - prev[i], slept, tolerance); - - /* Wake up device and check no RC6. */ - fw = igt_open_forcewake_handle(gem_fd); - igt_assert(fw >= 0); - usleep(1e3); /* wait for the rc6 cycle counter to stop ticking */ - - pmu_read_multi(fd, num_pmu, prev); - usleep(duration_ns / 1000); - pmu_read_multi(fd, num_pmu, busy); - - close(fw); - close(fd); - - for (i = 0; i < num_pmu; i++) - assert_within_epsilon(busy[i] - prev[i], 0.0, tolerance); -} - igt_main { const unsigned int num_other_metrics = @@ -1205,12 +1158,6 @@ igt_main igt_subtest("rc6") test_rc6(fd); - /** - * Test RC6p residency reporting. - */ - igt_subtest("rc6p") - test_rc6p(fd); - /** * Check render nodes are counted. */ -- 2.14.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes 2017-11-24 17:16 [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes Tvrtko Ursulin @ 2017-11-24 18:18 ` Chris Wilson 2017-11-24 18:23 ` ✓ Fi.CI.BAT: success for " Patchwork ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Chris Wilson @ 2017-11-24 18:18 UTC (permalink / raw) To: Tvrtko Ursulin, Intel-gfx Quoting Tvrtko Ursulin (2017-11-24 17:16:18) > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > Since i915 PMU is removing separate RC6 counters and now aggregates all > under a single one, catch up the test and intel-gpu-overlay with those > changes. First run failed (perf_pmu:1928) CRITICAL: 'idle - prev' != 'slept' (1884715520.000000 not within 5.000000% tolerance of 2000133450.000000) Weird. Be back later, -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for intel/pmu: Catch-up with i915 RC6 aggregation changes 2017-11-24 17:16 [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes Tvrtko Ursulin 2017-11-24 18:18 ` Chris Wilson @ 2017-11-24 18:23 ` Patchwork 2017-11-24 20:19 ` ✗ Fi.CI.IGT: warning " Patchwork 2017-11-24 20:38 ` [PATCH i-g-t] " Chris Wilson 3 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2017-11-24 18:23 UTC (permalink / raw) To: Tvrtko Ursulin; +Cc: intel-gfx == Series Details == Series: intel/pmu: Catch-up with i915 RC6 aggregation changes URL : https://patchwork.freedesktop.org/series/34371/ State : success == Summary == IGT patchset tested on top of latest successful build c6577473df7117b7a6e030605df1e28cd0e55708 lib/igt_core: Move write_stderr out of LIBUNWIND ifdef with latest DRM-Tip kernel build CI_DRM_3385 c2ee9de5c13c drm-tip: 2017y-11m-24d-17h-10m-43s UTC integration manifest Testlist changes: -igt@perf_pmu@other-init-5 -igt@perf_pmu@other-init-6 -igt@perf_pmu@other-read-5 -igt@perf_pmu@other-read-6 -igt@perf_pmu@rc6p Test gem_exec_reloc: Subgroup basic-cpu-active: pass -> FAIL (fi-gdg-551) fdo#102582 +5 Test kms_cursor_legacy: Subgroup basic-busy-flip-before-cursor-legacy: pass -> FAIL (fi-gdg-551) fdo#102618 fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582 fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618 fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:444s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:388s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:539s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:278s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:511s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:503s fi-byt-j1900 total:289 pass:254 dwarn:0 dfail:0 fail:0 skip:35 time:493s fi-byt-n2820 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:490s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:427s fi-gdg-551 total:289 pass:170 dwarn:1 dfail:0 fail:9 skip:109 time:277s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:538s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:427s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:434s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:431s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:494s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:463s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:486s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:532s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:480s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:530s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:455s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:539s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:568s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:508s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:499s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:458s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:556s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:418s Blacklisted hosts: fi-cfl-s2 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:595s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:558s fi-glk-dsi total:91 pass:46 dwarn:0 dfail:1 fail:2 skip:41 == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_550/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.IGT: warning for intel/pmu: Catch-up with i915 RC6 aggregation changes 2017-11-24 17:16 [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes Tvrtko Ursulin 2017-11-24 18:18 ` Chris Wilson 2017-11-24 18:23 ` ✓ Fi.CI.BAT: success for " Patchwork @ 2017-11-24 20:19 ` Patchwork 2017-11-24 20:38 ` [PATCH i-g-t] " Chris Wilson 3 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2017-11-24 20:19 UTC (permalink / raw) To: Tvrtko Ursulin; +Cc: intel-gfx == Series Details == Series: intel/pmu: Catch-up with i915 RC6 aggregation changes URL : https://patchwork.freedesktop.org/series/34371/ State : warning == Summary == Test kms_frontbuffer_tracking: Subgroup fbc-1p-pri-indfb-multidraw: fail -> SKIP (shard-snb) fdo#103167 Subgroup fbc-1p-offscren-pri-shrfb-draw-blt: pass -> FAIL (shard-snb) fdo#101623 +1 Test kms_draw_crc: Subgroup draw-method-xrgb2101010-pwrite-xtiled: pass -> SKIP (shard-snb) Test drv_module_reload: Subgroup basic-reload: pass -> DMESG-WARN (shard-hsw) fdo#102707 Test gem_softpin: Subgroup noreloc-s3: pass -> DMESG-WARN (shard-snb) fdo#102365 Test kms_plane: Subgroup plane-panning-bottom-right-suspend-pipe-c-planes: skip -> PASS (shard-hsw) fdo#103375 fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167 fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623 fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707 fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365 fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375 shard-hsw total:2662 pass:1532 dwarn:2 dfail:0 fail:10 skip:1118 time:9469s shard-snb total:2662 pass:1303 dwarn:2 dfail:0 fail:13 skip:1344 time:8081s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_550/shards.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes 2017-11-24 17:16 [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes Tvrtko Ursulin ` (2 preceding siblings ...) 2017-11-24 20:19 ` ✗ Fi.CI.IGT: warning " Patchwork @ 2017-11-24 20:38 ` Chris Wilson 3 siblings, 0 replies; 5+ messages in thread From: Chris Wilson @ 2017-11-24 20:38 UTC (permalink / raw) To: Tvrtko Ursulin, Intel-gfx Quoting Tvrtko Ursulin (2017-11-24 17:16:18) > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > Since i915 PMU is removing separate RC6 counters and now aggregates all > under a single one, catch up the test and intel-gpu-overlay with those > changes. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-24 20:39 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-11-24 17:16 [PATCH i-g-t] intel/pmu: Catch-up with i915 RC6 aggregation changes Tvrtko Ursulin 2017-11-24 18:18 ` Chris Wilson 2017-11-24 18:23 ` ✓ Fi.CI.BAT: success for " Patchwork 2017-11-24 20:19 ` ✗ Fi.CI.IGT: warning " Patchwork 2017-11-24 20:38 ` [PATCH i-g-t] " Chris Wilson
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.