All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
@ 2019-05-22 19:45 ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-05-22 19:45 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Matthew Auld

The only detail of note here was that we were creating a fence from the
recursive batch, now supported by igt_spin_t (thanks Tvrtko).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
 lib/igt_core.c              |  1 +
 lib/igt_dummyload.c         |  5 +++
 lib/igt_dummyload.h         |  1 +
 tests/i915/gem_exec_fence.c | 77 ++++++++-----------------------------
 4 files changed, 22 insertions(+), 62 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index d5d4fce26..3ae11cef0 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1731,6 +1731,7 @@ bool __igt_fork(void)
 		exit_handler_count = 0;
 		reset_helper_process_list();
 		oom_adjust_for_doom();
+		igt_unclone_spins();
 
 		return true;
 	default:
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 1e11ccd3d..d1521f9a0 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -464,6 +464,11 @@ void igt_terminate_spins(void)
 	pthread_mutex_unlock(&list_lock);
 }
 
+void igt_unclone_spins(void)
+{
+	igt_list_init(&spin_list);
+}
+
 static uint32_t plug_vgem_handle(struct igt_cork *cork, int fd)
 {
 	struct vgem_bo bo;
diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
index 61a9f2fcf..b9eca3519 100644
--- a/lib/igt_dummyload.h
+++ b/lib/igt_dummyload.h
@@ -92,6 +92,7 @@ static inline void igt_spin_busywait_until_started(igt_spin_t *spin)
 }
 
 void igt_terminate_spins(void);
