diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-06 15:20:13 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-06 16:02:12 +0000 |
commit | 984ff29f74c0c130b43f0c5b0fe0fbca5de0fddc (patch) | |
tree | b2dcdc306f0c3cb210afec411c1a3a54f1e74c30 /drivers/gpu/drm/i915/intel_lrc.c | |
parent | e8f9ae9b5062b43b6cb3dd6e45107c8edf25f1d0 (diff) | |
download | op-kernel-dev-984ff29f74c0c130b43f0c5b0fe0fbca5de0fddc.zip op-kernel-dev-984ff29f74c0c130b43f0c5b0fe0fbca5de0fddc.tar.gz |
drm/i915: Simplify testing for am-I-the-kernel-context?
The kernel context (dev_priv->kernel_context) is unique in that it is
not associated with any user filp - it is the only one with
ctx->file_priv == NULL. This is a simpler test than comparing it against
dev_priv->kernel_context which involves some pointer dancing.
In checking that this is true, we notice that the gvt context is
allocating itself a i915_hw_ppgtt it doesn't use and not flagging that
its file_priv should be invalid.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170106152013.24684-5-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index a9eefb1..6db246a 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -786,7 +786,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine, flags = PIN_GLOBAL; if (ctx->ggtt_offset_bias) flags |= PIN_OFFSET_BIAS | ctx->ggtt_offset_bias; - if (ctx == ctx->i915->kernel_context) + if (i915_gem_context_is_kernel(ctx)) flags |= PIN_HIGH; ret = i915_vma_pin(ce->state, 0, GEN8_LR_CONTEXT_ALIGN, flags); |