* [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch
@ 2018-07-10 23:45 Antonio Argenziano
2018-07-11 0:39 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3) Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Antonio Argenziano @ 2018-07-10 23:45 UTC (permalink / raw)
To: igt-dev
An hanging batch is nothing more than a spinning batch that never gets
stopped, so re-use the routines implemented in dummyload.c.
v2:
- Let caller decide spin loop size
- Now builds with meson.
v3:
- Only use loose loops for hangs (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
lib/igt_gt.c | 57 ++++++++-------------------------------------------------
lib/meson.build | 1 +
2 files changed, 9 insertions(+), 49 deletions(-)
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 89b318ae..a363b409 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -40,6 +40,7 @@
#include "ioctl_wrappers.h"
#include "intel_reg.h"
#include "intel_chipset.h"
+#include "igt_dummyload.h"
/**
* SECTION:igt_gt
@@ -271,14 +272,10 @@ igt_hang_t igt_hang_ctx(int fd,
unsigned flags,
uint64_t *offset)
{
- struct drm_i915_gem_relocation_entry reloc;
- struct drm_i915_gem_execbuffer2 execbuf;
- struct drm_i915_gem_exec_object2 exec;
+ igt_spin_t *spinning_batch;
+ struct igt_spin_factory opts = {};
struct drm_i915_gem_context_param param;
- uint32_t b[16];
unsigned ban;
- unsigned len;
- int gen;
igt_require_hang_ring(fd, ring);
@@ -302,52 +299,14 @@ igt_hang_t igt_hang_ctx(int fd,
if ((flags & HANG_ALLOW_BAN) == 0)
context_set_ban(fd, ctx, 0);
- memset(&reloc, 0, sizeof(reloc));
- memset(&exec, 0, sizeof(exec));
- memset(&execbuf, 0, sizeof(execbuf));
-
- exec.handle = gem_create(fd, 4096);
- exec.relocation_count = 1;
- exec.relocs_ptr = to_user_pointer(&reloc);
-
- memset(b, 0xc5, sizeof(b));
-
- len = 0;
- gen = intel_gen(intel_get_drm_devid(fd));
- if (gen >= 8) {
- b[len++] = MI_BATCH_BUFFER_START | 1 << 8 | 1;
- b[len++] = 0;
- b[len++] = 0;
- } else if (gen >= 6) {
- b[len++] = MI_BATCH_BUFFER_START | 1 << 8;
- b[len++] = 0;
- } else {
- b[len++] = MI_BATCH_BUFFER_START | 2 << 6;
- b[len] = 0;
- if (gen < 4) {
- b[len] |= 1;
- reloc.delta = 1;
- }
- len++;
- }
- b[len++] = MI_BATCH_BUFFER_END;
- b[len] = MI_NOOP;
- gem_write(fd, exec.handle, 0, b, sizeof(b));
-
- reloc.offset = sizeof(uint32_t);
- reloc.target_handle = exec.handle;
- reloc.read_domains = I915_GEM_DOMAIN_COMMAND;
-
- execbuf.buffers_ptr = to_user_pointer(&exec);
- execbuf.buffer_count = 1;
- execbuf.flags = ring;
- i915_execbuffer2_set_context_id(execbuf, ctx);
- gem_execbuf(fd, &execbuf);
+ opts.ctx = ctx;
+ opts.engine = ring;
+ spinning_batch = igt_spin_batch_factory(fd, &opts);
if (offset)
- *offset = exec.offset;
+ *offset = spinning_batch->obj[1].offset; /* The batch is the last object */
- return (igt_hang_t){ exec.handle, ctx, ban, flags };
+ return (igt_hang_t){ spinning_batch->obj[1].handle, ctx, ban, flags };
}
/**
diff --git a/lib/meson.build b/lib/meson.build
index 1a355414..868801c2 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -134,6 +134,7 @@ lib_igt_chipset = declare_dependency(link_with : lin_igt_chipset_build,
lib_igt_perf_build = static_library('igt_perf',
['igt_perf.c'],
+ dependencies: [libdrm],
include_directories : inc)
lib_igt_perf = declare_dependency(link_with : lib_igt_perf_build,
--
2.16.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3)
2018-07-10 23:45 [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch Antonio Argenziano
@ 2018-07-11 0:39 ` Patchwork
2018-07-11 4:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-07-11 10:43 ` [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch Chris Wilson
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-11 0:39 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: igt-dev
== Series Details ==
Series: lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3)
URL : https://patchwork.freedesktop.org/series/46209/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4466 -> IGTPW_1553 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46209/revisions/3/mbox/
== Known issues ==
Here are the changes found in IGTPW_1553 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: PASS -> DMESG-WARN (fdo#105128, fdo#107139)
igt@kms_busy@basic-flip-b:
fi-blb-e6850: PASS -> FAIL (fdo#103182)
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
{fi-skl-iommu}: FAIL (fdo#106686) -> SKIP +2
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103182 https://bugs.freedesktop.org/show_bug.cgi?id=103182
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#106686 https://bugs.freedesktop.org/show_bug.cgi?id=106686
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
== Participating hosts (45 -> 41) ==
Additional (1): fi-kbl-guc
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* IGT: IGT_4545 -> IGTPW_1553
CI_DRM_4466: 40ea4d696481930682c782e8dd7bd0cdbdfad574 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1553: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1553/
IGT_4545: c3035d8cb11459f186f712d9c7ebb6734fc99831 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1553/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* [igt-dev] ✗ Fi.CI.IGT: failure for lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3)
2018-07-10 23:45 [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch Antonio Argenziano
2018-07-11 0:39 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3) Patchwork
@ 2018-07-11 4:16 ` Patchwork
2018-07-11 7:27 ` Chris Wilson
2018-07-11 10:43 ` [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch Chris Wilson
2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2018-07-11 4:16 UTC (permalink / raw)
To: Antonio Argenziano; +Cc: igt-dev
== Series Details ==
Series: lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3)
URL : https://patchwork.freedesktop.org/series/46209/
State : failure
== Summary ==
= CI Bug Log - changes from IGT_4545_full -> IGTPW_1553_full =
== Summary - FAILURE ==
Serious unknown changes coming with IGTPW_1553_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1553_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46209/revisions/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1553_full:
=== IGT changes ===
==== Possible regressions ====
igt@gem_exec_schedule@preemptive-hang-bsd1:
shard-kbl: PASS -> FAIL +4
igt@gem_exec_schedule@preemptive-hang-render:
shard-apl: PASS -> FAIL +3
igt@gem_exec_schedule@preemptive-hang-vebox:
shard-glk: PASS -> FAIL +3
==== Warnings ====
igt@gem_mocs_settings@mocs-rc6-ctx-dirty-render:
shard-kbl: PASS -> SKIP
igt@kms_draw_crc@draw-method-xrgb8888-pwrite-xtiled:
shard-snb: SKIP -> PASS +1
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-render:
shard-hsw: PASS -> SKIP
== Known issues ==
Here are the changes found in IGTPW_1553_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_schedule@preempt-other-bsd1:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: PASS -> INCOMPLETE (fdo#106023, fdo#103665)
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: PASS -> FAIL (fdo#105454, fdo#106509)
igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#105363)
igt@kms_flip_tiling@flip-to-y-tiled:
shard-glk: PASS -> FAIL (fdo#107161)
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-snb: PASS -> FAIL (fdo#103166)
igt@kms_rotation_crc@sprite-rotation-180:
shard-snb: PASS -> FAIL (fdo#103925) +1
==== Possible fixes ====
igt@drv_module_reload@basic-reload-inject:
shard-glk: DMESG-WARN -> PASS
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#106023, fdo#103665) -> PASS
igt@kms_available_modes_crc@available_mode_test_crc:
shard-snb: FAIL (fdo#106641) -> PASS
igt@kms_flip@2x-plain-flip-ts-check-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS +1
igt@kms_flip_tiling@flip-to-x-tiled:
shard-glk: FAIL (fdo#107161, fdo#103822) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS
igt@perf@polling:
shard-hsw: FAIL (fdo#102252) -> PASS
igt@testdisplay:
shard-glk: INCOMPLETE (fdo#103359, k.org#198133) -> PASS
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#107161 https://bugs.freedesktop.org/show_bug.cgi?id=107161
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 (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4545 -> IGTPW_1553
* Linux: CI_DRM_4463 -> CI_DRM_4466
CI_DRM_4463: 756ded1fe53d1449d239c6b34f97e03e478a8a38 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4466: 40ea4d696481930682c782e8dd7bd0cdbdfad574 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1553: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1553/
IGT_4545: c3035d8cb11459f186f712d9c7ebb6734fc99831 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1553/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] ✗ Fi.CI.IGT: failure for lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3)
2018-07-11 4:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-07-11 7:27 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-07-11 7:27 UTC (permalink / raw)
To: Antonio Argenziano, Patchwork, igt-dev
Quoting Patchwork (2018-07-11 05:16:36)
> == Series Details ==
>
> Series: lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3)
> URL : https://patchwork.freedesktop.org/series/46209/
> State : failure
>
> == Summary ==
>
> = CI Bug Log - changes from IGT_4545_full -> IGTPW_1553_full =
>
> == Summary - FAILURE ==
>
> Serious unknown changes coming with IGTPW_1553_full absolutely need to be
> verified manually.
>
> If you think the reported changes have nothing to do with the changes
> introduced in IGTPW_1553_full, please notify your bug team to allow them
> to document this new failure mode, which will reduce false positives in CI.
>
> External URL: https://patchwork.freedesktop.org/api/1.0/series/46209/revisions/3/mbox/
>
> == Possible new issues ==
>
> Here are the unknown changes that may have been introduced in IGTPW_1553_full:
>
> === IGT changes ===
>
> ==== Possible regressions ====
>
> igt@gem_exec_schedule@preemptive-hang-bsd1:
> shard-kbl: PASS -> FAIL +4
>
> igt@gem_exec_schedule@preemptive-hang-render:
> shard-apl: PASS -> FAIL +3
>
> igt@gem_exec_schedule@preemptive-hang-vebox:
> shard-glk: PASS -> FAIL +3
Do you remember what the difference was and why we didn't use the
spinner here? There's a patch for this buried inside preempt-timeout...
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch
2018-07-10 23:45 [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch Antonio Argenziano
2018-07-11 0:39 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3) Patchwork
2018-07-11 4:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-07-11 10:43 ` Chris Wilson
2 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-07-11 10:43 UTC (permalink / raw)
To: Antonio Argenziano, igt-dev
Quoting Antonio Argenziano (2018-07-11 00:45:26)
> An hanging batch is nothing more than a spinning batch that never gets
> stopped, so re-use the routines implemented in dummyload.c.
>
> v2:
> - Let caller decide spin loop size
> - Now builds with meson.
>
> v3:
> - Only use loose loops for hangs (Chris)
>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> lib/igt_gt.c | 57 ++++++++-------------------------------------------------
> lib/meson.build | 1 +
> 2 files changed, 9 insertions(+), 49 deletions(-)
>
> diff --git a/lib/igt_gt.c b/lib/igt_gt.c
> index 89b318ae..a363b409 100644
> --- a/lib/igt_gt.c
> +++ b/lib/igt_gt.c
> @@ -40,6 +40,7 @@
> #include "ioctl_wrappers.h"
> #include "intel_reg.h"
> #include "intel_chipset.h"
> +#include "igt_dummyload.h"
>
> /**
> * SECTION:igt_gt
> @@ -271,14 +272,10 @@ igt_hang_t igt_hang_ctx(int fd,
> unsigned flags,
> uint64_t *offset)
> {
> - struct drm_i915_gem_relocation_entry reloc;
> - struct drm_i915_gem_execbuffer2 execbuf;
> - struct drm_i915_gem_exec_object2 exec;
> + igt_spin_t *spinning_batch;
> + struct igt_spin_factory opts = {};
> struct drm_i915_gem_context_param param;
> - uint32_t b[16];
> unsigned ban;
> - unsigned len;
> - int gen;
>
> igt_require_hang_ring(fd, ring);
>
> @@ -302,52 +299,14 @@ igt_hang_t igt_hang_ctx(int fd,
> if ((flags & HANG_ALLOW_BAN) == 0)
> context_set_ban(fd, ctx, 0);
>
> - memset(&reloc, 0, sizeof(reloc));
> - memset(&exec, 0, sizeof(exec));
> - memset(&execbuf, 0, sizeof(execbuf));
> -
> - exec.handle = gem_create(fd, 4096);
> - exec.relocation_count = 1;
> - exec.relocs_ptr = to_user_pointer(&reloc);
> -
> - memset(b, 0xc5, sizeof(b));
> -
> - len = 0;
> - gen = intel_gen(intel_get_drm_devid(fd));
> - if (gen >= 8) {
> - b[len++] = MI_BATCH_BUFFER_START | 1 << 8 | 1;
> - b[len++] = 0;
> - b[len++] = 0;
> - } else if (gen >= 6) {
> - b[len++] = MI_BATCH_BUFFER_START | 1 << 8;
> - b[len++] = 0;
> - } else {
> - b[len++] = MI_BATCH_BUFFER_START | 2 << 6;
> - b[len] = 0;
> - if (gen < 4) {
> - b[len] |= 1;
> - reloc.delta = 1;
> - }
> - len++;
> - }
> - b[len++] = MI_BATCH_BUFFER_END;
> - b[len] = MI_NOOP;
> - gem_write(fd, exec.handle, 0, b, sizeof(b));
> -
> - reloc.offset = sizeof(uint32_t);
> - reloc.target_handle = exec.handle;
> - reloc.read_domains = I915_GEM_DOMAIN_COMMAND;
> -
> - execbuf.buffers_ptr = to_user_pointer(&exec);
> - execbuf.buffer_count = 1;
> - execbuf.flags = ring;
> - i915_execbuffer2_set_context_id(execbuf, ctx);
> - gem_execbuf(fd, &execbuf);
> + opts.ctx = ctx;
> + opts.engine = ring;
Pushed IGT_SPIN_NO_PREEMPTION which you want to use for your opts.flags here.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-11 10:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 23:45 [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch Antonio Argenziano
2018-07-11 0:39 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/hang_ctx: Make use of dummyload library to create recursive batch (rev3) Patchwork
2018-07-11 4:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-07-11 7:27 ` Chris Wilson
2018-07-11 10:43 ` [igt-dev] [PATCH i-g-t v3] lib/hang_ctx: Make use of dummyload library to create recursive batch Chris Wilson
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).