drivers/dma-buf/dma-fence.c | 59 ++++++------------- drivers/dma-buf/st-dma-fence.c | 7 +-- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 3 +- drivers/gpu/drm/xe/xe_hw_fence.c | 5 +- include/linux/dma-fence.h | 33 ++++++++--- 6 files changed, 53 insertions(+), 59 deletions(-)
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 (6): dma-buf/dma-fence: Add dma_fence_test_signaled_flag() amd/amdkfd: Ignore return code of dma_fence_signal() drm/gpu/xe: Ignore dma_fenc_signal() return code dma-buf: Don't misuse dma_fence_signal() drm/ttm: Remove return check of dma_fence_signal() dma-buf/dma-fence: Remove return code of signaling-functions drivers/dma-buf/dma-fence.c | 59 ++++++------------- drivers/dma-buf/st-dma-fence.c | 7 +-- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 3 +- drivers/gpu/drm/xe/xe_hw_fence.c | 5 +- include/linux/dma-fence.h | 33 ++++++++--- 6 files changed, 53 insertions(+), 59 deletions(-) -- 2.49.0
On 11/26/25 14:19, Philipp Stanner wrote: > 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 Reviewed-by: Christian König <christian.koenig@amd.com> for the entire series. Please push to drm-misc-next or leave me a note when I should pick it up. > Removing the return code simplifies the API and makes it easier for me > to sit on top with Rust DmaFence. BTW, I have an rb for embedding the lock and I'm now writing test cases. When that is done you should be able to base the Rust DmaFence abstraction on that as well. Regards, Christian. > > Philipp Stanner (6): > dma-buf/dma-fence: Add dma_fence_test_signaled_flag() > amd/amdkfd: Ignore return code of dma_fence_signal() > drm/gpu/xe: Ignore dma_fenc_signal() return code > dma-buf: Don't misuse dma_fence_signal() > drm/ttm: Remove return check of dma_fence_signal() > dma-buf/dma-fence: Remove return code of signaling-functions > > drivers/dma-buf/dma-fence.c | 59 ++++++------------- > drivers/dma-buf/st-dma-fence.c | 7 +-- > drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +- > .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 3 +- > drivers/gpu/drm/xe/xe_hw_fence.c | 5 +- > include/linux/dma-fence.h | 33 ++++++++--- > 6 files changed, 53 insertions(+), 59 deletions(-) >
On Wed, 2025-11-26 at 15:02 +0100, Christian König wrote: > On 11/26/25 14:19, Philipp Stanner wrote: > > 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 > > Reviewed-by: Christian König <christian.koenig@amd.com> for the entire series. > > Please push to drm-misc-next or leave me a note when I should pick it up. Thx! I can push it. Let's wait a while to see if some of the other folks have sth to say. > > > Removing the return code simplifies the API and makes it easier for me > > to sit on top with Rust DmaFence. > > BTW, I have an rb for embedding the lock and I'm now writing test cases. > > When that is done you should be able to base the Rust DmaFence abstraction on that as well. Yeah, thank you, that will actually help since I was in the process of solving the same life time issues in Rust. I will give your series a review ~tomorrow, too. Or should I wait for v4 with the tests? P. > > Regards, > Christian. > > > > > Philipp Stanner (6): > > dma-buf/dma-fence: Add dma_fence_test_signaled_flag() > > amd/amdkfd: Ignore return code of dma_fence_signal() > > drm/gpu/xe: Ignore dma_fenc_signal() return code > > dma-buf: Don't misuse dma_fence_signal() > > drm/ttm: Remove return check of dma_fence_signal() > > dma-buf/dma-fence: Remove return code of signaling-functions > > > > drivers/dma-buf/dma-fence.c | 59 ++++++------------- > > drivers/dma-buf/st-dma-fence.c | 7 +-- > > drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +- > > .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 3 +- > > drivers/gpu/drm/xe/xe_hw_fence.c | 5 +- > > include/linux/dma-fence.h | 33 ++++++++--- > > 6 files changed, 53 insertions(+), 59 deletions(-) > > >
On Wed, Nov 26, 2025 at 03:09:26PM +0100, Philipp Stanner wrote: > On Wed, 2025-11-26 at 15:02 +0100, Christian König wrote: > > On 11/26/25 14:19, Philipp Stanner wrote: > > > 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 > > > > Reviewed-by: Christian König <christian.koenig@amd.com> for the entire series. > > > > Please push to drm-misc-next or leave me a note when I should pick it up. > > Thx! I can push it. Let's wait a while to see if some of the other > folks have sth to say. > I think you have a small bug in patch #1 [1]. Also Intel's CI [2] is complaining, it would nice to figure that out too + get a clean(ish) run ahead of merging. Matt [1] https://patchwork.freedesktop.org/patch/690505/?series=158108&rev=1#comment_1268421 [2] https://patchwork.freedesktop.org/series/158108/ > > > > > Removing the return code simplifies the API and makes it easier for me > > > to sit on top with Rust DmaFence. > > > > BTW, I have an rb for embedding the lock and I'm now writing test cases. > > > > When that is done you should be able to base the Rust DmaFence abstraction on that as well. > > Yeah, thank you, that will actually help since I was in the process of > solving the same life time issues in Rust. > > I will give your series a review ~tomorrow, too. Or should I wait for > v4 with the tests? > > P. > > > > > Regards, > > Christian. > > > > > > > > Philipp Stanner (6): > > > dma-buf/dma-fence: Add dma_fence_test_signaled_flag() > > > amd/amdkfd: Ignore return code of dma_fence_signal() > > > drm/gpu/xe: Ignore dma_fenc_signal() return code > > > dma-buf: Don't misuse dma_fence_signal() > > > drm/ttm: Remove return check of dma_fence_signal() > > > dma-buf/dma-fence: Remove return code of signaling-functions > > > > > > drivers/dma-buf/dma-fence.c | 59 ++++++------------- > > > drivers/dma-buf/st-dma-fence.c | 7 +-- > > > drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +- > > > .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 3 +- > > > drivers/gpu/drm/xe/xe_hw_fence.c | 5 +- > > > include/linux/dma-fence.h | 33 ++++++++--- > > > 6 files changed, 53 insertions(+), 59 deletions(-) > > > > > >
© 2016 - 2025 Red Hat, Inc.