diff mbox

drm/i915: Include fence-hint for timeout warning

Message ID 20170226134736.5544-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Feb. 26, 2017, 1:47 p.m. UTC
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.

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

Comments

Chris Wilson Feb. 26, 2017, 1:52 p.m. UTC | #1
On Sun, Feb 26, 2017 at 01:47:36PM +0000, Chris Wilson wrote:
> If an asynchronous wait on a foriegn fence, we print a warning
                                            ^ times out
> 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.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c
index 03c3aff28267..0a6ba99ca65a 100644
--- a/drivers/gpu/drm/i915/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/i915_sw_fence.c
@@ -22,13 +22,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,
@@ -404,10 +404,11 @@  static void timer_i915_sw_fence_wake(unsigned long data)
 {
 	struct i915_sw_dma_fence_cb *cb = (struct i915_sw_dma_fence_cb *)data;
 
-	printk(KERN_WARNING "asynchronous wait on fence %s:%s:%x timed out\n",
+	printk(KERN_WARNING "Asynchronous wait on fence %s:%s:%x timed out for hint:%pS\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(cb->fence));
 	dma_fence_put(cb->dma);
 	cb->dma = NULL;