All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2 0/1] lib/i915/gem_ring : set the engine to default context
@ 2020-02-18  8:22 Bommu Krishnaiah
  2020-02-18  8:22 ` [igt-dev] [PATCH i-g-t v2 1/1] " Bommu Krishnaiah
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bommu Krishnaiah @ 2020-02-18  8:22 UTC (permalink / raw)
  To: igt-dev; +Cc: Bommu Krishnaiah

Copy the existing engine map from default context to 
newly created  default context

v2: addressed the review comments

Bommu Krishnaiah (1):
  lib/i915/gem_ring : set the engine to default context

 lib/i915/gem_ring.c              | 8 ++++++--
 lib/i915/gem_ring.h              | 2 +-
 tests/i915/gem_busy.c            | 2 +-
 tests/i915/gem_ctx_persistence.c | 2 +-
 tests/i915/gem_eio.c             | 6 +++---
 tests/i915/gem_exec_await.c      | 2 +-
 tests/i915/gem_exec_fence.c      | 2 +-
 tests/i915/gem_exec_latency.c    | 2 +-
 tests/i915/gem_exec_schedule.c   | 6 +++---
 tests/i915/gem_ringfill.c        | 2 +-
 tests/perf_pmu.c                 | 2 +-
 11 files changed, 20 insertions(+), 16 deletions(-)

-- 
2.25.0.4.g0ad7144999

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

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

* [igt-dev] [PATCH i-g-t v2 1/1] lib/i915/gem_ring : set the engine to default context
  2020-02-18  8:22 [igt-dev] [PATCH i-g-t v2 0/1] lib/i915/gem_ring : set the engine to default context Bommu Krishnaiah
@ 2020-02-18  8:22 ` Bommu Krishnaiah
  2020-02-28 11:15   ` Tvrtko Ursulin
  2020-02-18 17:19 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_ring : set the engine to default context (rev2) Patchwork
  2020-02-20  0:57 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 1 reply; 8+ messages in thread
From: Bommu Krishnaiah @ 2020-02-18  8:22 UTC (permalink / raw)
  To: igt-dev; +Cc: Bommu Krishnaiah, Tvrtko Ursulin

Copy the existing engine map from default context to
newly created  default context

v2: addressed review comments

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/i915/gem_ring.c              | 8 ++++++--
 lib/i915/gem_ring.h              | 2 +-
 tests/i915/gem_busy.c            | 2 +-
 tests/i915/gem_ctx_persistence.c | 2 +-
 tests/i915/gem_eio.c             | 6 +++---
 tests/i915/gem_exec_await.c      | 2 +-
 tests/i915/gem_exec_fence.c      | 2 +-
 tests/i915/gem_exec_latency.c    | 2 +-
 tests/i915/gem_exec_schedule.c   | 6 +++---
 tests/i915/gem_ringfill.c        | 2 +-
 tests/perf_pmu.c                 | 2 +-
 11 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
index 99f4741c..14abfb16 100644
--- a/lib/i915/gem_ring.c
+++ b/lib/i915/gem_ring.c
@@ -143,11 +143,15 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
  * Number of batches that fit in the ring
  */
 unsigned int
-gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags)
+gem_measure_ring_inflight(int sfd, unsigned int engine, enum measure_ring_flags flags, bool copy_engine_map)
 {
 	unsigned int min = ~0u;
+	int fd;
 
-	fd = gem_reopen_driver(fd);
+	fd = gem_reopen_driver(sfd);
+
+	if (copy_engine_map)
+		gem_context_copy_engines(sfd, 0, fd, 0);
 
 	/* When available, disable execbuf throttling */
 	fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | O_NONBLOCK);
diff --git a/lib/i915/gem_ring.h b/lib/i915/gem_ring.h
index c69adce0..94b68865 100644
--- a/lib/i915/gem_ring.h
+++ b/lib/i915/gem_ring.h
@@ -31,6 +31,6 @@ enum measure_ring_flags {
 };
 
 unsigned int
-gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags);
+gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags, bool copy_engine_map);
 
 #endif /* GEM_RING_H */
diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
index 2f1b04e3..2efa84b1 100644
--- a/tests/i915/gem_busy.c
+++ b/tests/i915/gem_busy.c
@@ -309,7 +309,7 @@ static void xchg_u32(void *array, unsigned i, unsigned j)
 static void close_race(int fd)
 {
 	const unsigned int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
-	const unsigned int nhandles = gem_measure_ring_inflight(fd, ALL_ENGINES, 0) / 2;
+	const unsigned int nhandles = gem_measure_ring_inflight(fd, ALL_ENGINES, 0, false) / 2;
 	unsigned int engines[16], nengine;
 	unsigned long *control;
 	uint32_t *handles;
diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index feb8fbd0..e2481635 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -436,7 +436,7 @@ static void test_nonpersistent_file(int i915)
 
 static void test_nonpersistent_queued(int i915, unsigned int engine)
 {
-	const int count = gem_measure_ring_inflight(i915, engine, 0);
+	const int count = gem_measure_ring_inflight(i915, engine, 0, true);
 	igt_spin_t *spin;
 	int fence = -1;
 	uint32_t ctx;
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 0fe51efe..6a0cfdd5 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -449,7 +449,7 @@ static void test_inflight(int fd, unsigned int wait)
 	igt_require_gem(fd);
 	igt_require(gem_has_exec_fence(fd));
 
-	max = gem_measure_ring_inflight(fd, -1, 0);
+	max = gem_measure_ring_inflight(fd, -1, 0, false);
 	igt_require(max > 1);
 	max = min(max - 1, ARRAY_SIZE(fence));
 	igt_debug("Using %d inflight batches\n", max);
@@ -512,7 +512,7 @@ static void test_inflight_suspend(int fd)
 	igt_spin_t *hang;
 	int max;
 
-	max = gem_measure_ring_inflight(fd, -1, 0);
+	max = gem_measure_ring_inflight(fd, -1, 0, false);
 	igt_require(max > 1);
 	max = min(max - 1, ARRAY_SIZE(fence));
 	igt_debug("Using %d inflight batches\n", max);
@@ -766,7 +766,7 @@ static void reset_stress(int fd, uint32_t ctx0,
 	igt_stats_t stats;
 	int max;
 
-	max = gem_measure_ring_inflight(fd, engine, 0);
+	max = gem_measure_ring_inflight(fd, engine, 0, false);
 	max = max / 2 - 1; /* assume !execlists and a shared ring */
 	igt_require(max > 0);
 	igt_debug("Using %d inflight batches for %s\n", max, name);
diff --git a/tests/i915/gem_exec_await.c b/tests/i915/gem_exec_await.c
index 7817b483..1c1aeae1 100644
--- a/tests/i915/gem_exec_await.c
+++ b/tests/i915/gem_exec_await.c
@@ -241,7 +241,7 @@ igt_main
 		igt_require_gem(device);
 		gem_submission_print_method(device);
 
-		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0) - 10;
+		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0, false) - 10;
 		if (!gem_has_execlists(device))
 			ring_size /= 2;
 		igt_info("Ring size: %d batches\n", ring_size);
diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
index 36488ea7..b0eca26a 100644
--- a/tests/i915/gem_exec_fence.c
+++ b/tests/i915/gem_exec_fence.c
@@ -1525,7 +1525,7 @@ igt_main
 		long ring_size = 0;
 
 		igt_fixture {
-			ring_size = gem_measure_ring_inflight(i915, ALL_ENGINES, 0) - 1;
+			ring_size = gem_measure_ring_inflight(i915, ALL_ENGINES, 0, false) - 1;
 			igt_info("Ring size: %ld batches\n", ring_size);
 			igt_require(ring_size);
 
diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c
index 3d99182a..f16d603b 100644
--- a/tests/i915/gem_exec_latency.c
+++ b/tests/i915/gem_exec_latency.c
@@ -661,7 +661,7 @@ igt_main
 
 		gem_submission_print_method(device);
 
-		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0);
+		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0, false);
 		igt_info("Ring size: %d batches\n", ring_size);
 		igt_require(ring_size > 8);
 		ring_size -= 8; /* leave some spare */
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index a2098586..1dbd77e6 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1170,7 +1170,7 @@ static void deep(int fd, unsigned ring)
 		ctx[n] = gem_context_create(fd);
 	}
 
-	nreq = gem_measure_ring_inflight(fd, ring, 0) / (4 * XS) * MAX_CONTEXTS;
+	nreq = gem_measure_ring_inflight(fd, ring, 0, false) / (4 * XS) * MAX_CONTEXTS;
 	if (nreq > max_req)
 		nreq = max_req;
 	igt_info("Using %d requests (prio range %d)\n", nreq, max_req);
@@ -1316,7 +1316,7 @@ static int __execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
 static void wide(int fd, unsigned ring)
 {
 	struct timespec tv = {};
-	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX);
+	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX, false);
 
 	IGT_CORK_FENCE(cork);
 	uint32_t result;
@@ -1366,7 +1366,7 @@ static void reorder_wide(int fd, unsigned ring)
 	struct drm_i915_gem_exec_object2 obj[2];
 	struct drm_i915_gem_execbuffer2 execbuf;
 	struct timespec tv = {};
-	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX);
+	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX, false);
 	IGT_CORK_FENCE(cork);
 	uint32_t result, target;
 	uint32_t result_read[1024];
diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
index 4c73f4d9..fe4d6561 100644
--- a/tests/i915/gem_ringfill.c
+++ b/tests/i915/gem_ringfill.c
@@ -272,7 +272,7 @@ igt_main
 			master = true;
 		}
 
-		ring_size = gem_measure_ring_inflight(fd, ALL_ENGINES, 0);
+		ring_size = gem_measure_ring_inflight(fd, ALL_ENGINES, 0, false);
 		igt_info("Ring size: %d batches\n", ring_size);
 		igt_require(ring_size);
 	}
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index fe383867..75615701 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -1281,7 +1281,7 @@ static void cpu_hotplug(int gem_fd)
 
 static int target_num_interrupts(int i915)
 {
-	return min(gem_measure_ring_inflight(i915, I915_EXEC_DEFAULT, 0), 30);
+	return min(gem_measure_ring_inflight(i915, I915_EXEC_DEFAULT, 0, false), 30);
 }
 
 static void
-- 
2.25.0.4.g0ad7144999

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_ring : set the engine to default context (rev2)
  2020-02-18  8:22 [igt-dev] [PATCH i-g-t v2 0/1] lib/i915/gem_ring : set the engine to default context Bommu Krishnaiah
  2020-02-18  8:22 ` [igt-dev] [PATCH i-g-t v2 1/1] " Bommu Krishnaiah
