[Intel-gfx] [PATCH 03/11] drm/i915: Include fence-hint for timeout warning

Chris Wilson chris at chris-wilson.co.uk
Mon Sep 11 08:41:27 UTC 2017


If an asynchronous wait on a foriegn fence, we print a warning
indicating which fence was not signaled. As i915_sw_fences become more
common, include the debug hint (the symbol-name of the target) to help
identify the waiter. E.g.

[   31.968144] Asynchronous wait on fence sw_sync:gem_eio:1 timed out for hint:submit_notify [i915]

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

diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c
index 808ea4d5b962..e63cda8adc45 100644
--- a/drivers/gpu/drm/i915/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/i915_sw_fence.c
@@ -24,13 +24,13 @@ enum {
 	DEBUG_FENCE_NOTIFY,
 };
 
-#ifdef CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS
-
 static void *i915_sw_fence_debug_hint(void *addr)
 {
 	return (void *)(((struct i915_sw_fence *)addr)->flags & I915_SW_FENCE_MASK);
 }
 
+#ifdef CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS
+
 static struct debug_obj_descr i915_sw_fence_debug_descr = {
 	.name = "i915_sw_fence",
 	.debug_hint = i915_sw_fence_debug_hint,
@@ -369,10 +369,11 @@ static void timer_i915_sw_fence_wake(unsigned long data)
 	if (!fence)
 		return;
 
-	pr_warn("asynchronous wait on fence %s:%s:%x timed out\n",
+	pr_warn("Asynchronous wait on fence %s:%s:%x timed out for hint:%pF\n",
 		cb->dma->ops->get_driver_name(cb->dma),
 		cb->dma->ops->get_timeline_name(cb->dma),
-		cb->dma->seqno);
+		cb->dma->seqno,
+		i915_sw_fence_debug_hint(fence));
 
 	i915_sw_fence_complete(fence);
 }
-- 
2.14.1



More information about the Intel-gfx mailing list