i915/gem_spin_batch: Add test to resend spinner
PATCH 1/1 i915/gem_spin_batch: Add test to resend spinner
Add subtests to resend the same spinner to same context and to other context.
--- tests/i915/gem_spin_batch.c | 47 ++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-)
tests/i915/gem_spin_batch.c +38 -9
@@ -66,6 +66,36 @@ static void spin(int fd, unsigned int engine, unsigned int timeout_sec)assert_within_epsilon (timeout_100ms * loops, elapsed,MAX_ERROR ); } +#define RESUBMIT_OTHER_CTX (1 << 0) + +static void spin_resubmit (int fd,unsigned int engine,unsigned int flags) +{ +const uint32_t ctx0 =gem_context_create (fd); +const uint32_t ctx1 = (flags &RESUBMIT_OTHER_CTX ) ? +gem_context_create (fd) : ctx0; + igt_spin_t *spin = __igt_spin_batch_new(fd, .ctx = ctx0, .engine = engine); + +struct drm_i915_gem_execbuffer2 eb = { + .buffer_count =1 , + .buffers_ptr =to_user_pointer (&spin->obj[1 ]), + .rsvd1 = ctx1, + .flags = engine, + }; + +gem_execbuf (fd, &eb); + +igt_spin_batch_end (spin); + +gem_sync (fd, spin->obj[1 ].handle); + +igt_spin_batch_free (fd, spin); + +if (ctx1 != ctx0) +gem_context_destroy (fd, ctx1); + +gem_context_destroy (fd, ctx0); +} +static void spin_exit_handler (int sig) {igt_terminate_spin_batches ();
@@ -96,22 +126,21 @@ igt_main fd =drm_open_driver (DRIVER_INTEL );igt_require_gem (fd);igt_fork_hang_detector (fd); -intel_detect_and_clear_missed_interrupts (fd); }for (e = intel_execution_engines; e->name; e++) { - igt_subtest_f("basic-%s", e->name) { -intel_detect_and_clear_missed_interrupts (fd); + igt_subtest_f("basic-%s", e->name)spin (fd, e->exec_id,3 ); -igt_assert_eq (intel_detect_and_clear_missed_interrupts (fd),0 ); - } + + igt_subtest_f("resubmit-%s", e->name) +spin_resubmit (fd, e->exec_id,0 ); + + igt_subtest_f("resubmit-other-%s", e->name) +spin_resubmit (fd, e->exec_id,RESUBMIT_OTHER_CTX ); } - igt_subtest("spin-each") { -intel_detect_and_clear_missed_interrupts (fd); + igt_subtest("spin-each")spin_on_all_engines (fd,3 ); -igt_assert_eq (intel_detect_and_clear_missed_interrupts (fd),0 ); - } igt_fixture {igt_stop_hang_detector ();
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2019-04-16 15:23:15)
Quoted 5 lines
Add subtests to resend the same spinner to same context and to other context.
Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>
For completeness in creating concise examples of use elsewhere, feed the gem_execbuf to the other engines.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 i915/gem_spin_batch: Add test to resend spinner
Add subtests to resend the same spinner to same context and to other context.
v2: other engines (Chris)
--- tests/i915/gem_spin_batch.c | 67 ++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 9 deletions(-)
tests/i915/gem_spin_batch.c +58 -9
@@ -66,6 +66,48 @@ static void spin(int fd, unsigned int engine, unsigned int timeout_sec)assert_within_epsilon (timeout_100ms * loops, elapsed,MAX_ERROR ); } +#define RESUBMIT_NEW_CTX (1 << 0) +#define RESUBMIT_ALL_ENGINES (1 << 1) + +static void spin_resubmit (int fd,unsigned int engine,unsigned int flags) +{ +const uint32_t ctx0 =gem_context_create (fd); +const uint32_t ctx1 = (flags &RESUBMIT_NEW_CTX ) ? +gem_context_create (fd) : ctx0; + igt_spin_t *spin = __igt_spin_batch_new(fd, .ctx = ctx0, .engine = engine); +unsigned int other; + +struct drm_i915_gem_execbuffer2 eb = { + .buffer_count =1 , + .buffers_ptr =to_user_pointer (&spin->obj[1 ]), + .rsvd1 = ctx1, + }; + +if (flags &RESUBMIT_ALL_ENGINES ) { +for_each_physical_engine (fd, other) { +if (other == engine) +continue ; + + eb.flags = other; +gem_execbuf (fd, &eb); + } + }else { + eb.flags = engine; +gem_execbuf (fd, &eb); + } + +igt_spin_batch_end (spin); + +gem_sync (fd, spin->obj[1 ].handle); + +igt_spin_batch_free (fd, spin); + +if (ctx1 != ctx0) +gem_context_destroy (fd, ctx1); + +gem_context_destroy (fd, ctx0); +} +static void spin_exit_handler (int sig) {igt_terminate_spin_batches ();
@@ -96,22 +138,29 @@ igt_main fd =drm_open_driver (DRIVER_INTEL );igt_require_gem (fd);igt_fork_hang_detector (fd); -intel_detect_and_clear_missed_interrupts (fd); }for (e = intel_execution_engines; e->name; e++) { - igt_subtest_f("basic-%s", e->name) { -intel_detect_and_clear_missed_interrupts (fd); + igt_subtest_f("basic-%s", e->name)spin (fd, e->exec_id,3 ); -igt_assert_eq (intel_detect_and_clear_missed_interrupts (fd),0 ); - } + + igt_subtest_f("resubmit-%s", e->name) +spin_resubmit (fd, e->exec_id,0 ); + + igt_subtest_f("resubmit-new-%s", e->name) +spin_resubmit (fd, e->exec_id,RESUBMIT_NEW_CTX ); + + igt_subtest_f("resubmit-all-%s", e->name) +spin_resubmit (fd, e->exec_id,RESUBMIT_ALL_ENGINES ); + + igt_subtest_f("resubmit-new-all-%s", e->name) +spin_resubmit (fd, e->exec_id, +RESUBMIT_NEW_CTX | +RESUBMIT_ALL_ENGINES ); } - igt_subtest("spin-each") { -intel_detect_and_clear_missed_interrupts (fd); + igt_subtest("spin-each")spin_on_all_engines (fd,3 ); -igt_assert_eq (intel_detect_and_clear_missed_interrupts (fd),0 ); - } igt_fixture {igt_stop_hang_detector ();
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2019-04-16 16:01:58)
Quoted 7 lines
Add subtests to resend the same spinner to same context and to other context.
v2: other engines (Chris)
Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>
tests/i915/gem_spin_batch.c igt_main · line 159
Quoted 13 lines
tests/i915/gem_spin_batch.c +13
-0+ igt_subtest_f("resubmit-%s", e->name) +spin_resubmit (fd, e->exec_id,0 ); + + igt_subtest_f("resubmit-new-%s", e->name) +spin_resubmit (fd, e->exec_id,RESUBMIT_NEW_CTX ); + + igt_subtest_f("resubmit-all-%s", e->name) +spin_resubmit (fd, e->exec_id,RESUBMIT_ALL_ENGINES ); + + igt_subtest_f("resubmit-new-all-%s", e->name) +spin_resubmit (fd, e->exec_id, +RESUBMIT_NEW_CTX | +RESUBMIT_ALL_ENGINES );
You are getting close to wanting a loop here :)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Chris Wilson
Quoting Mika Kuoppala (2019-04-16 16:01:58)
Quoted 7 lines
Add subtests to resend the same spinner to same context and to other context.
v2: other engines (Chris)
Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>Reviewed-by Chris Wilson <[email protected]>
Quoted 15 lines
tests/i915/gem_spin_batch.c igt_main · line 159
Quoted 13 lines
tests/i915/gem_spin_batch.c +13
-0+ igt_subtest_f("resubmit-%s", e->name) +spin_resubmit (fd, e->exec_id,0 ); + + igt_subtest_f("resubmit-new-%s", e->name) +spin_resubmit (fd, e->exec_id,RESUBMIT_NEW_CTX ); + + igt_subtest_f("resubmit-all-%s", e->name) +spin_resubmit (fd, e->exec_id,RESUBMIT_ALL_ENGINES ); + + igt_subtest_f("resubmit-new-all-%s", e->name) +spin_resubmit (fd, e->exec_id, +RESUBMIT_NEW_CTX | +RESUBMIT_ALL_ENGINES );You are getting close to wanting a loop here :)
Very close. Pushed, thanks for review!
-Mika
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for i915/gem_spin_batch: Add test to resend spinner (rev2)
In reply to Mika Kuoppala== Series Details ==
== Series Details ==
Series: i915/gem_spin_batch: Add test to resend spinner (rev2)
URL : https://patchwork.freedesktop.org/series/59586/
State : success
== Summary ==
CI Bug Log - changes from IGT_4952 -> IGTPW_2870
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59586/revisions/2/mbox/
Known issues
------------
Here are the changes found in IGTPW_2870 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_cs_nop@fork-compute0:
- fi-icl-y: NOTRUN -> SKIP [fdo#109315] +17
* igt@gem_exec_basic@basic-bsd2:
- fi-icl-y: NOTRUN -> SKIP [fdo#109276] +7
* igt@gem_exec_parse@basic-rejected:
- fi-icl-y: NOTRUN -> SKIP [fdo#109289] +1
* igt@i915_selftest@live_hangcheck:
- fi-icl-y: NOTRUN -> INCOMPLETE [fdo#108569]
* igt@kms_chamelium@dp-crc-fast:
- fi-icl-y: NOTRUN -> SKIP [fdo#109284] +8
* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- fi-glk-dsi: PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]
* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-y: NOTRUN -> SKIP [fdo#109285] +3
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: PASS -> FAIL [fdo#103167]
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-byt-clapper: PASS -> FAIL [fdo#103191]
* igt@kms_psr@primary_mmap_gtt:
- fi-icl-y: NOTRUN -> SKIP [fdo#110189] +3
* igt@prime_vgem@basic-fence-flip:
- fi-icl-y: NOTRUN -> SKIP [fdo#109294]
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (48 -> 43)
------------------------------
Additional (1): fi-icl-y
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
Build changes
-------------
* IGT: IGT_4952 -> IGTPW_2870
CI_DRM_5939: 757f5370dc4baed0475b6e28efd67ecc267e8745 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2870: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2870/
IGT_4952: d196925ed16221768689efa1ea06c4869e9fc2a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@gem_spin_batch@resubmit-all-blt
+igt@gem_spin_batch@resubmit-all-bsd
+igt@gem_spin_batch@resubmit-all-bsd1
+igt@gem_spin_batch@resubmit-all-bsd2
+igt@gem_spin_batch@resubmit-all-default
+igt@gem_spin_batch@resubmit-all-render
+igt@gem_spin_batch@resubmit-all-vebox
+igt@gem_spin_batch@resubmit-blt
+igt@gem_spin_batch@resubmit-bsd
+igt@gem_spin_batch@resubmit-bsd1
+igt@gem_spin_batch@resubmit-bsd2
+igt@gem_spin_batch@resubmit-default
+igt@gem_spin_batch@resubmit-new-all-blt
+igt@gem_spin_batch@resubmit-new-all-bsd
+igt@gem_spin_batch@resubmit-new-all-bsd1
+igt@gem_spin_batch@resubmit-new-all-bsd2
+igt@gem_spin_batch@resubmit-new-all-default
+igt@gem_spin_batch@resubmit-new-all-render
+igt@gem_spin_batch@resubmit-new-all-vebox
+igt@gem_spin_batch@resubmit-new-blt
+igt@gem_spin_batch@resubmit-new-bsd
+igt@gem_spin_batch@resubmit-new-bsd1
+igt@gem_spin_batch@resubmit-new-bsd2
+igt@gem_spin_batch@resubmit-new-default
+igt@gem_spin_batch@resubmit-new-render
+igt@gem_spin_batch@resubmit-new-vebox
+igt@gem_spin_batch@resubmit-render
+igt@gem_spin_batch@resubmit-vebox
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2870/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for i915/gem_spin_batch: Add test to resend spinner (rev2)
In reply to Mika Kuoppala== Series Details ==
== Series Details ==
Series: i915/gem_spin_batch: Add test to resend spinner (rev2)
URL : https://patchwork.freedesktop.org/series/59586/
State : success
== Summary ==
CI Bug Log - changes from IGT_4952_full -> IGTPW_2870_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/59586/revisions/2/mbox/
Known issues
------------
Here are the changes found in IGTPW_2870_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_fence_thrash@bo-write-verify-threaded-y:
- shard-glk: PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]
* igt@gem_softpin@evict-snoop-interruptible:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +18
* igt@gem_tiled_swapping@non-threaded:
- shard-hsw: PASS -> FAIL [fdo#108686]
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: PASS -> DMESG-WARN [fdo#108566] +6
* igt@i915_pm_rpm@i2c:
- shard-iclb: PASS -> DMESG-FAIL [fdo#110271]
* igt@kms_atomic_transition@3x-modeset-transitions-nonblocking:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3
* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-glk: NOTRUN -> FAIL [fdo#103232] +1
* igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
- shard-glk: PASS -> FAIL [fdo#106509] / [fdo#107409]
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-msflip-blt:
- shard-glk: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#103167] +7
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-wc:
- shard-iclb: PASS -> FAIL [fdo#109247] +9
* igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-shrfb-draw-mmap-cpu:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +24
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-f:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-glk: PASS -> SKIP [fdo#109271]
* igt@kms_plane_lowres@pipe-b-tiling-yf:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +19
* igt@kms_psr@primary_mmap_gtt:
- shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215]
* igt@kms_psr@psr2_primary_render:
- shard-iclb: PASS -> SKIP [fdo#109441]
* igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +33
* igt@kms_universal_plane@universal-plane-gen9-features-pipe-e:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2
#### Possible fixes ####
* igt@gem_tiled_swapping@non-threaded:
- shard-iclb: FAIL [fdo#108686] -> PASS
* igt@i915_suspend@forcewake:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS
* igt@kms_color@pipe-b-legacy-gamma:
- shard-apl: FAIL [fdo#104782] -> PASS
- shard-kbl: FAIL [fdo#104782] -> PASS
* igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
- shard-kbl: FAIL [fdo#103167] -> PASS
- shard-apl: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: FAIL [fdo#103167] -> PASS +4
* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
- shard-iclb: FAIL [fdo#109247] -> PASS +13
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS
* igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: SKIP [fdo#109441] -> PASS +4
* igt@kms_psr@sprite_mmap_gtt:
- shard-iclb: FAIL [fdo#107383] / [fdo#110215] -> PASS +1
* igt@kms_setmode@basic:
- shard-apl: FAIL [fdo#99912] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#107409]: https://bugs.freedesktop.org/show_bug.cgi?id=107409
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
[fdo#110271]: https://bugs.freedesktop.org/show_bug.cgi?id=110271
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_4952 -> IGTPW_2870
CI_DRM_5939: 757f5370dc4baed0475b6e28efd67ecc267e8745 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2870: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2870/
IGT_4952: d196925ed16221768689efa1ea06c4869e9fc2a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2870/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx