All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: Clear preempt status before use
@ 2018-10-12 15:25 Chris Wilson
  2018-10-12 15:58 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Chris Wilson @ 2018-10-12 15:25 UTC (permalink / raw)
  To: intel-gfx

---
 drivers/gpu/drm/i915/intel_guc_submission.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index eae668442ebe..4c45da01ea1c 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -654,11 +654,10 @@ static void complete_preempt_context(struct intel_engine_cs *engine)
 	if (inject_preempt_hang(execlists))
 		return;
 
+	wait_for_guc_preempt_report(engine);
+
 	execlists_cancel_port_requests(execlists);
 	execlists_unwind_incomplete_requests(execlists);
-
-	wait_for_guc_preempt_report(engine);
-	intel_write_status_page(engine, I915_GEM_HWS_PREEMPT_INDEX, 0);
 }
 
 /**
@@ -726,6 +725,9 @@ static bool __guc_dequeue(struct intel_engine_cs *engine)
 			int prio = execlists->queue_priority;
 
 			if (__execlists_need_preempt(prio, port_prio(port))) {
+				intel_write_status_page(engine,
+							I915_GEM_HWS_PREEMPT_INDEX,
+							0);
 				execlists_set_active(execlists,
 						     EXECLISTS_ACTIVE_PREEMPT);
 				queue_work(engine->i915->guc.preempt_wq,
@@ -816,8 +818,7 @@ static void guc_submission_tasklet(unsigned long data)
 	}
 
 	if (execlists_is_active(execlists, EXECLISTS_ACTIVE_PREEMPT) &&
-	    intel_read_status_page(engine, I915_GEM_HWS_PREEMPT_INDEX) ==
-	    GUC_PREEMPT_FINISHED)
+	    intel_read_status_page(engine, I915_GEM_HWS_PREEMPT_INDEX))
 		complete_preempt_context(engine);
 
 	if (!execlists_is_active(execlists, EXECLISTS_ACTIVE_PREEMPT))
-- 
2.19.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

end of thread, other threads:[~2018-10-12 17:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 15:25 [PATCH] drm/i915/guc: Clear preempt status before use Chris Wilson
2018-10-12 15:58 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-10-12 16:20 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-12 16:33 ` [PATCH] " Chris Wilson
2018-10-12 16:40 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc: Clear preempt status before use (rev2) Patchwork
2018-10-12 16:58 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-12 17:06 ` [PATCH] drm/i915/guc: Clear preempt status before use Chris Wilson
2018-10-12 17:17 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc: Clear preempt status before use (rev3) Patchwork
2018-10-12 17:33 ` ✗ Fi.CI.BAT: failure " 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.