@ 2020-02-18 17:19 ` Patchwork
  2020-02-20  0:57 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2020-02-18 17:19 UTC (permalink / raw)
  To: Bommu Krishnaiah; +Cc: igt-dev

== Series Details ==

Series: lib/i915/gem_ring : set the engine to default context (rev2)
URL   : https://patchwork.freedesktop.org/series/73514/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7960 -> IGTPW_4174
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/index.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_gtt:
    - fi-cfl-8700k:       [PASS][1] -> [TIMEOUT][2] ([fdo#112271])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/fi-cfl-8700k/igt@i915_selftest@live_gtt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/fi-cfl-8700k/igt@i915_selftest@live_gtt.html
    - fi-icl-u3:          [PASS][3] -> [TIMEOUT][4] ([fdo#112271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/fi-icl-u3/igt@i915_selftest@live_gtt.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/fi-icl-u3/igt@i915_selftest@live_gtt.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770r:       [DMESG-FAIL][5] ([i915#553] / [i915#725]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/fi-hsw-4770r/igt@i915_selftest@live_blt.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/fi-hsw-4770r/igt@i915_selftest@live_blt.html

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

  [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
  [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233
  [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725


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

  Additional (6): fi-kbl-soraka fi-hsw-peppy fi-snb-2520m fi-gdg-551 fi-cfl-8109u fi-bsw-nick 
  Missing    (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5447 -> IGTPW_4174

  CI-20190529: 20190529
  CI_DRM_7960: b86443a3c1d1b32a03f381c9198eed9243f06d18 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4174: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/index.html
  IGT_5447: 8d6b2500e44d3dc78b5eac8798f0de42f2ff9014 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib/i915/gem_ring : set the engine to default context (rev2)
  2020-02-18  8:22 [igt-dev] [PATCH i-g-t v2 0/1] lib/i915/gem_ring : set the engine to default context Bommu Krishnaiah
  2020-02-18  8:22 ` [igt-dev] [PATCH i-g-t v2 1/1] " Bommu Krishnaiah
  2020-02-18 17:19 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_ring : set the engine to default context (rev2) Patchwork
