[PATCH 8/9] selftest pr_err

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Mar 12 11:23:36 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 | 29 ++++++++++++++++---
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index 4752b45fd2fe..c263fd93ee5c 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -643,13 +643,18 @@ 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: fence not cancelled (%u)\n",
+		       engine->name, rq->fence.error);
 		err = -EINVAL;
+	}
 
 out_ce:
 	intel_context_put(ce);
 out_spin:
 	igt_spinner_fini(&spin);
+	if (err)
+		pr_err("%s: __cancel_inactive error %d\n", engine->name, err);
 	return err;
 }
 
@@ -696,13 +701,18 @@ 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: fence not cancelled (%u)\n",
+		       engine->name, rq->fence.error);
 		err = -EINVAL;
+	}
 
 out_ce:
 	intel_context_put(ce);
 out_spin:
 	igt_spinner_fini(&spin);
+	if (err)
+		pr_err("%s: __cancel_active error %d\n", engine->name, err);
 	return err;
 }
 
@@ -750,13 +760,19 @@ 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: fence not cancelled (%u)\n",
+		       engine->name, rq->fence.error);
 		err = -EINVAL;
+	}
 
 out_ce:
 	intel_context_put(ce);
 out_spin:
 	igt_spinner_fini(&spin);
+	if (err)
+		pr_err("%s: __cancel_active_chain error %d\n",
+		       engine->name, err);
 	return err;
 }
 
@@ -791,13 +807,18 @@ 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: fence not cancelled (%u)\n",
+		       engine->name, rq->fence.error);
 		err = -EINVAL;
+	}
 
 out_ce:
 	intel_context_put(ce);
 out_spin:
 	igt_spinner_fini(&spin);
+	if (err)
+		pr_err("%s: __cancel_completed error %d\n", engine->name, err);
 	return err;
 }
 
-- 
2.27.0



More information about the Intel-gfx-trybot mailing list