]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/ttm: Use dma_fence_check_and_signal()
authorPhilipp Stanner <phasta@kernel.org>
Mon, 1 Dec 2025 10:50:10 +0000 (11:50 +0100)
committerPhilipp Stanner <phasta@kernel.org>
Thu, 4 Dec 2025 14:03:40 +0000 (15:03 +0100)
The return code of dma_fence_signal() is not useful and shall be removed
from the kernel. To do so, the few users who rely on the return code
must be ported.

Use dma_fence_check_and_signal() and mapp its boolean return code to
dma_fence_signal()'s former value for already-signaled fences.

Suggested-by: Christian König <christian.koenig@amd.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-8-phasta@kernel.org
drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c

index 2eda87882e657d30465b3022a5ae34ab800cef54..6d95447a989d20d60227025be874265b2b491f59 100644 (file)
@@ -692,7 +692,7 @@ static int threaded_fence_signal(void *arg)
 
        msleep(20);
 
-       return dma_fence_signal(fence);
+       return dma_fence_check_and_signal(fence) ? -EINVAL : 0;
 }
 
 static void ttm_bo_validate_move_fence_not_signaled(struct kunit *test)