[PATCH 156/190] drm/i915: Store the active context object on all engines upon error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With execlists, we have context objects everywhere, not just RCS. So
store them for post-mortem debugging.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index f3c428d5627b..e9ef6b25c696 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -941,26 +941,6 @@ static void i915_record_ring_state(struct drm_device *dev,
 	}
 }
 
-
-static void i915_gem_record_active_context(struct intel_engine_cs *ring,
-					   struct drm_i915_error_state *error,
-					   struct drm_i915_error_ring *ering)
-{
-	struct drm_i915_private *dev_priv = ring->i915;
-	struct i915_vma *vma;
-
-	/* Currently render ring is the only HW context user */
-	if (ring->id != RCS || !error->ccid)
-		return;
-
-	list_for_each_entry(vma, &dev_priv->gtt.base.active_list, vm_link) {
-		if ((error->ccid & PAGE_MASK) == vma->node.start) {
-			ering->ctx = i915_error_object_create(dev_priv, vma);
-			break;
-		}
-	}
-}
-
 static void i915_gem_record_rings(struct drm_device *dev,
 				  struct drm_i915_error_state *error)
 {
@@ -1004,6 +984,10 @@ static void i915_gem_record_rings(struct drm_device *dev,
 					i915_error_object_create(dev_priv,
 								 engine->scratch.vma);
 
+			error->ring[i].ctx =
+				i915_error_object_create(dev_priv,
+							 request->ctx->engine[i].vma);
+
 			pid = request->ctx->pid;
 			if (pid) {
 				struct task_struct *task;
@@ -1030,8 +1014,6 @@ static void i915_gem_record_rings(struct drm_device *dev,
 			i915_error_object_create(dev_priv,
 						 engine->status_page.vma);
 
-		i915_gem_record_active_context(engine, error, &error->ring[i]);
-
 		count = 0;
 		list_for_each_entry(request, &engine->request_list, link)
 			count++;
-- 
2.7.0.rc3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux