drm/i915/selftests: Show the i915_active on failure
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Dec 2019 11:55:02 +0000 (11:55 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Dec 2019 11:33:18 +0000 (11:33 +0000)
Print the i915_active state on selftest failure, with a hope it helps
illuminate the cause of the failure.

References: https://gitlab.freedesktop.org/drm/intel/issues/765
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191210115502.3767070-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_active.c

index 6c1db3ded4462c8689ec503bf768ce7186f5931d..ef572a0c25668ecb2d21a0d0bf8b26c960f83b90 100644 (file)
@@ -155,7 +155,11 @@ static int live_active_wait(void *arg)
 
        i915_active_wait(&active->base);
        if (!READ_ONCE(active->retired)) {
+               struct drm_printer p = drm_err_printer(__func__);
+
                pr_err("i915_active not retired after waiting!\n");
+               i915_active_print(&active->base, &p);
+
                err = -EINVAL;
        }
 
@@ -184,7 +188,11 @@ static int live_active_retire(void *arg)
                err = -EIO;
 
        if (!READ_ONCE(active->retired)) {
+               struct drm_printer p = drm_err_printer(__func__);
+
                pr_err("i915_active not retired after flushing!\n");
+               i915_active_print(&active->base, &p);
+
                err = -EINVAL;
        }