* [PATCH i-g-t] i915/gem_exec_latency: Normalize results into ns
@ 2019-01-29 8:52 ` Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2019-01-29 8:52 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Present the latency results in nanoseconds not RCS cycles.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_exec_latency.c | 38 +++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c
index de16322a6..ea44adc14 100644
--- a/tests/i915/gem_exec_latency.c
+++ b/tests/i915/gem_exec_latency.c
@@ -59,6 +59,7 @@
#define PREEMPT 0x2
static unsigned int ring_size;
+static double rcs_clock;
static void
poll_ring(int fd, unsigned ring, const char *name)
@@ -207,7 +208,7 @@ static void latency_on_ring(int fd,
igt_cork_unplug(&c);
gem_set_domain(fd, obj[1].handle, I915_GEM_DOMAIN_GTT, 0);
- gpu_latency = (results[repeats-1] - results[0]) / (double)(repeats-1);
+ gpu_latency = (results[repeats-1] - results[1]) / (double)(repeats-2);
gem_set_domain(fd, obj[2].handle,
I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
@@ -238,10 +239,11 @@ static void latency_on_ring(int fd,
igt_assert(offset == obj[2].offset);
gem_set_domain(fd, obj[1].handle, I915_GEM_DOMAIN_GTT, 0);
- igt_info("%s: dispatch latency: %.2f, execution latency: %.2f (target %.2f)\n",
+ igt_info("%s: dispatch latency: %.1fns, execution latency: %.1fns (target %.1fns)\n",
name,
- (end - start) / (double)repeats,
- gpu_latency, (results[repeats - 1] - results[0]) / (double)(repeats - 1));
+ (end - start) / (double)repeats * rcs_clock,
+ gpu_latency * rcs_clock,
+ (results[repeats - 1] - results[0]) / (double)(repeats - 1) * rcs_clock);
munmap(map, 64*1024);
munmap(results, 4096);
@@ -620,6 +622,30 @@ rthog_latency_on_ring(int fd, unsigned int engine, const char *name, unsigned in
munmap(results, MMAP_SZ);
}
+static double clockrate(void)
+{
+ volatile uint32_t *reg;
+ uint32_t r_start, r_end;
+ struct timespec tv;
+ uint64_t t_start, t_end;
+ uint64_t elapsed;
+
+ reg = (volatile uint32_t *)((volatile char *)igt_global_mmio + RCS_TIMESTAMP);
+
+ t_start = igt_nsec_elapsed(&tv);
+ r_start = *reg;
+ elapsed = igt_nsec_elapsed(&tv) - t_start;
+
+ usleep(1000);
+
+ t_end = igt_nsec_elapsed(&tv);
+ r_end = *reg;
+ elapsed += igt_nsec_elapsed(&tv) - t_end;
+
+ elapsed = (t_end - t_start) + elapsed / 2;
+ return (r_end - r_start) * 1e9 / elapsed;
+}
+
igt_main
{
const struct intel_execution_engine *e;
@@ -640,6 +666,10 @@ igt_main
ring_size = 1024;
intel_register_access_init(intel_get_pci_device(), false, device);
+ rcs_clock = clockrate();
+ igt_info("RCS timestamp clock: %.3fKHz, %.1fns\n",
+ rcs_clock / 1e3, 1e9 / rcs_clock);
+ rcs_clock = 1e9 / rcs_clock;
}
igt_subtest("all-rtidle-submit")
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [igt-dev] [PATCH i-g-t] i915/gem_exec_latency: Normalize results into ns
@ 2019-01-29 8:52 ` Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2019-01-29 8:52 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Present the latency results in nanoseconds not RCS cycles.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_exec_latency.c | 38 +++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c
index de16322a6..ea44adc14 100644
--- a/tests/i915/gem_exec_latency.c
+++ b/tests/i915/gem_exec_latency.c
@@ -59,6 +59,7 @@
#define PREEMPT 0x2
static unsigned int ring_size;
+static double rcs_clock;
static void
poll_ring(int fd, unsigned ring, const char *name)
@@ -207,7 +208,7 @@ static void latency_on_ring(int fd,
igt_cork_unplug(&c);
gem_set_domain(fd, obj[1].handle, I915_GEM_DOMAIN_GTT, 0);
- gpu_latency = (results[repeats-1] - results[0]) / (double)(repeats-1);
+ gpu_latency = (results[repeats-1] - results[1]) / (double)(repeats-2);
gem_set_domain(fd, obj[2].handle,
I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
@@ -238,10 +239,11 @@ static void latency_on_ring(int fd,
igt_assert(offset == obj[2].offset);
gem_set_domain(fd, obj[1].handle, I915_GEM_DOMAIN_GTT, 0);
- igt_info("%s: dispatch latency: %.2f, execution latency: %.2f (target %.2f)\n",
+ igt_info("%s: dispatch latency: %.1fns, execution latency: %.1fns (target %.1fns)\n",
name,
- (end - start) / (double)repeats,
- gpu_latency, (results[repeats - 1] - results[0]) / (double)(repeats - 1));
+ (end - start) / (double)repeats * rcs_clock,
+ gpu_latency * rcs_clock,
+ (results[repeats - 1] - results[0]) / (double)(repeats - 1) * rcs_clock);
munmap(map, 64*1024);
munmap(results, 4096);
@@ -620,6 +622,30 @@ rthog_latency_on_ring(int fd, unsigned int engine, const char *name, unsigned in
munmap(results, MMAP_SZ);
}
+static double clockrate(void)
+{
+ volatile uint32_t *reg;
+ uint32_t r_start, r_end;
+ struct timespec tv;
+ uint64_t t_start, t_end;
+ uint64_t elapsed;
+
+ reg = (volatile uint32_t *)((volatile char *)igt_global_mmio + RCS_TIMESTAMP);
+
+ t_start = igt_nsec_elapsed(&tv);
+ r_start = *reg;
+ elapsed = igt_nsec_elapsed(&tv) - t_start;
+
+ usleep(1000);
+
+ t_end = igt_nsec_elapsed(&tv);
+ r_end = *reg;
+ elapsed += igt_nsec_elapsed(&tv) - t_end;
+
+ elapsed = (t_end - t_start) + elapsed / 2;
+ return (r_end - r_start) * 1e9 / elapsed;
+}
+
igt_main
{
const struct intel_execution_engine *e;
@@ -640,6 +666,10 @@ igt_main
ring_size = 1024;
intel_register_access_init(intel_get_pci_device(), false, device);
+ rcs_clock = clockrate();
+ igt_info("RCS timestamp clock: %.3fKHz, %.1fns\n",
+ rcs_clock / 1e3, 1e9 / rcs_clock);
+ rcs_clock = 1e9 / rcs_clock;
}
igt_subtest("all-rtidle-submit")
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_exec_latency: Normalize results into ns
2019-01-29 8:52 ` [igt-dev] " Chris Wilson
(?)
@ 2019-01-29 9:36 ` Patchwork
-1 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-01-29 9:36 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: i915/gem_exec_latency: Normalize results into ns
URL : https://patchwork.freedesktop.org/series/55884/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5499 -> IGTPW_2312
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/55884/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2312 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@cs-compute:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094]
* igt@amdgpu/amd_prime@amd-to-i915:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#107341]
* igt@kms_busy@basic-flip-a:
- fi-gdg-551: PASS -> FAIL [fdo#103182]
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
#### Possible fixes ####
* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS
* igt@prime_vgem@basic-fence-flip:
- fi-kbl-7500u: {SKIP} [fdo#109271] -> PASS +33
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#107341]: https://bugs.freedesktop.org/show_bug.cgi?id=107341
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
Participating hosts (45 -> 40)
------------------------------
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-icl-u3
Build changes
-------------
* IGT: IGT_4796 -> IGTPW_2312
CI_DRM_5499: 3c874f04ad225c2cdf9552c5e70182006696f258 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2312: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2312/
IGT_4796: d1bd9c6ad6f3482bbccf4aa6417dd449e9efbe39 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2312/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_exec_latency: Normalize results into ns
2019-01-29 8:52 ` [igt-dev] " Chris Wilson
(?)
(?)
@ 2019-01-29 11:10 ` Patchwork
-1 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-01-29 11:10 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: i915/gem_exec_latency: Normalize results into ns
URL : https://patchwork.freedesktop.org/series/55884/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5499_full -> IGTPW_2312_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/55884/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2312_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-kbl: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: PASS -> FAIL [fdo#108145] +1
* igt@kms_color@pipe-b-legacy-gamma:
- shard-apl: PASS -> FAIL [fdo#104782]
* igt@kms_color@pipe-c-ctm-max:
- shard-apl: PASS -> FAIL [fdo#108147]
* igt@kms_cursor_crc@cursor-128x128-dpms:
- shard-kbl: PASS -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-128x42-onscreen:
- shard-apl: PASS -> FAIL [fdo#103232] +2
* igt@kms_cursor_crc@cursor-256x256-dpms:
- shard-glk: PASS -> FAIL [fdo#103232] +7
* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-kbl: PASS -> FAIL [fdo#103191] / [fdo#103232]
- shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232]
* igt@kms_cursor_legacy@flip-vs-cursor-toggle:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]
* igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-glk: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
- shard-apl: PASS -> FAIL [fdo#103166] +5
* igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
- shard-kbl: PASS -> FAIL [fdo#103166] +3
* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166] +7
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-glk: PASS -> DMESG-FAIL [fdo#105763] / [fdo#106538]
* igt@perf_pmu@busy-idle-no-semaphores-rcs0:
- shard-snb: PASS -> INCOMPLETE [fdo#105411]
* igt@perf_pmu@rc6-runtime-pm:
- shard-glk: PASS -> FAIL [fdo#105010]
- shard-apl: PASS -> FAIL [fdo#105010]
#### Possible fixes ####
* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-kbl: FAIL [fdo#106641] -> PASS
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
- shard-apl: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS +1
* igt@kms_cursor_crc@cursor-256x256-sliding:
- shard-glk: FAIL [fdo#103232] -> PASS +2
* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-kbl: FAIL [fdo#103232] -> PASS +2
* igt@kms_cursor_crc@cursor-64x21-random:
- shard-apl: FAIL [fdo#103232] -> PASS +4
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-kbl: FAIL [fdo#103191] / [fdo#103232] -> PASS
* igt@kms_draw_crc@fill-fb:
- shard-glk: FAIL [fdo#103184] -> PASS
* igt@kms_flip@dpms-vs-vblank-race:
- shard-kbl: FAIL [fdo#103060] -> PASS
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS
* igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
- shard-apl: FAIL [fdo#103166] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
Participating hosts (6 -> 5)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_4796 -> IGTPW_2312
* Piglit: piglit_4509 -> None
CI_DRM_5499: 3c874f04ad225c2cdf9552c5e70182006696f258 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2312: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2312/
IGT_4796: d1bd9c6ad6f3482bbccf4aa6417dd449e9efbe39 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2312/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-29 11:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 8:52 [PATCH i-g-t] i915/gem_exec_latency: Normalize results into ns Chris Wilson
2019-01-29 8:52 ` [igt-dev] " Chris Wilson
2019-01-29 9:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-29 11:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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.