Skip to content

Commit 702791f

Browse files
weinanljlahtine-intel
authored andcommitted
drm/i915: add schedule out notification of preempted but completed request
There is one corner case missing schedule out notification of the preempted request. The preempted request is just completed when preemption happen, then it will be canceled and won't be resubmitted later, GVT-g will lost the schedule out notification. Here add schedule out notification if found the preempted request has been completed. v2: - refine description, add completed check and notification in execlists_cancel_port_requests. (Chris) v3: - use ternary confitional, remove local variable. (Tvrtko) Cc: Chris Wilson <[email protected]> Signed-off-by: Weinan Li <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Signed-off-by: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c822e05 commit 702791f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/gpu/drm/i915/intel_lrc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,12 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists)
727727

728728
GEM_BUG_ON(!execlists->active);
729729
intel_engine_context_out(rq->engine);
730-
execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_PREEMPTED);
730+
731+
execlists_context_status_change(rq,
732+
i915_request_completed(rq) ?
733+
INTEL_CONTEXT_SCHEDULE_OUT :
734+
INTEL_CONTEXT_SCHEDULE_PREEMPTED);
735+
731736
i915_request_put(rq);
732737

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

0 commit comments

Comments
 (0)