@ 2020-02-20  0:57 ` Patchwork
  2 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2020-02-20  0:57 UTC (permalink / raw)
  To: Bommu Krishnaiah; +Cc: igt-dev

== Series Details ==

Series: lib/i915/gem_ring : set the engine to default context (rev2)
URL   : https://patchwork.freedesktop.org/series/73514/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7960_full -> IGTPW_4174_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/index.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_balancer@smoke:
    - shard-iclb:         [PASS][1] -> [SKIP][2] ([fdo#110854])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb1/igt@gem_exec_balancer@smoke.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb7/igt@gem_exec_balancer@smoke.html

  * igt@gem_exec_parallel@vcs1-fds:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#112080]) +10 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb2/igt@gem_exec_parallel@vcs1-fds.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb6/igt@gem_exec_parallel@vcs1-fds.html

  * igt@gem_exec_schedule@pi-common-bsd:
    - shard-iclb:         [PASS][5] -> [SKIP][6] ([i915#677])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb8/igt@gem_exec_schedule@pi-common-bsd.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb4/igt@gem_exec_schedule@pi-common-bsd.html

  * igt@gem_exec_schedule@preempt-queue-bsd1:
    - shard-iclb:         [PASS][7] -> [SKIP][8] ([fdo#109276]) +7 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb2/igt@gem_exec_schedule@preempt-queue-bsd1.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb6/igt@gem_exec_schedule@preempt-queue-bsd1.html

  * igt@gem_exec_schedule@preemptive-hang-bsd:
    - shard-iclb:         [PASS][9] -> [SKIP][10] ([fdo#112146]) +6 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb7/igt@gem_exec_schedule@preemptive-hang-bsd.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb1/igt@gem_exec_schedule@preemptive-hang-bsd.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
    - shard-kbl:          [PASS][11] -> [FAIL][12] ([i915#644])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-kbl6/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-kbl6/igt@gem_ppgtt@flink-and-close-vma-leak.html

  * igt@gem_vm_create@isolation:
    - shard-apl:          [PASS][13] -> [FAIL][14] ([i915#314])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-apl6/igt@gem_vm_create@isolation.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-apl7/igt@gem_vm_create@isolation.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [PASS][15] -> [DMESG-WARN][16] ([i915#180]) +7 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-apl6/igt@gem_workarounds@suspend-resume-context.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-apl3/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_pm_rps@waitboost:
    - shard-iclb:         [PASS][17] -> [FAIL][18] ([i915#413])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb8/igt@i915_pm_rps@waitboost.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb6/igt@i915_pm_rps@waitboost.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu:
    - shard-tglb:         [PASS][19] -> [SKIP][20] ([i915#668])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-tglb5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-tglb3/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-kbl:          [PASS][21] -> [INCOMPLETE][22] ([fdo#103665])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-kbl7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-kbl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [PASS][23] -> [SKIP][24] ([fdo#109441]) +2 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb1/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-kbl:          [PASS][25] -> [DMESG-WARN][26] ([i915#180]) +3 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-kbl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-kbl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@perf@short-reads:
    - shard-apl:          [PASS][27] -> [TIMEOUT][28] ([fdo#112271] / [i915#51])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-apl2/igt@perf@short-reads.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-apl8/igt@perf@short-reads.html

  
#### Possible fixes ####

  * {igt@gem_ctx_persistence@close-replace-race}:
    - shard-iclb:         [FAIL][29] ([i915#1241]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb5/igt@gem_ctx_persistence@close-replace-race.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb2/igt@gem_ctx_persistence@close-replace-race.html
    - shard-glk:          [FAIL][31] ([i915#1241]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-glk9/igt@gem_ctx_persistence@close-replace-race.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-glk7/igt@gem_ctx_persistence@close-replace-race.html

  * igt@gem_exec_schedule@pi-shared-iova-bsd:
    - shard-iclb:         [SKIP][33] ([i915#677]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb1/igt@gem_exec_schedule@pi-shared-iova-bsd.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb5/igt@gem_exec_schedule@pi-shared-iova-bsd.html

  * igt@gem_exec_schedule@reorder-wide-bsd:
    - shard-iclb:         [SKIP][35] ([fdo#112146]) -> [PASS][36] +2 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb4/igt@gem_exec_schedule@reorder-wide-bsd.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb3/igt@gem_exec_schedule@reorder-wide-bsd.html

  * igt@gem_exec_suspend@basic-s3:
    - shard-kbl:          [DMESG-WARN][37] ([i915#180]) -> [PASS][38] +1 similar issue
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-kbl2/igt@gem_exec_suspend@basic-s3.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-kbl4/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_partial_pwrite_pread@writes-after-reads-snoop:
    - shard-hsw:          [FAIL][39] ([i915#694]) -> [PASS][40] +1 similar issue
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-hsw6/igt@gem_partial_pwrite_pread@writes-after-reads-snoop.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-hsw1/igt@gem_partial_pwrite_pread@writes-after-reads-snoop.html

  * igt@gem_softpin@noreloc-s3:
    - shard-iclb:         [INCOMPLETE][41] ([fdo#109100]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb3/igt@gem_softpin@noreloc-s3.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb6/igt@gem_softpin@noreloc-s3.html

  * igt@i915_pm_dc@dc5-dpms:
    - shard-iclb:         [FAIL][43] ([i915#447]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb3/igt@i915_pm_dc@dc5-dpms.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb4/igt@i915_pm_dc@dc5-dpms.html

  * igt@i915_selftest@live_gt_heartbeat:
    - shard-apl:          [DMESG-FAIL][45] ([i915#541]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-apl2/igt@i915_selftest@live_gt_heartbeat.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-apl3/igt@i915_selftest@live_gt_heartbeat.html

  * igt@i915_selftest@live_gt_lrc:
    - shard-tglb:         [INCOMPLETE][47] ([i915#1233]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-tglb6/igt@i915_selftest@live_gt_lrc.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-tglb2/igt@i915_selftest@live_gt_lrc.html

  * igt@kms_color@pipe-a-ctm-0-25:
    - shard-tglb:         [FAIL][49] ([i915#1149] / [i915#315]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-tglb1/igt@kms_color@pipe-a-ctm-0-25.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-tglb5/igt@kms_color@pipe-a-ctm-0-25.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-apl:          [DMESG-WARN][51] ([i915#180]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-apl8/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-apl2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_cursor_legacy@cursor-vs-flip-toggle:
    - shard-hsw:          [FAIL][53] ([i915#57]) -> [PASS][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-hsw8/igt@kms_cursor_legacy@cursor-vs-flip-toggle.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-hsw5/igt@kms_cursor_legacy@cursor-vs-flip-toggle.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-glk:          [FAIL][55] ([i915#79]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-glk1/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-glk3/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
    - shard-apl:          [FAIL][57] ([i915#49]) -> [PASS][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-apl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite.html
    - shard-kbl:          [FAIL][59] ([i915#49]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [SKIP][61] ([fdo#109642] / [fdo#111068]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb8/igt@kms_psr2_su@page_flip.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb2/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-iclb:         [SKIP][63] ([fdo#109441]) -> [PASS][64] +2 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb4/igt@kms_psr@psr2_primary_page_flip.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][65] ([i915#31]) -> [PASS][66]
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-apl8/igt@kms_setmode@basic.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-apl4/igt@kms_setmode@basic.html

  * igt@perf_pmu@busy-vcs1:
    - shard-iclb:         [SKIP][67] ([fdo#112080]) -> [PASS][68] +10 similar issues
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb8/igt@perf_pmu@busy-vcs1.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb1/igt@perf_pmu@busy-vcs1.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-hsw:          [INCOMPLETE][69] ([i915#1176] / [i915#61]) -> [PASS][70]
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-hsw6/igt@perf_pmu@cpu-hotplug.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-hsw2/igt@perf_pmu@cpu-hotplug.html

  * igt@prime_vgem@fence-wait-bsd2:
    - shard-iclb:         [SKIP][71] ([fdo#109276]) -> [PASS][72] +12 similar issues
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb8/igt@prime_vgem@fence-wait-bsd2.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb2/igt@prime_vgem@fence-wait-bsd2.html

  
#### Warnings ####

  * igt@gem_ctx_isolation@vcs1-nonpriv:
    - shard-iclb:         [FAIL][73] ([IGT#28]) -> [SKIP][74] ([fdo#112080])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-iclb1/igt@gem_ctx_isolation@vcs1-nonpriv.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-iclb5/igt@gem_ctx_isolation@vcs1-nonpriv.html

  * igt@gem_tiled_blits@normal:
    - shard-hsw:          [FAIL][75] ([i915#818]) -> [FAIL][76] ([i915#694])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7960/shard-hsw2/igt@gem_tiled_blits@normal.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/shard-hsw5/igt@gem_tiled_blits@normal.html

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

  [IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
  [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
  [i915#1149]: https://gitlab.freedesktop.org/drm/intel/issues/1149
  [i915#1176]: https://gitlab.freedesktop.org/drm/intel/issues/1176
  [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233
  [i915#1241]: https://gitlab.freedesktop.org/drm/intel/issues/1241
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#314]: https://gitlab.freedesktop.org/drm/intel/issues/314
  [i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
  [i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
  [i915#447]: https://gitlab.freedesktop.org/drm/intel/issues/447
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#51]: https://gitlab.freedesktop.org/drm/intel/issues/51
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
  [i915#57]: https://gitlab.freedesktop.org/drm/intel/issues/57
  [i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
  [i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
  [i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668
  [i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
  [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818


Participating hosts (10 -> 8)
------------------------------

  Missing    (2): pig-skl-6260u pig-glk-j5005 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5447 -> IGTPW_4174
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_7960: b86443a3c1d1b32a03f381c9198eed9243f06d18 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4174: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4174/index.html
  IGT_5447: 8d6b2500e44d3dc78b5eac8798f0de42f2ff9014 @ 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_4174/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 1/1] lib/i915/gem_ring : set the engine to default context
  2020-02-18  8:22 ` [igt-dev] [PATCH i-g-t v2 1/1] " Bommu Krishnaiah
