[Intel-gfx] [PATCH 2/2] drm/i915/execlists: Distinguish the incomplete context notifies

Wang, Zhi A zhi.a.wang at intel.com
Tue Sep 26 10:42:48 UTC 2017


Thanks for the patch! :)

I got a question: Will the re-scheduling of the request be handled by i915? Or the client has to re-submit the request by itself after it got preempted? :)

Currently, we will call i915_wait_request() to wait the request. I guess the preemption will not wake up the i915_wait_request() with a EINTR?

Thanks,
Zhi.

-----Original Message-----
From: Chris Wilson [mailto:chris at chris-wilson.co.uk] 
Sent: Tuesday, September 26, 2017 1:17 PM
To: intel-gfx at lists.freedesktop.org
Cc: Chris Wilson <chris at chris-wilson.co.uk>; Zhenyu Wang <zhenyuw at linux.intel.com>; Wang, Zhi A <zhi.a.wang at intel.com>; Winiarski, Michal <michal.winiarski at intel.com>; Mika Kuoppala <mika.kuoppala at linux.intel.com>; Ursulin, Tvrtko <tvrtko.ursulin at intel.com>
Subject: [PATCH 2/2] drm/i915/execlists: Distinguish the incomplete context notifies

Let the listener know that the context we just scheduled out was not complete, and will be scheduled back in at a later point.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: "Zhenyu Wang" <zhenyuw at linux.intel.com>
Cc: "Wang, Zhi A" <zhi.a.wang at intel.com>
Cc: MichaƂ Winiarski <michal.winiarski at intel.com>
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 2 +-  drivers/gpu/drm/i915/intel_lrc.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 61cac26a8b05..79fe5f807098 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -580,7 +580,7 @@ execlist_cancel_port_requests(struct intel_engine_execlists *execlists)
 	while (num_ports-- && port_isset(port)) {
 		struct drm_i915_gem_request *rq = port_request(port);
 
-		execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
+		execlists_context_status_change(rq, 
+INTEL_CONTEXT_SCHEDULE_PREEMPTED);
 		i915_gem_request_put(rq);
 
 		memset(port, 0, sizeof(*port));
diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/intel_lrc.h
index 314adee7127a..689fde1a63a9 100644
--- a/drivers/gpu/drm/i915/intel_lrc.h
+++ b/drivers/gpu/drm/i915/intel_lrc.h
@@ -61,6 +61,7 @@
 enum {
 	INTEL_CONTEXT_SCHEDULE_IN = 0,
 	INTEL_CONTEXT_SCHEDULE_OUT,
+	INTEL_CONTEXT_SCHEDULE_PREEMPTED,
 };
 
 /* Logical Rings */
--
2.14.1



More information about the Intel-gfx mailing list