All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [RESEND 3/6] drm/i915/execlists: Always clear preempt status on cancelling all
Date: Mon, 16 Jul 2018 09:03:29 +0100	[thread overview]
Message-ID: <20180716080332.32283-3-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20180716080332.32283-1-chris@chris-wilson.co.uk>

On reset/wedging, we cancel all pending replies from the HW and we also
want to cancel an outstanding preemption event. Since we use the same
function to cancel the pending replies for reset and for a preemption
event, we can simply clear the active tracking for all.

v2: Keep execlists_user_end() markup for wedging

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_guc_submission.c | 2 --
 drivers/gpu/drm/i915/intel_lrc.c            | 5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index de57cf6085d1..3290d77b0194 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -636,8 +636,6 @@ static void complete_preempt_context(struct intel_engine_cs *engine)
 
 	wait_for_guc_preempt_report(engine);
 	intel_write_status_page(engine, I915_GEM_HWS_PREEMPT_INDEX, 0);
-
-	execlists_clear_active(execlists, EXECLISTS_ACTIVE_PREEMPT);
 }
 
 /**
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 703b76dcfcd2..4ef4439ff438 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -566,8 +566,6 @@ static void complete_preempt_context(struct intel_engine_execlists *execlists)
 	__unwind_incomplete_requests(container_of(execlists,
 						  struct intel_engine_cs,
 						  execlists));
-
-	execlists_clear_active(execlists, EXECLISTS_ACTIVE_PREEMPT);
 }
 
 static void execlists_dequeue(struct intel_engine_cs *engine)
@@ -795,7 +793,7 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists)
 		port++;
 	}
 
-	execlists_user_end(execlists);
+	execlists->active = 0;
 }
 
 static void reset_csb_pointers(struct intel_engine_execlists *execlists)
@@ -841,6 +839,7 @@ static void execlists_cancel_requests(struct intel_engine_cs *engine)
 
 	/* Cancel the requests on the HW and clear the ELSP tracker. */
 	execlists_cancel_port_requests(execlists);
+	execlists_user_end(execlists);
 
 	/* Mark all executing requests as skipped. */
 	list_for_each_entry(rq, &engine->timeline.requests, link) {
-- 
2.18.0

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

  parent reply	other threads:[~2018-07-16  8:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16  8:03 [RESEND 1/6] drm/i915/selftests: Force a preemption hang Chris Wilson
2018-07-16  8:03 ` [RESEND 2/6] drm/i915/selftests: Exercise reset to break stuck GTT eviction Chris Wilson
2018-07-16  9:32   ` Tvrtko Ursulin
2018-07-16  8:03 ` Chris Wilson [this message]
2018-07-16  9:45   ` [RESEND 3/6] drm/i915/execlists: Always clear preempt status on cancelling all Tvrtko Ursulin
2018-07-16  8:03 ` [RESEND 4/6] drm/i915/execlists: Disable submission tasklet upon wedging Chris Wilson
2018-07-16  9:59   ` Tvrtko Ursulin
2018-07-16  8:03 ` [RESEND 5/6] drm/i915: Remove pci private pointer after destroying the device private Chris Wilson
2018-07-16 10:04   ` Tvrtko Ursulin
2018-07-16 10:32   ` Michal Wajdeczko
2018-07-16 10:37     ` Chris Wilson
2018-07-16  8:03 ` [RESEND 6/6] drm/i915/selftests: Downgrade igt_timeout message Chris Wilson
2018-07-16 10:06   ` Tvrtko Ursulin
2018-07-16  8:32 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [RESEND,1/6] drm/i915/selftests: Force a preemption hang Patchwork
2018-07-16  8:53 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-16  9:08 ` [RESEND 1/6] " Tvrtko Ursulin
2018-07-16 15:04 ` ✓ Fi.CI.IGT: success for series starting with [RESEND,1/6] " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2018-07-16  7:22 [RESEND 1/6] " Chris Wilson
2018-07-16  7:22 ` [RESEND 3/6] drm/i915/execlists: Always clear preempt status on cancelling all Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180716080332.32283-3-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.