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. v2: Handle CONTEXT_STATUS_PREEMPTED in gvt by aliasing it to CONTEXT_STATUS_OUT for the moment, gvt can expand upon the difference later. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: "Zhenyu Wang" <zhenyuw@linux.intel.com> Cc: "Wang, Zhi A" <zhi.a.wang@intel.com> Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-3-chris@chris-wilson.co.uk
This commit is contained in:
parent
5152defe4a
commit
d6c0511300
|
@ -174,6 +174,7 @@ static int shadow_context_status_change(struct notifier_block *nb,
|
|||
atomic_set(&workload->shadow_ctx_active, 1);
|
||||
break;
|
||||
case INTEL_CONTEXT_SCHEDULE_OUT:
|
||||
case INTEL_CONTEXT_SCHEDULE_PREEMPTED:
|
||||
atomic_set(&workload->shadow_ctx_active, 0);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -617,7 +617,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));
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
enum {
|
||||
INTEL_CONTEXT_SCHEDULE_IN = 0,
|
||||
INTEL_CONTEXT_SCHEDULE_OUT,
|
||||
INTEL_CONTEXT_SCHEDULE_PREEMPTED,
|
||||
};
|
||||
|
||||
/* Logical Rings */
|
||||
|
|
Loading…
Reference in New Issue