diff mbox series

[RFC,3/9] drm/i915: Use fence callback initialization helper

Message ID 20230216105921.624960-4-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series Waitboost drm syncobj waits | expand

Commit Message

Tvrtko Ursulin Feb. 16, 2023, 10:59 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Use the previously added initialization helper to ensure correct operation
of the common code.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_active.c | 2 +-
 drivers/gpu/drm/i915/i915_active.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 7412abf166a8..a9483aadb0ff 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -887,7 +887,7 @@  int i915_active_acquire_preallocate_barrier(struct i915_active *ref,
 				goto unwind;
 
 			RCU_INIT_POINTER(node->base.fence, NULL);
-			node->base.cb.func = node_retire;
+			__dma_fence_cb_init(&node->base.cb, node_retire);
 			node->timeline = idx;
 			node->ref = ref;
 		}
diff --git a/drivers/gpu/drm/i915/i915_active.h b/drivers/gpu/drm/i915/i915_active.h
index 7eb44132183a..da0c5b917cb1 100644
--- a/drivers/gpu/drm/i915/i915_active.h
+++ b/drivers/gpu/drm/i915/i915_active.h
@@ -65,7 +65,7 @@  __i915_active_fence_init(struct i915_active_fence *active,
 			 dma_fence_func_t fn)
 {
 	RCU_INIT_POINTER(active->fence, fence);
-	active->cb.func = fn ?: i915_active_noop;
+	__dma_fence_cb_init(&active->cb, fn ?: i915_active_noop);
 }
 
 #define INIT_ACTIVE_FENCE(A) \