[CI 8/8] i915 stuff
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Mon Feb 13 13:48:22 UTC 2023
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 15 +++++++++++++++
drivers/gpu/drm/i915/i915_active.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
index ecc990ec1b95..717f1ef99f0f 100644
--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
@@ -135,6 +135,19 @@ __dma_fence_signal__timestamp(struct dma_fence *fence, ktime_t timestamp)
trace_dma_fence_signaled(fence);
}
+static void decr_wait_count(struct dma_fence *fence, struct dma_fence_cb *cb)
+{
+ lockdep_assert_held(fence->lock);
+
+ trace_printk(" -- %llx:%llu @ %u (%lx]) [%p] (i915)\n", fence->context, fence->seqno, fence->waitcount, cb->flags, cb);
+ if (__test_and_clear_bit(DMA_FENCE_CB_FLAG_WAITCOUNT_BIT, &cb->flags)) {
+ WARN_ON_ONCE(!fence->waitcount);
+ if (!fence->waitcount)
+ ftrace_dump(DUMP_ALL);
+ fence->waitcount--;
+ }
+}
+
static void
__dma_fence_signal__notify(struct dma_fence *fence,
const struct list_head *list)
@@ -144,6 +157,8 @@ __dma_fence_signal__notify(struct dma_fence *fence,
lockdep_assert_held(fence->lock);
list_for_each_entry_safe(cur, tmp, list, node) {
+ trace_printk(" S %llx:%llu @ %u [%p] (i915)\n", fence->context, fence->seqno, fence->waitcount, cur);
+ decr_wait_count(fence, cur);
INIT_LIST_HEAD(&cur->node);
cur->func(fence, cur);
}
diff --git a/drivers/gpu/drm/i915/i915_active.h b/drivers/gpu/drm/i915/i915_active.h
index 7eb44132183a..4421ba05933c 100644
--- a/drivers/gpu/drm/i915/i915_active.h
+++ b/drivers/gpu/drm/i915/i915_active.h
@@ -66,6 +66,7 @@ __i915_active_fence_init(struct i915_active_fence *active,
{
RCU_INIT_POINTER(active->fence, fence);
active->cb.func = fn ?: i915_active_noop;
+ active->cb.flags = 0;
}
#define INIT_ACTIVE_FENCE(A) \
--
2.34.1
More information about the Intel-gfx-trybot
mailing list