On Mon, 2025-12-01 at 11:50 +0100, Philipp Stanner wrote:
> Tested this with dma_buf selftests and drm_sched tests.
> 
> Changes in v2:
>   - Fix bug and don't turn the kernel into a smoking pile of ashes by
>     not setting the signaled-bit…
>   - Add functions (dma_fence_check_and_signal()) preserving the old
>     behavior of dma_fence_signal() & Co. (Felix)
>   - Use those new functions in amdkfd, xe, ttm and st-dma-fence.
>   - Be a bit less aggressive and keep the git-diff smaller.
>   - Add a patch using the flag-helper in Xe. (Matthew)
> 
> Barely anyone uses dma_fence_signal()'s (and similar functions') return
> code. Checking it is pretty much useless anyways, because what are you
> going to do if a fence was already signal it? Unsignal it and signal it
> again? ;p
> 
> Removing the return code simplifies the API and makes it easier for me
> to sit on top with Rust DmaFence.
> 
> Philipp Stanner (8):
>   dma-buf/dma-fence: Add dma_fence_test_signaled_flag()
>   dma-buf/dma-fence: Add dma_fence_check_and_signal()
>   amd/amdkfd: Use dma_fence_check_and_signal()
>   drm/xe: Use dma_fence_check_and_signal_locked()
>   dma-buf: Don't misuse dma_fence_signal()
>   drm/ttm: Use dma_fence_check_and_signal()
>   dma-buf/dma-fence: Remove return code of signaling-functions

Applied those 7 patches to drm-misc-next. Had to do a tiny rebase
because 033559473dd3b55558b535aa37b8848c207b5cbb is not yet in drm-
misc-next (dma-fence series was based on master at first, which
contains that commit).

>   drm/xe: Use dma_fence_test_signaled_flag()

Left for Matthow to pick up whenever he wishes.


P.

> 
>  drivers/dma-buf/dma-fence.c                   | 100 +++++++++++-------
>  drivers/dma-buf/st-dma-fence.c                |   4 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   6 +-
>  .../gpu/drm/ttm/tests/ttm_bo_validate_test.c  |   2 +-
>  drivers/gpu/drm/xe/xe_exec_queue.c            |   9 +-
>  drivers/gpu/drm/xe/xe_hw_fence.c              |   4 +-
>  drivers/gpu/drm/xe/xe_pt.c                    |   3 +-
>  drivers/gpu/drm/xe/xe_sched_job.c             |   2 +-
>  include/linux/dma-fence.h                     |  35 ++++--
>  9 files changed, 102 insertions(+), 63 deletions(-)
> 

Reply via email to