All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8
@ 2019-03-29 13:40 Chris Wilson
  2019-03-29 13:56 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Chris Wilson @ 2019-03-29 13:40 UTC (permalink / raw)
  To: intel-gfx

When we introduced preemption, we chose to keep it disabled for gen8 as
supporting preemption inside GPGPU user batches required various w/a in
userspace. Since then, the desire to preempt long queues of requests
between batches (e.g. within busywaiting semaphores) has grown. So allow
arbitration within the busywaits and between requests, but disable
arbitration within user batches so that we can preempt between requests
and not risk breaking GPGPU.

However, since this preemption is much coarser and doesn't interfere
with userspace, we decline to include it amongst the scheduler
capabilities. (This is also required for us to skip over the preemption
selftests that expect to be able to preempt user batches.)

Testcase: igt/gem_exec_scheduler/semaphore-user
References: beecec901790 ("drm/i915/execlists: Preemption!")
Fixes: e88619646971 ("drm/i915: Use HW semaphores for inter-engine synchronisation on gen8+")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_context.c    |   2 +-
 drivers/gpu/drm/i915/intel_lrc.c           |  49 ++++--
 drivers/gpu/drm/i915/selftests/intel_lrc.c | 180 +++++++++++++++++++++
 3 files changed, 217 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 662da485e15f..92993db38aad 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -562,7 +562,7 @@ static void init_contexts(struct drm_i915_private *i915)
 
 static bool needs_preempt_context(struct drm_i915_private *i915)
 {
-	return HAS_LOGICAL_RING_PREEMPTION(i915);
+	return HAS_EXECLISTS(i915);
 }
 
 int i915_gem_contexts_init(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index bec232acc8d7..b380688a0c1c 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -233,7 +233,7 @@ static inline bool need_preempt(const struct intel_engine_cs *engine,
 {
 	int last_prio;
 
-	if (!intel_engine_has_preemption(engine))
+	if (!engine->preempt_context)
 		return false;
 
 	if (i915_request_completed(rq))
@@ -2035,7 +2035,7 @@ static int gen8_emit_bb_start(struct i915_request *rq,
 {
 	u32 *cs;
 
-	cs = intel_ring_begin(rq, 6);
+	cs = intel_ring_begin(rq, 4);
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
 
@@ -2046,16 +2046,35 @@ static int gen8_emit_bb_start(struct i915_request *rq,
 	 * particular all the gen that do not need the w/a at all!), if we
 	 * took care to make sure that on every switch into this context
 	 * (both ordinary and for preemption) that arbitrartion was enabled
-	 * we would be fine. However, there doesn't seem to be a downside to
-	 * being paranoid and making sure it is set before each batch and
-	 * every context-switch.
-	 *
-	 * Note that if we fail to enable arbitration before the request
-	 * is complete, then we do not see the context-switch interrupt and
-	 * the engine hangs (with RING_HEAD == RING_TAIL).
-	 *
-	 * That satisfies both the GPGPU w/a and our heavy-handed paranoia.
+	 * we would be fine.  However, for gen8 there is another w/a that
+	 * requires us to not preempt inside GPGPU execution, so we keep
+	 * arbitration disabled for gen8 batches. Arbitration will be
+	 * re-enabled before we close the request
+	 * (engine->emit_fini_breadcrumb).
 	 */
+	*cs++ = MI_ARB_ON_OFF | MI_ARB_DISABLE;
+
+	/* FIXME(BDW): Address space and security selectors. */
+	*cs++ = MI_BATCH_BUFFER_START_GEN8 |
+		(flags & I915_DISPATCH_SECURE ? 0 : BIT(8));
+	*cs++ = lower_32_bits(offset);
+	*cs++ = upper_32_bits(offset);
+
+	intel_ring_advance(rq, cs);
+
+	return 0;
+}
+
+static int gen9_emit_bb_start(struct i915_request *rq,
+			      u64 offset, u32 len,
+			      const unsigned int flags)
+{
+	u32 *cs;
+
+	cs = intel_ring_begin(rq, 6);
+	if (IS_ERR(cs))
+		return PTR_ERR(cs);
+
 	*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
 
 	/* FIXME(BDW): Address space and security selectors. */
@@ -2316,7 +2335,8 @@ void intel_execlists_set_default_submission(struct intel_engine_cs *engine)
 	engine->flags |= I915_ENGINE_SUPPORTS_STATS;
 	if (!intel_vgpu_active(engine->i915))
 		engine->flags |= I915_ENGINE_HAS_SEMAPHORES;
-	if (engine->preempt_context)
+	if (engine->preempt_context &&
+	    HAS_LOGICAL_RING_PREEMPTION(engine->i915))
 		engine->flags |= I915_ENGINE_HAS_PREEMPTION;
 }
 
@@ -2350,7 +2370,10 @@ logical_ring_default_vfuncs(struct intel_engine_cs *engine)
 		 * until a more refined solution exists.
 		 */
 	}
-	engine->emit_bb_start = gen8_emit_bb_start;
+	if (IS_GEN(engine->i915, 8))
+		engine->emit_bb_start = gen8_emit_bb_start;
+	else
+		engine->emit_bb_start = gen9_emit_bb_start;
 }
 
 static inline void
diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/selftests/intel_lrc.c
index 0d3cae564db8..8bcd4e1d58ee 100644
--- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
+++ b/drivers/gpu/drm/i915/selftests/intel_lrc.c
@@ -76,6 +76,185 @@ static int live_sanitycheck(void *arg)
 	return err;
 }
 
+static int live_busywait_preempt(void *arg)
+{
+	struct drm_i915_private *i915 = arg;
+	struct i915_gem_context *ctx_hi, *ctx_lo;
+	struct intel_engine_cs *engine;
+	struct drm_i915_gem_object *obj;
+	struct i915_vma *vma;
+	enum intel_engine_id id;
+	intel_wakeref_t wakeref;
+	int err = -ENOMEM;
+	u32 *map;
+
+	/*
+	 * Verify that even without HAS_LOGICAL_RING_PREEMPTION, we can
+	 * preempt the busywaits used to synchronise between rings.
+	 */
+
+	mutex_lock(&i915->drm.struct_mutex);
+	wakeref = intel_runtime_pm_get(i915);
+
+	ctx_hi = kernel_context(i915);
+	if (!ctx_hi)
+		goto err_unlock;
+	ctx_hi->sched.priority = INT_MAX;
+
+	ctx_lo = kernel_context(i915);
+	if (!ctx_lo)
+		goto err_ctx_hi;
+	ctx_lo->sched.priority = INT_MIN;
+
+	obj = i915_gem_object_create_internal(i915, PAGE_SIZE);
+	if (IS_ERR(obj)) {
+		err = PTR_ERR(obj);
+		goto err_ctx_lo;
+	}
+
+	map = i915_gem_object_pin_map(obj, I915_MAP_WC);
+	if (IS_ERR(map)) {
+		err = PTR_ERR(map);
+		goto err_obj;
+	}
+
+	vma = i915_vma_instance(obj, &i915->ggtt.vm, 0);
+	if (IS_ERR(vma)) {
+		err = PTR_ERR(vma);
+		goto err_map;
+	}
+
+	err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL);
+	if (err)
+		goto err_map;
+
+	for_each_engine(engine, i915, id) {
+		struct i915_request *lo, *hi;
+		struct igt_live_test t;
+		u32 *cs;
+
+		if (!intel_engine_can_store_dword(engine))
+			continue;
+
+		if (igt_live_test_begin(&t, i915, __func__, engine->name)) {
+			err = -EIO;
+			goto err_vma;
+		}
+
+		/*
+		 * We create two requests. The low priority request
+		 * busywaits on a semaphore (inside the ringbuffer where
+		 * is should be preemptible) and the high priority requests
+		 * uses a MI_STORE_DWORD_IMM to update the semaphore value
+		 * allowing the first request to complete. If preemption
+		 * fails, we hang instead.
+		 */
+
+		lo = i915_request_alloc(engine, ctx_lo);
+		if (IS_ERR(lo)) {
+			err = PTR_ERR(lo);
+			goto err_vma;
+		}
+
+		cs = intel_ring_begin(lo, 8);
+		if (IS_ERR(cs)) {
+			err = PTR_ERR(cs);
+			i915_request_add(lo);
+			goto err_vma;
+		}
+
+		*cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
+		*cs++ = i915_ggtt_offset(vma);
+		*cs++ = 0;
+		*cs++ = 1;
+
+		/* XXX Do we need a flush + invalidate here? */
+
+		*cs++ = MI_SEMAPHORE_WAIT |
+			MI_SEMAPHORE_GLOBAL_GTT |
+			MI_SEMAPHORE_POLL |
+			MI_SEMAPHORE_SAD_EQ_SDD;
+		*cs++ = 0;
+		*cs++ = i915_ggtt_offset(vma);
+		*cs++ = 0;
+
+		intel_ring_advance(lo, cs);
+		i915_request_add(lo);
+
+		if (wait_for(READ_ONCE(*map), 10)) {
+			err = -ETIMEDOUT;
+			goto err_vma;
+		}
+
+		/* Low priority request should be busywaiting now */
+		if (i915_request_wait(lo, I915_WAIT_LOCKED, 1) != -ETIME) {
+			pr_err("%s: Busywaiting request did not!\n",
+			       engine->name);
+			err = -EIO;
+			goto err_vma;
+		}
+
+		hi = i915_request_alloc(engine, ctx_hi);
+		if (IS_ERR(hi)) {
+			err = PTR_ERR(hi);
+			goto err_vma;
+		}
+
+		cs = intel_ring_begin(hi, 4);
+		if (IS_ERR(cs)) {
+			err = PTR_ERR(cs);
+			i915_request_add(hi);
+			goto err_vma;
+		}
+
+		*cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
+		*cs++ = i915_ggtt_offset(vma);
+		*cs++ = 0;
+		*cs++ = 0;
+
+		intel_ring_advance(hi, cs);
+		i915_request_add(hi);
+
+		if (i915_request_wait(lo, I915_WAIT_LOCKED, HZ / 5) < 0) {
+			struct drm_printer p = drm_info_printer(i915->drm.dev);
+
+			pr_err("%s: Failed to preempt semaphore busywait!\n",
+			       engine->name);
+
+			intel_engine_dump(engine, &p, "%s\n", engine->name);
+			GEM_TRACE_DUMP();
+
+			i915_gem_set_wedged(i915);
+			err = -EIO;
+			goto err_vma;
+		}
+		GEM_BUG_ON(READ_ONCE(*map));
+
+		if (igt_live_test_end(&t)) {
+			err = -EIO;
+			goto err_vma;
+		}
+	}
+
+	err = 0;
+err_vma:
+	i915_vma_unpin(vma);
+err_map:
+	i915_gem_object_unpin_map(obj);
+err_obj:
+	i915_gem_object_put(obj);
+err_ctx_lo:
+	kernel_context_close(ctx_lo);
+err_ctx_hi:
+	kernel_context_close(ctx_hi);
+err_unlock:
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
+	intel_runtime_pm_put(i915, wakeref);
+	mutex_unlock(&i915->drm.struct_mutex);
+	return err;
+}
+
 static int live_preempt(void *arg)
 {
 	struct drm_i915_private *i915 = arg;
@@ -1127,6 +1306,7 @@ int intel_execlists_live_selftests(struct drm_i915_private *i915)
 {
 	static const struct i915_subtest tests[] = {
 		SUBTEST(live_sanitycheck),
+		SUBTEST(live_busywait_preempt),
 		SUBTEST(live_preempt),
 		SUBTEST(live_late_preempt),
 		SUBTEST(live_suppress_self_preempt),
-- 
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] 9+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-03-29 13:40 [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8 Chris Wilson
@ 2019-03-29 13:56 ` Patchwork
  2019-03-29 13:56 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-03-29 13:56 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/execlists: Enable coarse preemption boundaries for gen8
URL   : https://patchwork.freedesktop.org/series/58738/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
678a3d72d2b3 drm/i915/execlists: Enable coarse preemption boundaries for gen8
-:21: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit beecec901790 ("drm/i915/execlists: Preemption!")'
#21: 
References: beecec901790 ("drm/i915/execlists: Preemption!")

total: 1 errors, 0 warnings, 0 checks, 280 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.SPARSE: warning for drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-03-29 13:40 [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8 Chris Wilson
  2019-03-29 13:56 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2019-03-29 13:56 ` Patchwork
  2019-03-29 14:16 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-03-29 13:56 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/execlists: Enable coarse preemption boundaries for gen8
URL   : https://patchwork.freedesktop.org/series/58738/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915/execlists: Enable coarse preemption boundaries for gen8
+drivers/gpu/drm/i915/selftests/intel_lrc.c:121:54: warning: Using plain integer as NULL pointer

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-03-29 13:40 [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8 Chris Wilson
  2019-03-29 13:56 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2019-03-29 13:56 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2019-03-29 14:16 ` Patchwork
  2019-03-29 14:20   ` Chris Wilson
  2019-03-29 17:15 ` ✗ Fi.CI.IGT: failure " Patchwork
  2019-04-05  9:46 ` [PATCH] " Tvrtko Ursulin
  4 siblings, 1 reply; 9+ messages in thread
From: Patchwork @ 2019-03-29 14:16 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/execlists: Enable coarse preemption boundaries for gen8
URL   : https://patchwork.freedesktop.org/series/58738/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5837 -> Patchwork_12629
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@cs-compute:
    - fi-kbl-8809g:       NOTRUN -> FAIL [fdo#108094]

  * igt@gem_exec_store@basic-bsd1:
    - fi-kbl-r:           NOTRUN -> SKIP [fdo#109271] +41

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      PASS -> DMESG-FAIL [fdo#110235 ]

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]

  * igt@kms_chamelium@vga-edid-read:
    - fi-hsw-4770r:       NOTRUN -> SKIP [fdo#109271] +45

  * igt@runner@aborted:
    - fi-apl-guc:         NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

  
#### Possible fixes ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       DMESG-WARN [fdo#108965] -> PASS

  * igt@i915_selftest@live_uncore:
    - fi-ivb-3770:        DMESG-FAIL [fdo#110210] -> PASS

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS +2

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

  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
  [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109513]: https://bugs.freedesktop.org/show_bug.cgi?id=109513
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
  [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210
  [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 


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

  Additional (2): fi-hsw-4770r fi-kbl-r 
  Missing    (11): fi-kbl-soraka fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-gdg-551 fi-icl-u3 fi-bsw-kefka fi-bdw-samus 


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

    * Linux: CI_DRM_5837 -> Patchwork_12629

  CI_DRM_5837: 1a35af6fa0d612425e325024cbac10e6fa9a9cd5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4912: 66deae8b6fa69540f069d6551cd22013f5343948 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12629: 678a3d72d2b39d0f1ade4d219e49dc746e60e9a8 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

678a3d72d2b3 drm/i915/execlists: Enable coarse preemption boundaries for gen8

== Logs ==

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

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

* Re: ✓ Fi.CI.BAT: success for drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-03-29 14:16 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-03-29 14:20   ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2019-03-29 14:20 UTC (permalink / raw)
  To: Patchwork; +Cc: intel-gfx

Quoting Patchwork (2019-03-29 14:16:21)
> == Series Details ==
> 
> Series: drm/i915/execlists: Enable coarse preemption boundaries for gen8
> URL   : https://patchwork.freedesktop.org/series/58738/
> State : success
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_5837 -> Patchwork_12629
> ====================================================
> 
> Summary
> -------
> 
>   **SUCCESS**

* wipes brow with relief

> Participating hosts (46 -> 37)
> ------------------------------
> 
>   Additional (2): fi-hsw-4770r fi-kbl-r 
>   Missing    (11): fi-kbl-soraka fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-gdg-551 fi-icl-u3 fi-bsw-kefka fi-bdw-samus 

But all icls were on vacation, so missing a tiny bit of HW coverage.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.IGT: failure for drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-03-29 13:40 [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8 Chris Wilson
                   ` (2 preceding siblings ...)
  2019-03-29 14:16 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-03-29 17:15 ` Patchwork
  2019-04-05  9:46 ` [PATCH] " Tvrtko Ursulin
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-03-29 17:15 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/execlists: Enable coarse preemption boundaries for gen8
URL   : https://patchwork.freedesktop.org/series/58738/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5837_full -> Patchwork_12629_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_12629_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_12629_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_create@create-clear:
    - shard-snb:          PASS -> DMESG-WARN

  * igt@runner@aborted:
    - shard-snb:          NOTRUN -> FAIL

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_tiled_pread_pwrite:
    - shard-iclb:         PASS -> TIMEOUT [fdo#109673]

  * igt@kms_atomic_transition@4x-modeset-transitions-nonblocking-fencing:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +11

  * igt@kms_busy@basic-modeset-e:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_busy@extended-modeset-hang-newfb-render-b:
    - shard-skl:          PASS -> DMESG-WARN [fdo#110222]

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-skl:          NOTRUN -> DMESG-WARN [fdo#110222]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#110222]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-skl:          PASS -> INCOMPLETE [fdo#104108]

  * igt@kms_flip@2x-plain-flip-ts-check:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +19

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-glk:          PASS -> FAIL [fdo#102887] / [fdo#105363]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu:
    - shard-iclb:         PASS -> FAIL [fdo#103167] +10

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-render:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +70

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-render:
    - shard-iclb:         PASS -> FAIL [fdo#105682] / [fdo#109247]

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-blt:
    - shard-iclb:         PASS -> FAIL [fdo#109247] +13

  * igt@kms_frontbuffer_tracking@psr-rgb101010-draw-mmap-wc:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +23

  * igt@kms_pipe_crc_basic@read-crc-pipe-d:
    - shard-skl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
    - shard-skl:          NOTRUN -> FAIL [fdo#107815] / [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
    - shard-apl:          PASS -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          PASS -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          PASS -> FAIL [fdo#107815]

  * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping:
    - shard-glk:          PASS -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         PASS -> SKIP [fdo#109642]

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         PASS -> SKIP [fdo#109441] +1

  * igt@kms_psr@suspend:
    - shard-iclb:         PASS -> FAIL [fdo#107383] / [fdo#110215]

  * igt@kms_sysfs_edid_timing:
    - shard-skl:          NOTRUN -> FAIL [fdo#100047]

  * igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm:
    - shard-apl:          PASS -> FAIL [fdo#104894]

  * igt@perf_pmu@multi-client-vcs1:
    - shard-skl:          NOTRUN -> SKIP [fdo#109271] +43

  * igt@tools_test@tools_test:
    - shard-apl:          PASS -> SKIP [fdo#109271]

  
#### Possible fixes ####

  * igt@gem_eio@hibernate:
    - shard-snb:          FAIL [fdo#107918] -> PASS

  * igt@gem_pwrite@big-cpu-fbr:
    - shard-apl:          INCOMPLETE [fdo#103927] -> PASS

  * igt@gem_tiled_swapping@non-threaded:
    - shard-iclb:         DMESG-WARN [fdo#108686] -> PASS

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
    - shard-apl:          DMESG-WARN [fdo#110222] -> PASS

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-skl:          FAIL [fdo#102670] / [fdo#106081] -> PASS

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          FAIL [fdo#105363] -> PASS

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-skl:          FAIL [fdo#105363] -> PASS
    - shard-snb:          FAIL [fdo#105363] -> PASS

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
    - shard-iclb:         FAIL [fdo#109247] -> PASS +9

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt:
    - shard-iclb:         FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-gtt:
    - shard-iclb:         FAIL [fdo#105682] / [fdo#109247] -> PASS +1

  * {igt@kms_plane@pixel-format-pipe-a-planes-source-clamping}:
    - shard-glk:          SKIP [fdo#109271] -> PASS

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
    - shard-skl:          FAIL [fdo#108145] -> PASS

  * igt@kms_plane_scaling@pipe-c-scaler-with-rotation:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> PASS

  * igt@kms_psr@primary_blt:
    - shard-iclb:         FAIL [fdo#107383] / [fdo#110215] -> PASS +3

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         SKIP [fdo#109441] -> PASS +2

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          FAIL [fdo#109016] -> PASS

  * igt@kms_setmode@basic:
    - shard-kbl:          FAIL [fdo#99912] -> PASS

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-iclb:         FAIL [fdo#104894] -> PASS

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

  [fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
  [fdo#102670]: https://bugs.freedesktop.org/show_bug.cgi?id=102670
  [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#106081]: https://bugs.freedesktop.org/show_bug.cgi?id=106081
  [fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
  [fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
  [fdo#107918]: https://bugs.freedesktop.org/show_bug.cgi?id=107918
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
  [fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
  [fdo#110278]: https://bugs.freedesktop.org/show_bug.cgi?id=110278
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 9)
------------------------------

  Missing    (1): shard-hsw 


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

    * Linux: CI_DRM_5837 -> Patchwork_12629

  CI_DRM_5837: 1a35af6fa0d612425e325024cbac10e6fa9a9cd5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4912: 66deae8b6fa69540f069d6551cd22013f5343948 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12629: 678a3d72d2b39d0f1ade4d219e49dc746e60e9a8 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-03-29 13:40 [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8 Chris Wilson
                   ` (3 preceding siblings ...)
  2019-03-29 17:15 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-04-05  9:46 ` Tvrtko Ursulin
  2019-04-05  9:49   ` Chris Wilson
  4 siblings, 1 reply; 9+ messages in thread
From: Tvrtko Ursulin @ 2019-04-05  9:46 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 29/03/2019 13:40, Chris Wilson wrote:
> When we introduced preemption, we chose to keep it disabled for gen8 as
> supporting preemption inside GPGPU user batches required various w/a in
> userspace. Since then, the desire to preempt long queues of requests
> between batches (e.g. within busywaiting semaphores) has grown. So allow
> arbitration within the busywaits and between requests, but disable
> arbitration within user batches so that we can preempt between requests
> and not risk breaking GPGPU.
> 
> However, since this preemption is much coarser and doesn't interfere
> with userspace, we decline to include it amongst the scheduler
> capabilities. (This is also required for us to skip over the preemption
> selftests that expect to be able to preempt user batches.)
> 
> Testcase: igt/gem_exec_scheduler/semaphore-user
> References: beecec901790 ("drm/i915/execlists: Preemption!")
> Fixes: e88619646971 ("drm/i915: Use HW semaphores for inter-engine synchronisation on gen8+")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_gem_context.c    |   2 +-
>   drivers/gpu/drm/i915/intel_lrc.c           |  49 ++++--
>   drivers/gpu/drm/i915/selftests/intel_lrc.c | 180 +++++++++++++++++++++
>   3 files changed, 217 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index 662da485e15f..92993db38aad 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -562,7 +562,7 @@ static void init_contexts(struct drm_i915_private *i915)
>   
>   static bool needs_preempt_context(struct drm_i915_private *i915)
>   {
> -	return HAS_LOGICAL_RING_PREEMPTION(i915);
> +	return HAS_EXECLISTS(i915);
>   }
>   
>   int i915_gem_contexts_init(struct drm_i915_private *dev_priv)
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index bec232acc8d7..b380688a0c1c 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -233,7 +233,7 @@ static inline bool need_preempt(const struct intel_engine_cs *engine,
>   {
>   	int last_prio;
>   
> -	if (!intel_engine_has_preemption(engine))
> +	if (!engine->preempt_context)
>   		return false;
>   
>   	if (i915_request_completed(rq))
> @@ -2035,7 +2035,7 @@ static int gen8_emit_bb_start(struct i915_request *rq,
>   {
>   	u32 *cs;
>   
> -	cs = intel_ring_begin(rq, 6);
> +	cs = intel_ring_begin(rq, 4);
>   	if (IS_ERR(cs))
>   		return PTR_ERR(cs);
>   
> @@ -2046,16 +2046,35 @@ static int gen8_emit_bb_start(struct i915_request *rq,
>   	 * particular all the gen that do not need the w/a at all!), if we
>   	 * took care to make sure that on every switch into this context
>   	 * (both ordinary and for preemption) that arbitrartion was enabled
> -	 * we would be fine. However, there doesn't seem to be a downside to
> -	 * being paranoid and making sure it is set before each batch and
> -	 * every context-switch.
> -	 *
> -	 * Note that if we fail to enable arbitration before the request
> -	 * is complete, then we do not see the context-switch interrupt and
> -	 * the engine hangs (with RING_HEAD == RING_TAIL).
> -	 *
> -	 * That satisfies both the GPGPU w/a and our heavy-handed paranoia.
> +	 * we would be fine.  However, for gen8 there is another w/a that
> +	 * requires us to not preempt inside GPGPU execution, so we keep
> +	 * arbitration disabled for gen8 batches. Arbitration will be
> +	 * re-enabled before we close the request
> +	 * (engine->emit_fini_breadcrumb).
>   	 */
> +	*cs++ = MI_ARB_ON_OFF | MI_ARB_DISABLE;
> +
> +	/* FIXME(BDW): Address space and security selectors. */
> +	*cs++ = MI_BATCH_BUFFER_START_GEN8 |
> +		(flags & I915_DISPATCH_SECURE ? 0 : BIT(8));
> +	*cs++ = lower_32_bits(offset);
> +	*cs++ = upper_32_bits(offset);
> +
> +	intel_ring_advance(rq, cs);
> +
> +	return 0;
> +}
> +
> +static int gen9_emit_bb_start(struct i915_request *rq,
> +			      u64 offset, u32 len,
> +			      const unsigned int flags)
> +{
> +	u32 *cs;
> +
> +	cs = intel_ring_begin(rq, 6);
> +	if (IS_ERR(cs))
> +		return PTR_ERR(cs);
> +
>   	*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
>   
>   	/* FIXME(BDW): Address space and security selectors. */

This comment can now be removed.

> @@ -2316,7 +2335,8 @@ void intel_execlists_set_default_submission(struct intel_engine_cs *engine)
>   	engine->flags |= I915_ENGINE_SUPPORTS_STATS;
>   	if (!intel_vgpu_active(engine->i915))
>   		engine->flags |= I915_ENGINE_HAS_SEMAPHORES;
> -	if (engine->preempt_context)
> +	if (engine->preempt_context &&
> +	    HAS_LOGICAL_RING_PREEMPTION(engine->i915))
>   		engine->flags |= I915_ENGINE_HAS_PREEMPTION;
>   }
>   
> @@ -2350,7 +2370,10 @@ logical_ring_default_vfuncs(struct intel_engine_cs *engine)
>   		 * until a more refined solution exists.
>   		 */
>   	}
> -	engine->emit_bb_start = gen8_emit_bb_start;
> +	if (IS_GEN(engine->i915, 8))
> +		engine->emit_bb_start = gen8_emit_bb_start;
> +	else
> +		engine->emit_bb_start = gen9_emit_bb_start;
>   }
>   
>   static inline void
> diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/selftests/intel_lrc.c
> index 0d3cae564db8..8bcd4e1d58ee 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_lrc.c
> @@ -76,6 +76,185 @@ static int live_sanitycheck(void *arg)
>   	return err;
>   }
>   
> +static int live_busywait_preempt(void *arg)
> +{
> +	struct drm_i915_private *i915 = arg;
> +	struct i915_gem_context *ctx_hi, *ctx_lo;
> +	struct intel_engine_cs *engine;
> +	struct drm_i915_gem_object *obj;
> +	struct i915_vma *vma;
> +	enum intel_engine_id id;
> +	intel_wakeref_t wakeref;
> +	int err = -ENOMEM;
> +	u32 *map;
> +
> +	/*
> +	 * Verify that even without HAS_LOGICAL_RING_PREEMPTION, we can
> +	 * preempt the busywaits used to synchronise between rings.
> +	 */
> +
> +	mutex_lock(&i915->drm.struct_mutex);
> +	wakeref = intel_runtime_pm_get(i915);
> +
> +	ctx_hi = kernel_context(i915);
> +	if (!ctx_hi)
> +		goto err_unlock;
> +	ctx_hi->sched.priority = INT_MAX;
> +
> +	ctx_lo = kernel_context(i915);
> +	if (!ctx_lo)
> +		goto err_ctx_hi;
> +	ctx_lo->sched.priority = INT_MIN;
> +
> +	obj = i915_gem_object_create_internal(i915, PAGE_SIZE);
> +	if (IS_ERR(obj)) {
> +		err = PTR_ERR(obj);
> +		goto err_ctx_lo;
> +	}
> +
> +	map = i915_gem_object_pin_map(obj, I915_MAP_WC);
> +	if (IS_ERR(map)) {
> +		err = PTR_ERR(map);
> +		goto err_obj;
> +	}
> +
> +	vma = i915_vma_instance(obj, &i915->ggtt.vm, 0);
> +	if (IS_ERR(vma)) {
> +		err = PTR_ERR(vma);
> +		goto err_map;
> +	}
> +
> +	err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL);
> +	if (err)
> +		goto err_map;
> +
> +	for_each_engine(engine, i915, id) {
> +		struct i915_request *lo, *hi;
> +		struct igt_live_test t;
> +		u32 *cs;
> +
> +		if (!intel_engine_can_store_dword(engine))
> +			continue;
> +
> +		if (igt_live_test_begin(&t, i915, __func__, engine->name)) {
> +			err = -EIO;
> +			goto err_vma;
> +		}
> +
> +		/*
> +		 * We create two requests. The low priority request
> +		 * busywaits on a semaphore (inside the ringbuffer where
> +		 * is should be preemptible) and the high priority requests
> +		 * uses a MI_STORE_DWORD_IMM to update the semaphore value
> +		 * allowing the first request to complete. If preemption
> +		 * fails, we hang instead.
> +		 */
> +
> +		lo = i915_request_alloc(engine, ctx_lo);
> +		if (IS_ERR(lo)) {
> +			err = PTR_ERR(lo);
> +			goto err_vma;
> +		}
> +
> +		cs = intel_ring_begin(lo, 8);
> +		if (IS_ERR(cs)) {
> +			err = PTR_ERR(cs);
> +			i915_request_add(lo);
> +			goto err_vma;
> +		}
> +
> +		*cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
> +		*cs++ = i915_ggtt_offset(vma);
> +		*cs++ = 0;
> +		*cs++ = 1;
> +
> +		/* XXX Do we need a flush + invalidate here? */
> +
> +		*cs++ = MI_SEMAPHORE_WAIT |
> +			MI_SEMAPHORE_GLOBAL_GTT |
> +			MI_SEMAPHORE_POLL |
> +			MI_SEMAPHORE_SAD_EQ_SDD;
> +		*cs++ = 0;
> +		*cs++ = i915_ggtt_offset(vma);
> +		*cs++ = 0;
> +
> +		intel_ring_advance(lo, cs);
> +		i915_request_add(lo);
> +
> +		if (wait_for(READ_ONCE(*map), 10)) {
> +			err = -ETIMEDOUT;
> +			goto err_vma;
> +		}
> +
> +		/* Low priority request should be busywaiting now */
> +		if (i915_request_wait(lo, I915_WAIT_LOCKED, 1) != -ETIME) {
> +			pr_err("%s: Busywaiting request did not!\n",
> +			       engine->name);
> +			err = -EIO;
> +			goto err_vma;
> +		}
> +
> +		hi = i915_request_alloc(engine, ctx_hi);
> +		if (IS_ERR(hi)) {
> +			err = PTR_ERR(hi);
> +			goto err_vma;

Could release the spinner with a CPU write from here onwards but I guess 
it doesn't matter.

> +		}
> +
> +		cs = intel_ring_begin(hi, 4);
> +		if (IS_ERR(cs)) {
> +			err = PTR_ERR(cs);
> +			i915_request_add(hi);
> +			goto err_vma;
> +		}
> +
> +		*cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
> +		*cs++ = i915_ggtt_offset(vma);
> +		*cs++ = 0;
> +		*cs++ = 0;
> +
> +		intel_ring_advance(hi, cs);
> +		i915_request_add(hi);
> +
> +		if (i915_request_wait(lo, I915_WAIT_LOCKED, HZ / 5) < 0) {
> +			struct drm_printer p = drm_info_printer(i915->drm.dev);
> +
> +			pr_err("%s: Failed to preempt semaphore busywait!\n",
> +			       engine->name);
> +
> +			intel_engine_dump(engine, &p, "%s\n", engine->name);
> +			GEM_TRACE_DUMP();
> +
> +			i915_gem_set_wedged(i915);
> +			err = -EIO;
> +			goto err_vma;
> +		}
> +		GEM_BUG_ON(READ_ONCE(*map));
> +
> +		if (igt_live_test_end(&t)) {
> +			err = -EIO;
> +			goto err_vma;
> +		}
> +	}
> +
> +	err = 0;
> +err_vma:
> +	i915_vma_unpin(vma);
> +err_map:
> +	i915_gem_object_unpin_map(obj);
> +err_obj:
> +	i915_gem_object_put(obj);
> +err_ctx_lo:
> +	kernel_context_close(ctx_lo);
> +err_ctx_hi:
> +	kernel_context_close(ctx_hi);
> +err_unlock:
> +	if (igt_flush_test(i915, I915_WAIT_LOCKED))
> +		err = -EIO;
> +	intel_runtime_pm_put(i915, wakeref);
> +	mutex_unlock(&i915->drm.struct_mutex);
> +	return err;
> +}
> +
>   static int live_preempt(void *arg)
>   {
>   	struct drm_i915_private *i915 = arg;
> @@ -1127,6 +1306,7 @@ int intel_execlists_live_selftests(struct drm_i915_private *i915)
>   {
>   	static const struct i915_subtest tests[] = {
>   		SUBTEST(live_sanitycheck),
> +		SUBTEST(live_busywait_preempt),
>   		SUBTEST(live_preempt),
>   		SUBTEST(live_late_preempt),
>   		SUBTEST(live_suppress_self_preempt),
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-04-05  9:46 ` [PATCH] " Tvrtko Ursulin
@ 2019-04-05  9:49   ` Chris Wilson
  2019-04-05  9:57     ` Tvrtko Ursulin
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2019-04-05  9:49 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx

Quoting Tvrtko Ursulin (2019-04-05 10:46:19)
> 
> On 29/03/2019 13:40, Chris Wilson wrote:
> > +static int gen9_emit_bb_start(struct i915_request *rq,
> > +                           u64 offset, u32 len,
> > +                           const unsigned int flags)
> > +{
> > +     u32 *cs;
> > +
> > +     cs = intel_ring_begin(rq, 6);
> > +     if (IS_ERR(cs))
> > +             return PTR_ERR(cs);
> > +
> >       *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
> >   
> >       /* FIXME(BDW): Address space and security selectors. */
> 
> This comment can now be removed.

I didn't check, but I presumed gen9+ still has those bits which we were
ignoring. However, if we ever get around to looking at it, the comment
in gen8 should suffice.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8
  2019-04-05  9:49   ` Chris Wilson
@ 2019-04-05  9:57     ` Tvrtko Ursulin
  0 siblings, 0 replies; 9+ messages in thread
From: Tvrtko Ursulin @ 2019-04-05  9:57 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

00
On 05/04/2019 10:49, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-04-05 10:46:19)
>>
>> On 29/03/2019 13:40, Chris Wilson wrote:
>>> +static int gen9_emit_bb_start(struct i915_request *rq,
>>> +                           u64 offset, u32 len,
>>> +                           const unsigned int flags)
>>> +{
>>> +     u32 *cs;
>>> +
>>> +     cs = intel_ring_begin(rq, 6);
>>> +     if (IS_ERR(cs))
>>> +             return PTR_ERR(cs);
>>> +
>>>        *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
>>>    
>>>        /* FIXME(BDW): Address space and security selectors. */
>>
>> This comment can now be removed.
> 
> I didn't check, but I presumed gen9+ still has those bits which we were
> ignoring. However, if we ever get around to looking at it, the comment
> in gen8 should suffice.

You could be right and it should say BDW+ instead.

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-04-05  9:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 13:40 [PATCH] drm/i915/execlists: Enable coarse preemption boundaries for gen8 Chris Wilson
2019-03-29 13:56 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-03-29 13:56 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-29 14:16 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-29 14:20   ` Chris Wilson
2019-03-29 17:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-04-05  9:46 ` [PATCH] " Tvrtko Ursulin
2019-04-05  9:49   ` Chris Wilson
2019-04-05  9:57     ` Tvrtko Ursulin

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.