Skip to content

Commit

Permalink
drm/i915: Check intel_contexts to avoid one extra pointer chase
Browse files Browse the repository at this point in the history
As we store the intel_context on the request (rq->hw_context), we can
simply compare that against the local intel_context for the
i915->kernel_context rather than using the rq->gem_context.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180601094002.13329-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Jun 1, 2018
1 parent 1934f5d commit e312b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ static bool engine_has_kernel_context_barrier(struct intel_engine_cs *engine)

any_active = true;

if (rq->gem_context == i915->kernel_context)
if (rq->hw_context == ce)
continue;

/*
Expand Down

0 comments on commit e312b68

Please sign in to comment.