[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffbc86ce-6e3b-4f2b-913c-fe46225b2c4e@amd.com>
Date: Wed, 3 Dec 2025 14:11:00 +0100
From: Christian König <christian.koenig@....com>
To: Philipp Stanner <phasta@...nel.org>,
Sumit Semwal <sumit.semwal@...aro.org>, Gustavo Padovan
<gustavo@...ovan.org>, 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
Subject: Re: [PATCH v2 5/8] dma-buf: Don't misuse dma_fence_signal()
On 12/1/25 11:50, Philipp Stanner wrote:
> The return code of dma_fence_signal() is not really useful as there is
> nothing reasonable to do if a fence was already signaled. That return
> code shall be removed from the kernel.
>
> Moreover, dma_fence_signal() should not be used to check whether fences
> are signaled. That's what dma_fence_is_signaled() and
> dma_fence_test_signaled_flag() exist for.
>
> Replace the non-canonical usage of dma_fence_signal().
>
> Suggested-by: Christian König <christian.koenig@....com>
> Signed-off-by: Philipp Stanner <phasta@...nel.org>
Reviewed-by: Christian König <christian.koenig@....com>
> ---
> drivers/dma-buf/st-dma-fence.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/st-dma-fence.c b/drivers/dma-buf/st-dma-fence.c
> index 27a36045410b..4dbe39c58bfb 100644
> --- a/drivers/dma-buf/st-dma-fence.c
> +++ b/drivers/dma-buf/st-dma-fence.c
> @@ -126,7 +126,7 @@ static int test_signaling(void *arg)
> goto err_free;
> }
>
> - if (dma_fence_signal(f)) {
> + if (dma_fence_check_and_signal(f)) {
> pr_err("Fence reported being already signaled\n");
> goto err_free;
> }
> @@ -136,7 +136,7 @@ static int test_signaling(void *arg)
> goto err_free;
> }
>
> - if (!dma_fence_signal(f)) {
> + if (!dma_fence_test_signaled_flag(f)) {
> pr_err("Fence reported not being already signaled\n");
> goto err_free;
> }
Powered by blists - more mailing lists