[Intel-gfx] [PATCH] drm/i915: Verify the captured request is still active

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 8 17:47:16 UTC 2020


Since the state we try and capture from the request is only stable while
active (once the request is completed it may be retired, and unpin/free
the logical state) double check the request has not yet completed.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 2d0c4b8d9e3c..fd676ed72dab 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1369,6 +1369,9 @@ intel_engine_coredump_add_request(struct intel_engine_coredump *ee,
 {
 	struct intel_engine_capture_vma *vma = NULL;
 
+	if (i915_request_completed(rq))
+		return NULL;
+
 	ee->simulated |= record_context(&ee->context, rq);
 	if (ee->simulated)
 		return NULL;
-- 
2.20.1



More information about the Intel-gfx mailing list