+void igt_unclone_spins(void);
 
 enum igt_cork_type {
 	CORK_SYNC_FD = 1,
diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
index 8120f8b56..0befb54f8 100644
--- a/tests/i915/gem_exec_fence.c
+++ b/tests/i915/gem_exec_fence.c
@@ -317,68 +317,22 @@ static void test_fence_busy_all(int fd, unsigned flags)
 
 static void test_fence_await(int fd, unsigned ring, unsigned flags)
 {
-	const int gen = intel_gen(intel_get_drm_devid(fd));
-	struct drm_i915_gem_exec_object2 obj;
-	struct drm_i915_gem_relocation_entry reloc;
-	struct drm_i915_gem_execbuffer2 execbuf;
 	uint32_t scratch = gem_create(fd, 4096);
-	uint32_t *batch, *out;
+	igt_spin_t *spin;
 	unsigned engine;
-	int fence, i;
+	uint32_t *out;
+	int i;
 
 	igt_require(gem_can_store_dword(fd, 0));
 
-	memset(&execbuf, 0, sizeof(execbuf));
-	execbuf.buffers_ptr = to_user_pointer(&obj);
-	execbuf.buffer_count = 1;
-	execbuf.flags = ring | LOCAL_EXEC_FENCE_OUT;
-
-	memset(&obj, 0, sizeof(obj));
-	obj.handle = gem_create(fd, 4096);
-
-	obj.relocs_ptr = to_user_pointer(&reloc);
-	obj.relocation_count = 1;
-	memset(&reloc, 0, sizeof(reloc));
-
 	out = gem_mmap__wc(fd, scratch, 0, 4096, PROT_WRITE);
-	gem_set_domain(fd, obj.handle,
-			I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
-
-	batch = gem_mmap__wc(fd, obj.handle, 0, 4096, PROT_WRITE);
-	gem_set_domain(fd, obj.handle,
+	gem_set_domain(fd, scratch,
 			I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
 
-	reloc.target_handle = obj.handle; /* recurse */
-	reloc.presumed_offset = 0;
-	reloc.offset = sizeof(uint32_t);
-	reloc.delta = 0;
-	reloc.read_domains = I915_GEM_DOMAIN_COMMAND;
-	reloc.write_domain = 0;
-
-	i = 0;
-	batch[i] = MI_BATCH_BUFFER_START;
-	if (gen >= 8) {
-		batch[i] |= 1 << 8 | 1;
-		batch[++i] = 0;
-		batch[++i] = 0;
-	} else if (gen >= 6) {
-		batch[i] |= 1 << 8;
-		batch[++i] = 0;
-	} else {
-		batch[i] |= 2 << 6;
-		batch[++i] = 0;
-		if (gen < 4) {
-			batch[i] |= 1;
-			reloc.delta = 1;
-		}
-	}
-	i++;
-
-	execbuf.rsvd2 = -1;
-	gem_execbuf_wr(fd, &execbuf);
-	gem_close(fd, obj.handle);
-	fence = execbuf.rsvd2 >> 32;
-	igt_assert(fence != -1);
+	spin = igt_spin_new(fd,
+			    .engine = ring,
+			    .flags = IGT_SPIN_FENCE_OUT);
+	igt_assert(spin->out_fence != -1);
 
 	i = 0;
 	for_each_physical_engine(fd, engine) {
@@ -386,27 +340,24 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags)
 			continue;
 
 		if (flags & NONBLOCK) {
-			store(fd, engine, fence, scratch, i);
+			store(fd, engine, spin->out_fence, scratch, i);
 		} else {
 			igt_fork(child, 1)
-				store(fd, engine, fence, scratch, i);
+				store(fd, engine, spin->out_fence, scratch, i);
 		}
 
 		i++;
 	}
-	close(fence);
 
 	sleep(1);
 
 	/* Check for invalidly completing the task early */
+	igt_assert(fence_busy(spin->out_fence));
 	for (int n = 0; n < i; n++)
 		igt_assert_eq_u32(out[n], 0);
 
-	if ((flags & HANG) == 0) {
-		*batch = MI_BATCH_BUFFER_END;
-		__sync_synchronize();
-	}
-	munmap(batch, 4096);
+	if ((flags & HANG) == 0)
+		igt_spin_end(spin);
 
 	igt_waitchildren();
 
@@ -414,6 +365,8 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags)
 	while (i--)
 		igt_assert_eq_u32(out[i], i);
 	munmap(out, 4096);
+
+	igt_spin_free(fd, spin);
 	gem_close(fd, scratch);
 }
 
-- 
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] 6+ messages in thread

* [igt-dev] [PATCH i-g-t] i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
@ 2019-05-22 19:45 ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-05-22 19:45 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Tvrtko Ursulin, Matthew Auld

The only detail of note here was that we were creating a fence from the
recursive batch, now supported by igt_spin_t (thanks Tvrtko).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
 lib/igt_core.c              |  1 +
 lib/igt_dummyload.c         |  5 +++
 lib/igt_dummyload.h         |  1 +
 tests/i915/gem_exec_fence.c | 77 ++++++++-----------------------------
 4 files changed, 22 insertions(+), 62 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index d5d4fce26..3ae11cef0 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1731,6 +1731,7 @@ bool __igt_fork(void)
 		exit_handler_count = 0;
 		reset_helper_process_list();
 		oom_adjust_for_doom();
+		igt_unclone_spins();
 
 		return true;
 	default:
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 1e11ccd3d..d1521f9a0 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -464,6 +464,11 @@ void igt_terminate_spins(void)
 	pthread_mutex_unlock(&list_lock);
 }
 
+void igt_unclone_spins(void)
+{
+	igt_list_init(&spin_list);
+}
+
 static uint32_t plug_vgem_handle(struct igt_cork *cork, int fd)
 {
 	struct vgem_bo bo;
diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
index 61a9f2fcf..b9eca3519 100644
--- a/lib/igt_dummyload.h
+++ b/lib/igt_dummyload.h
@@ -92,6 +92,7 @@ static inline void igt_spin_busywait_until_started(igt_spin_t *spin)
 }
 
 void igt_terminate_spins(void);
