]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/selftests: Pretty print engine state when requests fail to start
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 11:02:58 +0000 (12:02 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 16:07:28 +0000 (17:07 +0100)
During hangcheck testing, we try to execute requests following the GPU
reset, and in particular want to try and debug when those fail.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-2-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/selftests/intel_hangcheck.c

index 08159b268893490c143df03f1f68602bc561b028..7e1bdd88eda30e65db27f43b1d4ffec18baac835 100644 (file)
@@ -624,8 +624,11 @@ static int igt_wait_reset(void *arg)
        __i915_add_request(rq, true);
 
        if (!wait_for_hang(&h, rq)) {
+               struct drm_printer p = drm_info_printer(i915->drm.dev);
+
                pr_err("Failed to start request %x, at %x\n",
                       rq->fence.seqno, hws_seqno(&h, rq));
+               intel_engine_dump(rq->engine, &p);
 
                i915_reset(i915, 0);
                i915_gem_set_wedged(i915);
@@ -716,8 +719,12 @@ static int igt_reset_queue(void *arg)
                        __i915_add_request(rq, true);
 
                        if (!wait_for_hang(&h, prev)) {
+                               struct drm_printer p = drm_info_printer(i915->drm.dev);
+
                                pr_err("Failed to start request %x, at %x\n",
                                       prev->fence.seqno, hws_seqno(&h, prev));
+                               intel_engine_dump(rq->engine, &p);
+
                                i915_gem_request_put(rq);
                                i915_gem_request_put(prev);
 
@@ -818,8 +825,11 @@ static int igt_handle_error(void *arg)
        __i915_add_request(rq, true);
 
        if (!wait_for_hang(&h, rq)) {
+               struct drm_printer p = drm_info_printer(i915->drm.dev);
+
                pr_err("Failed to start request %x, at %x\n",
                       rq->fence.seqno, hws_seqno(&h, rq));
+               intel_engine_dump(rq->engine, &p);
 
                i915_reset(i915, 0);
                i915_gem_set_wedged(i915);