diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-09-14 08:40:07 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-09-14 09:28:32 -0400 |
commit | 5791bad4bc1f624969c875616d1032227f23c25e (patch) | |
tree | dfcba189761c550942117efa9f973af03dce1d4f | |
parent | 666424abfb863e3e51fcd35baad5f242fc69d314 (diff) |
drm/i915: Include fence-hint for timeout warning
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 (hint:submit_notify [i915])
We also want to downgrade from a warning to a notice (normal but
significant condition) as the timeout is imposed and controlled by the
caller (i.e. it is deliberate) and can be provoked by userspace.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180914124007.18790-1-chris@chris-wilson.co.uk
-rw-r--r-- | drivers/gpu/drm/i915/i915_sw_fence.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c index 1de5173e53a2..6dbeed079ae5 100644 --- a/drivers/gpu/drm/i915/i915_sw_fence.c +++ b/drivers/gpu/drm/i915/i915_sw_fence.c | |||
@@ -24,13 +24,13 @@ enum { | |||
24 | DEBUG_FENCE_NOTIFY, | 24 | DEBUG_FENCE_NOTIFY, |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #ifdef CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS | ||
28 | |||
29 | static void *i915_sw_fence_debug_hint(void *addr) | 27 | static void *i915_sw_fence_debug_hint(void *addr) |
30 | { | 28 | { |
31 | return (void *)(((struct i915_sw_fence *)addr)->flags & I915_SW_FENCE_MASK); | 29 | return (void *)(((struct i915_sw_fence *)addr)->flags & I915_SW_FENCE_MASK); |
32 | } | 30 | } |
33 | 31 | ||
32 | #ifdef CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS | ||
33 | |||
34 | static struct debug_obj_descr i915_sw_fence_debug_descr = { | 34 | static struct debug_obj_descr i915_sw_fence_debug_descr = { |
35 | .name = "i915_sw_fence", | 35 | .name = "i915_sw_fence", |
36 | .debug_hint = i915_sw_fence_debug_hint, | 36 | .debug_hint = i915_sw_fence_debug_hint, |
@@ -393,10 +393,11 @@ static void timer_i915_sw_fence_wake(struct timer_list *t) | |||
393 | if (!fence) | 393 | if (!fence) |
394 | return; | 394 | return; |
395 | 395 | ||
396 | pr_warn("asynchronous wait on fence %s:%s:%x timed out\n", | 396 | pr_notice("Asynchronous wait on fence %s:%s:%x timed out (hint:%pS)\n", |
397 | cb->dma->ops->get_driver_name(cb->dma), | 397 | cb->dma->ops->get_driver_name(cb->dma), |
398 | cb->dma->ops->get_timeline_name(cb->dma), | 398 | cb->dma->ops->get_timeline_name(cb->dma), |
399 | cb->dma->seqno); | 399 | cb->dma->seqno, |
400 | i915_sw_fence_debug_hint(fence)); | ||
400 | 401 | ||
401 | i915_sw_fence_complete(fence); | 402 | i915_sw_fence_complete(fence); |
402 | } | 403 | } |