@ 2020-02-28 11:15   ` Tvrtko Ursulin
  2020-02-28 13:41     ` Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Tvrtko Ursulin @ 2020-02-28 11:15 UTC (permalink / raw)
  To: Bommu Krishnaiah, igt-dev; +Cc: Tvrtko Ursulin


On 18/02/2020 08:22, Bommu Krishnaiah wrote:
> Copy the existing engine map from default context to
> newly created  default context
> 
> v2: addressed review comments
> 
> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   lib/i915/gem_ring.c              | 8 ++++++--
>   lib/i915/gem_ring.h              | 2 +-
>   tests/i915/gem_busy.c            | 2 +-
>   tests/i915/gem_ctx_persistence.c | 2 +-
>   tests/i915/gem_eio.c             | 6 +++---
>   tests/i915/gem_exec_await.c      | 2 +-
>   tests/i915/gem_exec_fence.c      | 2 +-
>   tests/i915/gem_exec_latency.c    | 2 +-
>   tests/i915/gem_exec_schedule.c   | 6 +++---
>   tests/i915/gem_ringfill.c        | 2 +-
>   tests/perf_pmu.c                 | 2 +-
>   11 files changed, 20 insertions(+), 16 deletions(-)
> 
> diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
> index 99f4741c..14abfb16 100644
> --- a/lib/i915/gem_ring.c
> +++ b/lib/i915/gem_ring.c
> @@ -143,11 +143,15 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
>    * Number of batches that fit in the ring
>    */
>   unsigned int
> -gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags)
> +gem_measure_ring_inflight(int sfd, unsigned int engine, enum measure_ring_flags flags, bool copy_engine_map)
>   {
>   	unsigned int min = ~0u;
> +	int fd;
>   
> -	fd = gem_reopen_driver(fd);
> +	fd = gem_reopen_driver(sfd);
> +
> +	if (copy_engine_map)
> +		gem_context_copy_engines(sfd, 0, fd, 0);

Would querying the context for presence of engine map be too hacky? It 
would avoid having to change the prototype etc. I guess it would be 
hacky since it could incorrectly imply from which kind of context 
'engine' comes.

Perhaps proper fix it to pass in fd/ctx tuple in here and then decide 
locally. That sounds better to me than the bool. Chris, your opinion?

Regards,

Tvrtko

>   
>   	/* When available, disable execbuf throttling */
>   	fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | O_NONBLOCK);
> diff --git a/lib/i915/gem_ring.h b/lib/i915/gem_ring.h
> index c69adce0..94b68865 100644
> --- a/lib/i915/gem_ring.h
> +++ b/lib/i915/gem_ring.h
> @@ -31,6 +31,6 @@ enum measure_ring_flags {
>   };
>   
>   unsigned int
> -gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags);
> +gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags, bool copy_engine_map);
>   
>   #endif /* GEM_RING_H */
> diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
> index 2f1b04e3..2efa84b1 100644
> --- a/tests/i915/gem_busy.c
> +++ b/tests/i915/gem_busy.c
> @@ -309,7 +309,7 @@ static void xchg_u32(void *array, unsigned i, unsigned j)
>   static void close_race(int fd)
>   {
>   	const unsigned int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
> -	const unsigned int nhandles = gem_measure_ring_inflight(fd, ALL_ENGINES, 0) / 2;
> +	const unsigned int nhandles = gem_measure_ring_inflight(fd, ALL_ENGINES, 0, false) / 2;
>   	unsigned int engines[16], nengine;
>   	unsigned long *control;
>   	uint32_t *handles;
> diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
> index feb8fbd0..e2481635 100644
> --- a/tests/i915/gem_ctx_persistence.c
> +++ b/tests/i915/gem_ctx_persistence.c
> @@ -436,7 +436,7 @@ static void test_nonpersistent_file(int i915)
>   
>   static void test_nonpersistent_queued(int i915, unsigned int engine)
>   {
> -	const int count = gem_measure_ring_inflight(i915, engine, 0);
> +	const int count = gem_measure_ring_inflight(i915, engine, 0, true);
>   	igt_spin_t *spin;
>   	int fence = -1;
>   	uint32_t ctx;
> diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
> index 0fe51efe..6a0cfdd5 100644
> --- a/tests/i915/gem_eio.c
> +++ b/tests/i915/gem_eio.c
> @@ -449,7 +449,7 @@ static void test_inflight(int fd, unsigned int wait)
>   	igt_require_gem(fd);
>   	igt_require(gem_has_exec_fence(fd));
>   
> -	max = gem_measure_ring_inflight(fd, -1, 0);
> +	max = gem_measure_ring_inflight(fd, -1, 0, false);
>   	igt_require(max > 1);
>   	max = min(max - 1, ARRAY_SIZE(fence));
>   	igt_debug("Using %d inflight batches\n", max);
> @@ -512,7 +512,7 @@ static void test_inflight_suspend(int fd)
>   	igt_spin_t *hang;
>   	int max;
>   
> -	max = gem_measure_ring_inflight(fd, -1, 0);
> +	max = gem_measure_ring_inflight(fd, -1, 0, false);
>   	igt_require(max > 1);
>   	max = min(max - 1, ARRAY_SIZE(fence));
>   	igt_debug("Using %d inflight batches\n", max);
> @@ -766,7 +766,7 @@ static void reset_stress(int fd, uint32_t ctx0,
>   	igt_stats_t stats;
>   	int max;
>   
> -	max = gem_measure_ring_inflight(fd, engine, 0);
> +	max = gem_measure_ring_inflight(fd, engine, 0, false);
>   	max = max / 2 - 1; /* assume !execlists and a shared ring */
>   	igt_require(max > 0);
>   	igt_debug("Using %d inflight batches for %s\n", max, name);
> diff --git a/tests/i915/gem_exec_await.c b/tests/i915/gem_exec_await.c
> index 7817b483..1c1aeae1 100644
> --- a/tests/i915/gem_exec_await.c
> +++ b/tests/i915/gem_exec_await.c
> @@ -241,7 +241,7 @@ igt_main
>   		igt_require_gem(device);
>   		gem_submission_print_method(device);
>   
> -		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0) - 10;
> +		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0, false) - 10;
>   		if (!gem_has_execlists(device))
>   			ring_size /= 2;
>   		igt_info("Ring size: %d batches\n", ring_size);
> diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
> index 36488ea7..b0eca26a 100644
> --- a/tests/i915/gem_exec_fence.c
> +++ b/tests/i915/gem_exec_fence.c
> @@ -1525,7 +1525,7 @@ igt_main
>   		long ring_size = 0;
>   
>   		igt_fixture {
> -			ring_size = gem_measure_ring_inflight(i915, ALL_ENGINES, 0) - 1;
> +			ring_size = gem_measure_ring_inflight(i915, ALL_ENGINES, 0, false) - 1;
>   			igt_info("Ring size: %ld batches\n", ring_size);
>   			igt_require(ring_size);
>   
> diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c
> index 3d99182a..f16d603b 100644
> --- a/tests/i915/gem_exec_latency.c
> +++ b/tests/i915/gem_exec_latency.c
> @@ -661,7 +661,7 @@ igt_main
>   
>   		gem_submission_print_method(device);
>   
> -		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0);
> +		ring_size = gem_measure_ring_inflight(device, ALL_ENGINES, 0, false);
>   		igt_info("Ring size: %d batches\n", ring_size);
>   		igt_require(ring_size > 8);
>   		ring_size -= 8; /* leave some spare */
> diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> index a2098586..1dbd77e6 100644
> --- a/tests/i915/gem_exec_schedule.c
> +++ b/tests/i915/gem_exec_schedule.c
> @@ -1170,7 +1170,7 @@ static void deep(int fd, unsigned ring)
>   		ctx[n] = gem_context_create(fd);
>   	}
>   
> -	nreq = gem_measure_ring_inflight(fd, ring, 0) / (4 * XS) * MAX_CONTEXTS;
> +	nreq = gem_measure_ring_inflight(fd, ring, 0, false) / (4 * XS) * MAX_CONTEXTS;
>   	if (nreq > max_req)
>   		nreq = max_req;
>   	igt_info("Using %d requests (prio range %d)\n", nreq, max_req);
> @@ -1316,7 +1316,7 @@ static int __execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
>   static void wide(int fd, unsigned ring)
>   {
>   	struct timespec tv = {};
> -	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX);
> +	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX, false);
>   
>   	IGT_CORK_FENCE(cork);
>   	uint32_t result;
> @@ -1366,7 +1366,7 @@ static void reorder_wide(int fd, unsigned ring)
>   	struct drm_i915_gem_exec_object2 obj[2];
>   	struct drm_i915_gem_execbuffer2 execbuf;
>   	struct timespec tv = {};
> -	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX);
> +	unsigned int ring_size = gem_measure_ring_inflight(fd, ring, MEASURE_RING_NEW_CTX, false);
>   	IGT_CORK_FENCE(cork);
>   	uint32_t result, target;
>   	uint32_t result_read[1024];
> diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
> index 4c73f4d9..fe4d6561 100644
> --- a/tests/i915/gem_ringfill.c
> +++ b/tests/i915/gem_ringfill.c
> @@ -272,7 +272,7 @@ igt_main
>   			master = true;
>   		}
>   
> -		ring_size = gem_measure_ring_inflight(fd, ALL_ENGINES, 0);
> +		ring_size = gem_measure_ring_inflight(fd, ALL_ENGINES, 0, false);
>   		igt_info("Ring size: %d batches\n", ring_size);
>   		igt_require(ring_size);
>   	}
> diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
> index fe383867..75615701 100644
> --- a/tests/perf_pmu.c
> +++ b/tests/perf_pmu.c
> @@ -1281,7 +1281,7 @@ static void cpu_hotplug(int gem_fd)
>   
>   static int target_num_interrupts(int i915)
>   {
> -	return min(gem_measure_ring_inflight(i915, I915_EXEC_DEFAULT, 0), 30);
> +	return min(gem_measure_ring_inflight(i915, I915_EXEC_DEFAULT, 0, false), 30);
>   }
>   
>   static void
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 1/1] lib/i915/gem_ring : set the engine to default context
  2020-02-28 11:15   ` Tvrtko Ursulin
@ 2020-02-28 13:41     ` Chris Wilson
  2020-02-28 14:23       ` Tvrtko Ursulin
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2020-02-28 13:41 UTC (permalink / raw)
  To: Bommu Krishnaiah, Tvrtko Ursulin, igt-dev; +Cc: Tvrtko Ursulin

Quoting Tvrtko Ursulin (2020-02-28 11:15:14)
> 
> On 18/02/2020 08:22, Bommu Krishnaiah wrote:
> > Copy the existing engine map from default context to
> > newly created  default context
> > 
> > v2: addressed review comments
> > 
> > Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >   lib/i915/gem_ring.c              | 8 ++++++--
> >   lib/i915/gem_ring.h              | 2 +-
> >   tests/i915/gem_busy.c            | 2 +-
> >   tests/i915/gem_ctx_persistence.c | 2 +-
> >   tests/i915/gem_eio.c             | 6 +++---
> >   tests/i915/gem_exec_await.c      | 2 +-
> >   tests/i915/gem_exec_fence.c      | 2 +-
> >   tests/i915/gem_exec_latency.c    | 2 +-
> >   tests/i915/gem_exec_schedule.c   | 6 +++---
> >   tests/i915/gem_ringfill.c        | 2 +-
> >   tests/perf_pmu.c                 | 2 +-
> >   11 files changed, 20 insertions(+), 16 deletions(-)
> > 
> > diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
> > index 99f4741c..14abfb16 100644
> > --- a/lib/i915/gem_ring.c
> > +++ b/lib/i915/gem_ring.c
> > @@ -143,11 +143,15 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
> >    * Number of batches that fit in the ring
> >    */
> >   unsigned int
> > -gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags)
> > +gem_measure_ring_inflight(int sfd, unsigned int engine, enum measure_ring_flags flags, bool copy_engine_map)
> >   {
> >       unsigned int min = ~0u;
> > +     int fd;
> >   
> > -     fd = gem_reopen_driver(fd);
> > +     fd = gem_reopen_driver(sfd);
> > +
> > +     if (copy_engine_map)
> > +             gem_context_copy_engines(sfd, 0, fd, 0);
> 
> Would querying the context for presence of engine map be too hacky? It 
> would avoid having to change the prototype etc. I guess it would be 
> hacky since it could incorrectly imply from which kind of context 
> 'engine' comes.
> 
> Perhaps proper fix it to pass in fd/ctx tuple in here and then decide 
> locally. That sounds better to me than the bool. Chris, your opinion?

I was just planning on adding USE_ENGINE to flags.

The reason we had to add gem_reopen_driver() here was someone converted
some tests to __for_each_physical_engine but later on in the same test
we used gem_measure_ring_inflight with a legacy ring. So I was wary of
that breaking again, and thought the exercise of making the USE_ENGINE
explicit would be useful review of the callers.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v2 1/1] lib/i915/gem_ring : set the engine to default context
  2020-02-28 13:41     ` Chris Wilson
