drm/i915: Wrap engine->context_pin() and engine->context_unpin()

Make life easier in upcoming patches by moving the context_pin and
context_unpin vfuncs into inline helpers.

v2: Fixup mock_engine to mark the context as pinned on use.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180430131503.5375-2-chris@chris-wilson.co.uk
This commit is contained in:
Chris Wilson
2018-04-30 14:15:01 +01:00
parent 52d7f16e55
commit ab82a0635c
16 changed files with 117 additions and 69 deletions

View File

@@ -1472,7 +1472,8 @@ static void gem_record_rings(struct i915_gpu_state *error)
ee->ctx =
i915_error_object_create(i915,
request->ctx->engine[i].state);
to_intel_context(request->ctx,
engine)->state);
error->simulated |=
i915_gem_context_no_error_capture(request->ctx);