dma-buf/dma-fence: Add dma_fence_test_signaled_flag()

The dma_fence framework checks at many places whether the signaled flag
of a fence is already set. The code can be simplified and made more
readable by providing a helper function for that.

Add dma_fence_test_signaled_flag(), which only checks whether a fence is
signaled. Use it internally.

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20251201105011.19386-3-phasta@kernel.org
This commit is contained in:
Philipp Stanner 2025-12-01 11:50:05 +01:00
commit e58b4dea90
2 changed files with 30 additions and 10 deletions