@ 2020-02-28 14:23       ` Tvrtko Ursulin
  2020-02-28 14:33         ` Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Tvrtko Ursulin @ 2020-02-28 14:23 UTC (permalink / raw)
  To: Chris Wilson, Bommu Krishnaiah, igt-dev; +Cc: Tvrtko Ursulin


On 28/02/2020 13:41, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2020-02-28 11:15:14)
>>
>> On 18/02/2020 08:22, Bommu Krishnaiah wrote:
>>> Copy the existing engine map from default context to
>>> newly created  default context
>>>
>>> v2: addressed review comments
>>>
>>> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> ---
>>>    lib/i915/gem_ring.c              | 8 ++++++--
>>>    lib/i915/gem_ring.h              | 2 +-
>>>    tests/i915/gem_busy.c            | 2 +-
>>>    tests/i915/gem_ctx_persistence.c | 2 +-
>>>    tests/i915/gem_eio.c             | 6 +++---
>>>    tests/i915/gem_exec_await.c      | 2 +-
>>>    tests/i915/gem_exec_fence.c      | 2 +-
>>>    tests/i915/gem_exec_latency.c    | 2 +-
>>>    tests/i915/gem_exec_schedule.c   | 6 +++---
>>>    tests/i915/gem_ringfill.c        | 2 +-
>>>    tests/perf_pmu.c                 | 2 +-
>>>    11 files changed, 20 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
>>> index 99f4741c..14abfb16 100644
>>> --- a/lib/i915/gem_ring.c
>>> +++ b/lib/i915/gem_ring.c
>>> @@ -143,11 +143,15 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
>>>     * Number of batches that fit in the ring
>>>     */
>>>    unsigned int
>>> -gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags)
>>> +gem_measure_ring_inflight(int sfd, unsigned int engine, enum measure_ring_flags flags, bool copy_engine_map)
>>>    {
>>>        unsigned int min = ~0u;
>>> +     int fd;
>>>    
>>> -     fd = gem_reopen_driver(fd);
>>> +     fd = gem_reopen_driver(sfd);
>>> +
>>> +     if (copy_engine_map)
>>> +             gem_context_copy_engines(sfd, 0, fd, 0);
>>
>> Would querying the context for presence of engine map be too hacky? It
>> would avoid having to change the prototype etc. I guess it would be
>> hacky since it could incorrectly imply from which kind of context
>> 'engine' comes.
>>
>> Perhaps proper fix it to pass in fd/ctx tuple in here and then decide
>> locally. That sounds better to me than the bool. Chris, your opinion?
> 
> I was just planning on adding USE_ENGINE to flags.
> 
> The reason we had to add gem_reopen_driver() here was someone converted
> some tests to __for_each_physical_engine but later on in the same test
> we used gem_measure_ring_inflight with a legacy ring. So I was wary of
> that breaking again, and thought the exercise of making the USE_ENGINE
> explicit would be useful review of the callers.

What would be the meaning of USE_ENGINE, I don't follow.

I agree there is some attractiveness in marking the callers and so 
making the "kind" of 'engine' explicit (and audited), however that 
process in general is also very tedious and error prone.

Ctx+engine tuplet sounds more robust. If ctx has engine map we copy it 
after re-opening the driver.

Or you want to drop re-opening? Then I don't see what a new flag could do.

Regards,

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

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

* Re: [igt-dev] [PATCH i-g-t v2 1/1] lib/i915/gem_ring : set the engine to default context
  2020-02-28 14:23       ` Tvrtko Ursulin
@ 2020-02-28 14:33         ` Chris Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2020-02-28 14:33 UTC (permalink / raw)
  To: Bommu Krishnaiah, Tvrtko Ursulin, igt-dev; +Cc: Tvrtko Ursulin

Quoting Tvrtko Ursulin (2020-02-28 14:23:46)
> 
> On 28/02/2020 13:41, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2020-02-28 11:15:14)
> >>
> >> On 18/02/2020 08:22, Bommu Krishnaiah wrote:
> >>> Copy the existing engine map from default context to
> >>> newly created  default context
> >>>
> >>> v2: addressed review comments
> >>>
> >>> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
> >>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> >>> ---
> >>>    lib/i915/gem_ring.c              | 8 ++++++--
> >>>    lib/i915/gem_ring.h              | 2 +-
> >>>    tests/i915/gem_busy.c            | 2 +-
> >>>    tests/i915/gem_ctx_persistence.c | 2 +-
> >>>    tests/i915/gem_eio.c             | 6 +++---
> >>>    tests/i915/gem_exec_await.c      | 2 +-
> >>>    tests/i915/gem_exec_fence.c      | 2 +-
> >>>    tests/i915/gem_exec_latency.c    | 2 +-
> >>>    tests/i915/gem_exec_schedule.c   | 6 +++---
> >>>    tests/i915/gem_ringfill.c        | 2 +-
> >>>    tests/perf_pmu.c                 | 2 +-
> >>>    11 files changed, 20 insertions(+), 16 deletions(-)
> >>>
> >>> diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
> >>> index 99f4741c..14abfb16 100644
> >>> --- a/lib/i915/gem_ring.c
> >>> +++ b/lib/i915/gem_ring.c
> >>> @@ -143,11 +143,15 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
> >>>     * Number of batches that fit in the ring
> >>>     */
> >>>    unsigned int
> >>> -gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags)
> >>> +gem_measure_ring_inflight(int sfd, unsigned int engine, enum measure_ring_flags flags, bool copy_engine_map)
> >>>    {
> >>>        unsigned int min = ~0u;
> >>> +     int fd;
> >>>    
> >>> -     fd = gem_reopen_driver(fd);
> >>> +     fd = gem_reopen_driver(sfd);
> >>> +
> >>> +     if (copy_engine_map)
> >>> +             gem_context_copy_engines(sfd, 0, fd, 0);
> >>
> >> Would querying the context for presence of engine map be too hacky? It
> >> would avoid having to change the prototype etc. I guess it would be
> >> hacky since it could incorrectly imply from which kind of context
> >> 'engine' comes.
> >>
> >> Perhaps proper fix it to pass in fd/ctx tuple in here and then decide
> >> locally. That sounds better to me than the bool. Chris, your opinion?
> > 
> > I was just planning on adding USE_ENGINE to flags.
> > 
> > The reason we had to add gem_reopen_driver() here was someone converted
> > some tests to __for_each_physical_engine but later on in the same test
> > we used gem_measure_ring_inflight with a legacy ring. So I was wary of
> > that breaking again, and thought the exercise of making the USE_ENGINE
> > explicit would be useful review of the callers.
> 
> What would be the meaning of USE_ENGINE, I don't follow.

Currently engine means ring so USE_ENGINE would make engine mean
engine. :)

