[PATCH 7/7] debug
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Jan 14 10:44:11 UTC 2021
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/selftests/i915_request.c | 30 +++++++++++++++----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index a6b4221d2442..a4dd6d40b526 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -644,8 +644,11 @@ static int __cancel_inactive(struct intel_engine_cs *engine)
goto out_ce;
}
- if (rq->fence.error != -EINTR)
+ if (rq->fence.error != -EINTR) {
+ pr_err("%s: Unexpected fence error %d\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
+ }
out_ce:
intel_context_put(ce);
@@ -697,8 +700,11 @@ static int __cancel_active(struct intel_engine_cs *engine)
goto out_ce;
}
- if (rq->fence.error != -EINTR)
+ if (rq->fence.error != -EINTR) {
+ pr_err("%s: Unexpected fence error %d\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
+ }
out_ce:
intel_context_put(ce);
@@ -751,8 +757,11 @@ static int __cancel_active_chain(struct intel_engine_cs *engine)
goto out_ce;
}
- if (rq->fence.error != -EINTR)
+ if (rq->fence.error != -EINTR) {
+ pr_err("%s: Unexpected fence error %d\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
+ }
out_ce:
intel_context_put(ce);
@@ -792,8 +801,11 @@ static int __cancel_completed(struct intel_engine_cs *engine)
pr_debug("%s: Cancelling completed request\n", engine->name);
i915_request_cancel(rq, -EINTR);
- if (rq->fence.error)
+ if (rq->fence.error) {
+ pr_err("%s: Unexpected fence error %d\n",
+ engine->name, rq->fence.error);
err = -EINVAL;
+ }
out_ce:
intel_context_put(ce);
@@ -826,14 +838,22 @@ static int live_cancel_request(void *arg)
err = __cancel_inactive(engine);
if (err == 0)
err = __cancel_active(engine);
+ else
+ pr_err("%s: Cancel inactive error %d\n", engine->name, err);
if (err == 0)
err = __cancel_active_chain(engine);
+ else
+ pr_err("%s: Cancel active error %d\n", engine->name, err);
if (err == 0)
err = __cancel_completed(engine);
+ else
+ pr_err("%s: Cancel active_chain error %d\n", engine->name, err);
err2 = igt_live_test_end(&t);
- if (err)
+ if (err) {
+ pr_err("%s: Cancel completed error %d\n", engine->name, err);
return err;
+ }
if (err2)
return err2;
}
--
2.27.0
More information about the Intel-gfx-trybot
mailing list