mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drm/i915: Mark up protected uses of 'i915_request_completed'
When we know that we are inside the timeline mutex, or inside the submission flow (under active.lock or the holder's rcu lock), we know that the rq->hwsp is stable and we can use the simpler direct version. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210114135612.13210-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -1811,7 +1811,7 @@ intel_engine_find_active_request(struct intel_engine_cs *engine)
|
||||
struct intel_timeline *tl = request->context->timeline;
|
||||
|
||||
list_for_each_entry_from_reverse(request, &tl->requests, link) {
|
||||
if (i915_request_completed(request))
|
||||
if (__i915_request_is_complete(request))
|
||||
break;
|
||||
|
||||
active = request;
|
||||
@@ -1822,10 +1822,10 @@ intel_engine_find_active_request(struct intel_engine_cs *engine)
|
||||
return active;
|
||||
|
||||
list_for_each_entry(request, &engine->active.requests, sched.link) {
|
||||
if (i915_request_completed(request))
|
||||
if (__i915_request_is_complete(request))
|
||||
continue;
|
||||
|
||||
if (!i915_request_started(request))
|
||||
if (!__i915_request_has_started(request))
|
||||
continue;
|
||||
|
||||
/* More than one preemptible request may match! */
|
||||
|
||||
Reference in New Issue
Block a user