> I agree there is some attractiveness in marking the callers and so 
> making the "kind" of 'engine' explicit (and audited), however that 
> process in general is also very tedious and error prone.
> 
> Ctx+engine tuplet sounds more robust. If ctx has engine map we copy it 
> after re-opening the driver.
> 
> Or you want to drop re-opening? Then I don't see what a new flag could do.

I did think we could drop the re-open, but reopen is nice to get around
any prior state on the old fd affecting the measurement. So keep it.

What I think would be useful for future API is to use
intel_execution_engine2 (someone come up with a better name please!) as
our primary designator for physical engines. Then this would be

i915 = gem_reopen_driver(i915);
gem_context_set_engine(i915, 0, e->class, e->instance);

And we would always use eb.flags=0 for the measurement.

That way there's less ambiguity and we always have enough to create a
new ctx->engines[] map if desired.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-02-28 14:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18  8:22 [igt-dev] [PATCH i-g-t v2 0/1] lib/i915/gem_ring : set the engine to default context Bommu Krishnaiah
2020-02-18  8:22 ` [igt-dev] [PATCH i-g-t v2 1/1] " Bommu Krishnaiah
2020-02-28 11:15   ` Tvrtko Ursulin
2020-02-28 13:41     ` Chris Wilson
2020-02-28 14:23       ` Tvrtko Ursulin
2020-02-28 14:33         ` Chris Wilson
2020-02-18 17:19 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/gem_ring : set the engine to default context (rev2) Patchwork
2020-02-20  0:57 ` [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.