diff mbox series

[v3,1/6] dma-buf: Remove the signaled bit status check

Message ID 20220909170845.4946-2-Arvind.Yadav@amd.com
State Accepted
Commit 6ad9aa476ce23be45de9dcb03edcdbfdf6117c25
Headers show
Series dma-buf: Check status of enable-signaling bit on debug | expand

Commit Message

Arvind Yadav Sept. 9, 2022, 5:08 p.m. UTC
Remove the signaled bit status check because it is returning
early when the fence is already signaled and
__dma_fence_enable_signaling is checking the status of signaled
bit again.

Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com>
---

Changes in v1, v2: This new patch was not part of previous series.

---
 drivers/dma-buf/dma-fence.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Christian König Sept. 12, 2022, 6:44 a.m. UTC | #1
Am 09.09.22 um 19:08 schrieb Arvind Yadav:
> Remove the signaled bit status check because it is returning
> early when the fence is already signaled and
> __dma_fence_enable_signaling is checking the status of signaled
> bit again.
>
> Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>
> Changes in v1, v2: This new patch was not part of previous series.
>
> ---
>   drivers/dma-buf/dma-fence.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
> index 066400ed8841..64c99739ad23 100644
> --- a/drivers/dma-buf/dma-fence.c
> +++ b/drivers/dma-buf/dma-fence.c
> @@ -601,9 +601,6 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence)
>   {
>   	unsigned long flags;
>   
> -	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
> -		return;
> -
>   	spin_lock_irqsave(fence->lock, flags);
>   	__dma_fence_enable_signaling(fence);
>   	spin_unlock_irqrestore(fence->lock, flags);
diff mbox series

Patch

diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 066400ed8841..64c99739ad23 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -601,9 +601,6 @@  void dma_fence_enable_sw_signaling(struct dma_fence *fence)
 {
 	unsigned long flags;
 
-	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
-		return;
-
 	spin_lock_irqsave(fence->lock, flags);
 	__dma_fence_enable_signaling(fence);
 	spin_unlock_irqrestore(fence->lock, flags);