public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] i915/gem_ctx_shared: Prebind both context images
@ 2019-09-01 15:45 Chris Wilson
  2019-09-01 16:31 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2019-09-01 15:45 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Chris Wilson

If we are using an aliasing-ppgtt, the context images are in the same
virtual address space as our target objects. We have to be careful that
cloning and using a new context does not evict our unreferenced target
object. To avoid that, we first bind both context images while creating
the hole in the address space to ensure that the hole is still available
later on.

Signed-off-by: Chris Wilson <ickle@braswell.alporthouse.com>
---
 tests/i915/gem_ctx_shared.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index b073bdfc9..c9e7b8a1a 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -191,6 +191,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 		.buffer_count = 1,
 		.flags = ring,
 	};
+	uint32_t clone;
 	uint32_t scratch, *s;
 	uint32_t batch, cs[16];
 	uint64_t offset;
@@ -199,13 +200,18 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 	gem_require_ring(i915, ring);
 	igt_require(gem_can_store_dword(i915, ring));
 
+	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+
 	/* Find a hole big enough for both objects later */
-	scratch = gem_create(i915, 16384);
+	scratch = gem_create(i915, 64<<10);
 	gem_write(i915, scratch, 0, &bbe, sizeof(bbe));
 	obj.handle = scratch;
 	gem_execbuf(i915, &execbuf);
-	gem_close(i915, scratch);
 	obj.flags |= EXEC_OBJECT_PINNED; /* reuse this address */
+	execbuf.rsvd1 = clone; /* and bind the second context image */
+	gem_execbuf(i915, &execbuf);
+	execbuf.rsvd1 = 0;
+	gem_close(i915, scratch);
 
 	scratch = gem_create(i915, 4096);
 	s = gem_mmap__wc(i915, scratch, 0, 4096, PROT_WRITE);
@@ -241,7 +247,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 
 	obj.handle = batch;
 	obj.offset += 8192; /* make sure we don't cause an eviction! */
-	execbuf.rsvd1 = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	execbuf.rsvd1 = clone;
 	if (gen > 3 && gen < 6)
 		execbuf.flags |= I915_EXEC_SECURE;
 	gem_execbuf(i915, &execbuf);
@@ -253,7 +259,6 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 	execbuf.batch_start_offset = 64 * sizeof(s[0]);
 	gem_execbuf(i915, &execbuf);
 	igt_assert_eq_u64(obj.offset, offset);
-	gem_context_destroy(i915, execbuf.rsvd1);
 
 	gem_sync(i915, batch); /* write hazard lies */
 	gem_close(i915, batch);
@@ -268,6 +273,8 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 
 	munmap(s, 4096);
 	gem_close(i915, scratch);
+
+	gem_context_destroy(i915, clone);
 }
 
 static int nop_sync(int i915, uint32_t ctx, unsigned int ring, int64_t timeout)
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_ctx_shared: Prebind both context images
  2019-09-01 15:45 [igt-dev] [PATCH i-g-t] i915/gem_ctx_shared: Prebind both context images Chris Wilson
@ 2019-09-01 16:31 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2019-09-01 16:31 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_ctx_shared: Prebind both context images
URL   : https://patchwork.freedesktop.org/series/66102/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6817 -> IGTPW_3409
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_3409 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_3409, 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/66102/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_3409:

### IGT changes ###

#### Possible regressions ####

  * igt@runner@aborted:
    - fi-cfl-8109u:       NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3409/fi-cfl-8109u/igt@runner@aborted.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_switch@legacy-render:
    - fi-bxt-dsi:         [PASS][2] -> [INCOMPLETE][3] ([fdo#103927] / [fdo#111381])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6817/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3409/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-cfl-8109u:       [PASS][4] -> [DMESG-WARN][5] ([fdo#106350])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6817/fi-cfl-8109u/igt@i915_module_load@reload-with-fault-injection.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3409/fi-cfl-8109u/igt@i915_module_load@reload-with-fault-injection.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u3:          [PASS][6] -> [FAIL][7] ([fdo#103167])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6817/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3409/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html

  
#### Possible fixes ####

  * igt@prime_vgem@basic-fence-flip:
    - fi-ilk-650:         [DMESG-WARN][8] ([fdo#106387]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6817/fi-ilk-650/igt@prime_vgem@basic-fence-flip.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3409/fi-ilk-650/igt@prime_vgem@basic-fence-flip.html

  
  {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#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#106350]: https://bugs.freedesktop.org/show_bug.cgi?id=106350
  [fdo#106387]: https://bugs.freedesktop.org/show_bug.cgi?id=106387
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381


Participating hosts (51 -> 41)
------------------------------

  Missing    (10): fi-ilk-m540 fi-bdw-5557u fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus fi-snb-2600 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5162 -> IGTPW_3409

  CI-20190529: 20190529
  CI_DRM_6817: 8ae00727917ce047fc0db5672769f70c6eaa314e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3409: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3409/
  IGT_5162: e62ea305fdba2a9cd0dadfa527b54529cb0d1438 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

end of thread, other threads:[~2019-09-01 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-01 15:45 [igt-dev] [PATCH i-g-t] i915/gem_ctx_shared: Prebind both context images Chris Wilson
2019-09-01 16:31 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox