[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251201105011.19386-2-phasta@kernel.org>
Date: Mon, 1 Dec 2025 11:50:04 +0100
From: Philipp Stanner <phasta@...nel.org>
To: Sumit Semwal <sumit.semwal@...aro.org>,
Gustavo Padovan <gustavo@...ovan.org>,
Christian König <christian.koenig@....com>,
Felix Kuehling <Felix.Kuehling@....com>,
Alex Deucher <alexander.deucher@....com>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tursulin@...ulin.net>,
Huang Rui <ray.huang@....com>,
Matthew Auld <matthew.auld@...el.com>,
Matthew Brost <matthew.brost@...el.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Lucas De Marchi <lucas.demarchi@...el.com>,
Thomas Hellström <thomas.hellstrom@...ux.intel.com>
Cc: linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
amd-gfx@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org,
intel-xe@...ts.freedesktop.org,
Philipp Stanner <phasta@...nel.org>
Subject: [PATCH 0/6] dma-fence: Remove return code of dma_fence_signal() et al.
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
drm/xe: Use dma_fence_test_signaled_flag()
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(-)
--
2.49.0
Powered by blists - more mailing lists