drm/i915: Use VMA as the primary object for context state

When working with contexts, we most frequently want the GGTT VMA for the
context state, first and foremost. Since the object is available via the
VMA, we need only then store the VMA.

v2: Formatting tweaks to debugfs output, restored some comments removed
in the next patch

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-15-git-send-email-chris@chris-wilson.co.uk
This commit is contained in:
Chris Wilson
2016-08-15 10:48:54 +01:00
parent f23eda8cb4
commit bf3783e52a
7 changed files with 86 additions and 85 deletions

View File

@@ -1103,9 +1103,10 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv,
i915_error_ggtt_object_create(dev_priv,
engine->scratch.obj);
ee->ctx =
i915_error_ggtt_object_create(dev_priv,
request->ctx->engine[i].state);
if (request->ctx->engine[i].state) {
ee->ctx = i915_error_ggtt_object_create(dev_priv,
request->ctx->engine[i].state->obj);
}
if (request->pid) {
struct task_struct *task;