On 24/06/2026 12:13, Christian König wrote:
Finally remove one of the biggest trouble makers in the dma_fence
handling.

The signaled callback is now consistently called without holding the
dma_fence lock.

Signed-off-by: Christian König <[email protected]>
---
  include/linux/dma-fence.h | 36 ------------------------------------
  1 file changed, 36 deletions(-)

diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
index 803e10ca76e3..ad69acbea218 100644
--- a/include/linux/dma-fence.h
+++ b/include/linux/dma-fence.h
@@ -493,40 +493,6 @@ dma_fence_test_signaled_flag(struct dma_fence *fence)
        return test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags);
  }
-/**
- * dma_fence_is_signaled_locked - Return an indication if the fence
- *                                is signaled yet.
- * @fence: the fence to check
- *
- * Returns true if the fence was already signaled, false if not. Since this
- * function doesn't enable signaling, it is not guaranteed to ever return
- * true if dma_fence_add_callback(), dma_fence_wait() or
- * dma_fence_enable_sw_signaling() haven't been called before.
- *
- * This function requires &dma_fence.lock to be held.
- *
- * See also dma_fence_is_signaled().
- */
-static inline bool
-dma_fence_is_signaled_locked(struct dma_fence *fence)
-{
-       const struct dma_fence_ops *ops;
-
-       if (dma_fence_test_signaled_flag(fence))
-               return true;
-
-       rcu_read_lock();
-       ops = rcu_dereference(fence->ops);
-       if (ops && ops->signaled && ops->signaled(fence)) {
-               rcu_read_unlock();
-               dma_fence_signal_locked(fence);
-               return true;
-       }
-       rcu_read_unlock();
-
-       return false;
-}
-
  /**
   * dma_fence_is_signaled - Return an indication if the fence is signaled yet.
   * @fence: the fence to check
@@ -540,8 +506,6 @@ dma_fence_is_signaled_locked(struct dma_fence *fence)
   * operation is complete, it makes it possible to prevent issues from
   * wraparound between time of issue and time of use by checking the return
   * value of this function before calling hardware-specific wait instructions.
- *
- * See also dma_fence_is_signaled_locked().
   */
  static inline bool
  dma_fence_is_signaled(struct dma_fence *fence)

Assuming the rest of the series plays out to this point:

Reviewed-by: Tvrtko Ursulin <[email protected]>

Regards,

Tvrtko

Reply via email to