summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gpu_error.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-08-15 10:48:54 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-08-15 11:01:02 +0100
commitbf3783e52a8929c738c5c8c5fa1df7e267b5271d (patch)
treed33da6e8bd47be851a37079cea283ae0900ac025 /drivers/gpu/drm/i915/i915_gpu_error.c
parentf23eda8cb444b4c45a9bd61768f8bcce9adee8a0 (diff)
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gpu_error.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gpu_error.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 9ba71dd4a312..61708faebf79 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -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;