+void igt_unclone_spins(void);
 
 enum igt_cork_type {
 	CORK_SYNC_FD = 1,
diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
index 8120f8b56..0befb54f8 100644
--- a/tests/i915/gem_exec_fence.c
+++ b/tests/i915/gem_exec_fence.c
@@ -317,68 +317,22 @@ static void test_fence_busy_all(int fd, unsigned flags)
 
 static void test_fence_await(int fd, unsigned ring, unsigned flags)
 {
-	const int gen = intel_gen(intel_get_drm_devid(fd));
-	struct drm_i915_gem_exec_object2 obj;
-	struct drm_i915_gem_relocation_entry reloc;
-	struct drm_i915_gem_execbuffer2 execbuf;
 	uint32_t scratch = gem_create(fd, 4096);
-	uint32_t *batch, *out;
+	igt_spin_t *spin;
 	unsigned engine;
-	int fence, i;
+	uint32_t *out;
+	int i;
 
 	igt_require(gem_can_store_dword(fd, 0));
 
-	memset(&execbuf, 0, sizeof(execbuf));
-	execbuf.buffers_ptr = to_user_pointer(&obj);
-	execbuf.buffer_count = 1;
-	execbuf.flags = ring | LOCAL_EXEC_FENCE_OUT;
-
-	memset(&obj, 0, sizeof(obj));
-	obj.handle = gem_create(fd, 4096);
-
-	obj.relocs_ptr = to_user_pointer(&reloc);
-	obj.relocation_count = 1;
-	memset(&reloc, 0, sizeof(reloc));
-
 	out = gem_mmap__wc(fd, scratch, 0, 4096, PROT_WRITE);
-	gem_set_domain(fd, obj.handle,
-			I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
-
-	batch = gem_mmap__wc(fd, obj.handle, 0, 4096, PROT_WRITE);
-	gem_set_domain(fd, obj.handle,
+	gem_set_domain(fd, scratch,
 			I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
 
-	reloc.target_handle = obj.handle; /* recurse */
-	reloc.presumed_offset = 0;
-	reloc.offset = sizeof(uint32_t);
-	reloc.delta = 0;
-	reloc.read_domains = I915_GEM_DOMAIN_COMMAND;
-	reloc.write_domain = 0;
-
-	i = 0;
-	batch[i] = MI_BATCH_BUFFER_START;
-	if (gen >= 8) {
-		batch[i] |= 1 << 8 | 1;
-		batch[++i] = 0;
-		batch[++i] = 0;
-	} else if (gen >= 6) {
-		batch[i] |= 1 << 8;
-		batch[++i] = 0;
-	} else {
-		batch[i] |= 2 << 6;
-		batch[++i] = 0;
-		if (gen < 4) {
-			batch[i] |= 1;
-			reloc.delta = 1;
-		}
-	}
-	i++;
-
-	execbuf.rsvd2 = -1;
-	gem_execbuf_wr(fd, &execbuf);
-	gem_close(fd, obj.handle);
-	fence = execbuf.rsvd2 >> 32;
-	igt_assert(fence != -1);
+	spin = igt_spin_new(fd,
+			    .engine = ring,
+			    .flags = IGT_SPIN_FENCE_OUT);
+	igt_assert(spin->out_fence != -1);
 
 	i = 0;
 	for_each_physical_engine(fd, engine) {
@@ -386,27 +340,24 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags)
 			continue;
 
 		if (flags & NONBLOCK) {
-			store(fd, engine, fence, scratch, i);
+			store(fd, engine, spin->out_fence, scratch, i);
 		} else {
 			igt_fork(child, 1)
-				store(fd, engine, fence, scratch, i);
+				store(fd, engine, spin->out_fence, scratch, i);
 		}
 
 		i++;
 	}
-	close(fence);
 
 	sleep(1);
 
 	/* Check for invalidly completing the task early */
+	igt_assert(fence_busy(spin->out_fence));
 	for (int n = 0; n < i; n++)
 		igt_assert_eq_u32(out[n], 0);
 
-	if ((flags & HANG) == 0) {
-		*batch = MI_BATCH_BUFFER_END;
-		__sync_synchronize();
-	}
-	munmap(batch, 4096);
+	if ((flags & HANG) == 0)
+		igt_spin_end(spin);
 
 	igt_waitchildren();
 
@@ -414,6 +365,8 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags)
 	while (i--)
 		igt_assert_eq_u32(out[i], i);
 	munmap(out, 4096);
+
+	igt_spin_free(fd, spin);
 	gem_close(fd, scratch);
 }
 
-- 
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] 6+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
  2019-05-22 19:45 ` [igt-dev] " Chris Wilson
  (?)
@ 2019-05-22 20:30 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-05-22 20:30 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
URL   : https://patchwork.freedesktop.org/series/61003/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6123 -> IGTPW_3034
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/61003/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_3034 that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       [INCOMPLETE][1] ([fdo#107718]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_render_linear_blits@basic:
    - {fi-icl-u3}:        [DMESG-WARN][3] ([fdo#107724]) -> [PASS][4] +2 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/fi-icl-u3/igt@gem_render_linear_blits@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/fi-icl-u3/igt@gem_render_linear_blits@basic.html

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-6770hq:      [FAIL][5] ([fdo#108511]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      [DMESG-FAIL][7] ([fdo#110235]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

  * igt@i915_selftest@live_hangcheck:
    - {fi-icl-y}:         [INCOMPLETE][9] ([fdo#107713] / [fdo#108569]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/fi-icl-y/igt@i915_selftest@live_hangcheck.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/fi-icl-y/igt@i915_selftest@live_hangcheck.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235


Participating hosts (53 -> 46)
------------------------------

  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * IGT: IGT_5005 -> IGTPW_3034

  CI_DRM_6123: d37dd1f4dfcc7a8814fd27f8bdfa97ea5c0a9bd3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3034: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/
  IGT_5005: adf9f435a795d692e30cd6eafe26eddf4993c8ff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
  2019-05-22 19:45 ` [igt-dev] " Chris Wilson
  (?)
  (?)
@ 2019-05-23 17:28 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-05-23 17:28 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
URL   : https://patchwork.freedesktop.org/series/61003/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6123_full -> IGTPW_3034_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/61003/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_3034_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_suspend@fence-restore-untiled:
    - shard-apl:          [PASS][1] -> [DMESG-WARN][2] ([fdo#108566]) +4 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-apl8/igt@i915_suspend@fence-restore-untiled.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-apl4/igt@i915_suspend@fence-restore-untiled.html

  * igt@kms_color@pipe-a-ctm-green-to-red:
    - shard-kbl:          [PASS][3] -> [FAIL][4] ([fdo#107201])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-kbl3/igt@kms_color@pipe-a-ctm-green-to-red.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-kbl3/igt@kms_color@pipe-a-ctm-green-to-red.html
    - shard-apl:          [PASS][5] -> [FAIL][6] ([fdo#107201])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-apl3/igt@kms_color@pipe-a-ctm-green-to-red.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-apl8/igt@kms_color@pipe-a-ctm-green-to-red.html

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic:
    - shard-hsw:          [PASS][7] -> [FAIL][8] ([fdo#103355])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-hsw1/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-hsw6/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html

  * igt@kms_cursor_legacy@pipe-a-forked-bo:
    - shard-hsw:          [PASS][9] -> [INCOMPLETE][10] ([fdo#103540])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-hsw1/igt@kms_cursor_legacy@pipe-a-forked-bo.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-hsw2/igt@kms_cursor_legacy@pipe-a-forked-bo.html

  * igt@kms_flip@2x-plain-flip-ts-check-interruptible:
    - shard-glk:          [PASS][11] -> [FAIL][12] ([fdo#100368])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-glk7/igt@kms_flip@2x-plain-flip-ts-check-interruptible.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-glk3/igt@kms_flip@2x-plain-flip-ts-check-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-render:
    - shard-glk:          [PASS][13] -> [FAIL][14] ([fdo#103167])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-glk5/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-render.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-glk7/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
    - shard-iclb:         [PASS][15] -> [FAIL][16] ([fdo#103167]) +3 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#109642])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-iclb2/igt@kms_psr2_su@frontbuffer.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-iclb8/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_basic:
    - shard-iclb:         [PASS][19] -> [SKIP][20] ([fdo#109441])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-iclb2/igt@kms_psr@psr2_basic.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-iclb1/igt@kms_psr@psr2_basic.html

  
#### Possible fixes ####

  * igt@gem_tiled_swapping@non-threaded:
    - shard-apl:          [DMESG-WARN][21] ([fdo#108686]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-apl2/igt@gem_tiled_swapping@non-threaded.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-apl7/igt@gem_tiled_swapping@non-threaded.html

  * igt@gem_workarounds@suspend-resume:
    - shard-apl:          [DMESG-WARN][23] ([fdo#108566]) -> [PASS][24] +6 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-apl2/igt@gem_workarounds@suspend-resume.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-apl4/igt@gem_workarounds@suspend-resume.html

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
    - shard-hsw:          [FAIL][25] ([fdo#105767]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-hsw1/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-hsw2/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-apl:          [FAIL][27] ([fdo#102670]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-apl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-apl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt:
    - shard-iclb:         [FAIL][29] ([fdo#103167]) -> [PASS][30] +2 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-kbl:          [INCOMPLETE][31] ([fdo#103665]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-kbl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-kbl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [FAIL][33] ([fdo#103166]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-iclb7/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-iclb7/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-iclb:         [SKIP][35] ([fdo#109441]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-iclb8/igt@kms_psr@psr2_primary_page_flip.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

  
#### Warnings ####

  * igt@gem_ctx_isolation@vecs0-s3:
    - shard-apl:          [WARN][37] ([fdo#110738]) -> [DMESG-WARN][38] ([fdo#108566])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-apl8/igt@gem_ctx_isolation@vecs0-s3.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-apl6/igt@gem_ctx_isolation@vecs0-s3.html

  * igt@i915_pm_rpm@modeset-lpsp:
    - shard-glk:          [SKIP][39] ([fdo#109271]) -> [INCOMPLETE][40] ([fdo#103359] / [k.org#198133])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6123/shard-glk8/igt@i915_pm_rpm@modeset-lpsp.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/shard-glk3/igt@i915_pm_rpm@modeset-lpsp.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
  [fdo#102670]: https://bugs.freedesktop.org/show_bug.cgi?id=102670
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107201]: https://bugs.freedesktop.org/show_bug.cgi?id=107201
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110738]: https://bugs.freedesktop.org/show_bug.cgi?id=110738
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (10 -> 6)
------------------------------

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


Build changes
-------------

  * IGT: IGT_5005 -> IGTPW_3034
  * Piglit: piglit_4509 -> None

  CI_DRM_6123: d37dd1f4dfcc7a8814fd27f8bdfa97ea5c0a9bd3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3034: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3034/
  IGT_5005: adf9f435a795d692e30cd6eafe26eddf4993c8ff @ 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_3034/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH i-g-t] i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
  2019-05-22 15:57 [PATCH i-g-t] " Chris Wilson
@ 2019-05-22 16:22 ` Matthew Auld
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Auld @ 2019-05-22 16:22 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On 22/05/2019 16:57, Chris Wilson wrote:
> The only detail of note here was that we were creating a fence from the
> recursive batch, now supported by igt_spin_t (thanks Tvrtko).
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
Too quick for me,
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH i-g-t] i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t
@ 2019-05-22 15:57 Chris Wilson
  2019-05-22 16:22 ` Matthew Auld
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2019-05-22 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

The only detail of note here was that we were creating a fence from the
recursive batch, now supported by igt_spin_t (thanks Tvrtko).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 tests/i915/gem_exec_fence.c | 74 ++++++-------------------------------
 1 file changed, 12 insertions(+), 62 deletions(-)

diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
index 8120f8b56..45017105c 100644
--- a/tests/i915/gem_exec_fence.c
+++ b/tests/i915/gem_exec_fence.c
@@ -317,68 +317,22 @@ static void test_fence_busy_all(int fd, unsigned flags)
 
 static void test_fence_await(int fd, unsigned ring, unsigned flags)
 {
-	const int gen = intel_gen(intel_get_drm_devid(fd));
-	struct drm_i915_gem_exec_object2 obj;
-	struct drm_i915_gem_relocation_entry reloc;
-	struct drm_i915_gem_execbuffer2 execbuf;
 	uint32_t scratch = gem_create(fd, 4096);
-	uint32_t *batch, *out;
+	igt_spin_t *spin;
 	unsigned engine;
-	int fence, i;
+	uint32_t *out;
+	int i;
 
 	igt_require(gem_can_store_dword(fd, 0));
 
-	memset(&execbuf, 0, sizeof(execbuf));
-	execbuf.buffers_ptr = to_user_pointer(&obj);
-	execbuf.buffer_count = 1;
-	execbuf.flags = ring | LOCAL_EXEC_FENCE_OUT;
-
-	memset(&obj, 0, sizeof(obj));
-	obj.handle = gem_create(fd, 4096);
-
-	obj.relocs_ptr = to_user_pointer(&reloc);
-	obj.relocation_count = 1;
-	memset(&reloc, 0, sizeof(reloc));
-
 	out = gem_mmap__wc(fd, scratch, 0, 4096, PROT_WRITE);
-	gem_set_domain(fd, obj.handle,
-			I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
-
-	batch = gem_mmap__wc(fd, obj.handle, 0, 4096, PROT_WRITE);
-	gem_set_domain(fd, obj.handle,
+	gem_set_domain(fd, scratch,
 			I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
 
-	reloc.target_handle = obj.handle; /* recurse */
-	reloc.presumed_offset = 0;
-	reloc.offset = sizeof(uint32_t);
-	reloc.delta = 0;
-	reloc.read_domains = I915_GEM_DOMAIN_COMMAND;
-	reloc.write_domain = 0;
-
-	i = 0;
-	batch[i] = MI_BATCH_BUFFER_START;
-	if (gen >= 8) {
-		batch[i] |= 1 << 8 | 1;
-		batch[++i] = 0;
-		batch[++i] = 0;
-	} else if (gen >= 6) {
-		batch[i] |= 1 << 8;
-		batch[++i] = 0;
-	} else {
-		batch[i] |= 2 << 6;
-		batch[++i] = 0;
-		if (gen < 4) {
-			batch[i] |= 1;
-			reloc.delta = 1;
-		}
-	}
-	i++;
-
-	execbuf.rsvd2 = -1;
-	gem_execbuf_wr(fd, &execbuf);
-	gem_close(fd, obj.handle);
-	fence = execbuf.rsvd2 >> 32;
-	igt_assert(fence != -1);
+	spin = igt_spin_new(fd,
+			    .engine = ring,
+			    .flags = IGT_SPIN_FENCE_OUT);
+	igt_assert(spin->out_fence != -1);
 
 	i = 0;
 	for_each_physical_engine(fd, engine) {
@@ -386,15 +340,14 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags)
 			continue;
 
 		if (flags & NONBLOCK) {
-			store(fd, engine, fence, scratch, i);
+			store(fd, engine, spin->out_fence, scratch, i);
 		} else {
 			igt_fork(child, 1)
-				store(fd, engine, fence, scratch, i);
+				store(fd, engine, spin->out_fence, scratch, i);
 		}
 
 		i++;
 	}
-	close(fence);
 
 	sleep(1);
 
@@ -402,11 +355,8 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags)
 	for (int n = 0; n < i; n++)
 		igt_assert_eq_u32(out[n], 0);
 
-	if ((flags & HANG) == 0) {
-		*batch = MI_BATCH_BUFFER_END;
-		__sync_synchronize();
-	}
-	munmap(batch, 4096);
+	if ((flags & HANG) == 0)
+		igt_spin_end(spin);
 
 	igt_waitchildren();
 
-- 
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] 6+ messages in thread

end of thread, other threads:[~2019-05-23 17:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 19:45 [PATCH i-g-t] i915/gem_exec_fence: Replace open-coded recursive batch with igt_spin_t Chris Wilson
2019-05-22 19:45 ` [igt-dev] " Chris Wilson
2019-05-22 20:30 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-05-23 17:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-05-22 15:57 [PATCH i-g-t] " Chris Wilson
2019-05-22 16:22 ` Matthew Auld

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.