Skip to content

Commit d6c0511

Browse files
committed
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
1 parent 5152def commit d6c0511

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

drivers/gpu/drm/i915/gvt/scheduler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ static int shadow_context_status_change(struct notifier_block *nb,
174174
atomic_set(&workload->shadow_ctx_active, 1);
175175
break;
176176
case INTEL_CONTEXT_SCHEDULE_OUT:
177+
case INTEL_CONTEXT_SCHEDULE_PREEMPTED:
177178
atomic_set(&workload->shadow_ctx_active, 0);
178179
break;
179180
default:

drivers/gpu/drm/i915/intel_lrc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ execlist_cancel_port_requests(struct intel_engine_execlists *execlists)
617617
while (num_ports-- && port_isset(port)) {
618618
struct drm_i915_gem_request *rq = port_request(port);
619619

620-
execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
620+
execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_PREEMPTED);
621621
i915_gem_request_put(rq);
622622

623623
memset(port, 0, sizeof(*port));

drivers/gpu/drm/i915/intel_lrc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
enum {
6262
INTEL_CONTEXT_SCHEDULE_IN = 0,
6363
INTEL_CONTEXT_SCHEDULE_OUT,
64+
INTEL_CONTEXT_SCHEDULE_PREEMPTED,
6465
};
6566

6667
/* Logical Rings */

0 commit comments

Comments
 (0)