Message ID | F3B0350DF4CB6849A642218320DE483D7D645F0E@SHSMSX101.ccr.corp.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Quoting Wang, Zhi A (2017-09-26 11:42:48) > 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? :) It remains in the execlist queue, so it will be rescheduled at the next opportunity. At the moment, that will be after the reset; but in the future that will also include after the preemption event is over. > 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? Correct, The i915_wait_request() will continue, and will not return until the request has been rescheduled and completed. (Except in the case where we are cancelling the request due to the driver exploding, in which case we will wake up the i915_wait_request() as we will signal all the outstanding requests, but they will be marked as in error.) -Chris
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 */