Skip to contentSkip to conversation

dma-buf: actually set signaling bit for private sub fences

PATCH In review Danilo Krummrich 3 participants 5 messages Jan 26, 2023 – Feb 1, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma-buf: actually set signaling bit for private sub fences

In dma_fence_allocate_private_stub() set the signaling bit of the newly allocated private stub fence rather than the signaling bit of the shared dma_fence_stub.

Fixes c85d00d4fd8b ("dma-buf: set signaling bit for the stub fence")
---
 drivers/dma-buf/dma-fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/dma-fence.c +1 -1
index 406b4e26f538..0de0482cd36e 100644
@@ -167,7 +167,7 @@ struct dma_fence *dma_fence_allocate_private_stub(void)
 		       0, 0);
 
 	set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-		&dma_fence_stub.flags);
+		&fence->flags);
 
 	dma_fence_signal(fence);
 
Signature · 1 line
2.39.1
maintainer
#1 lore raw

Am 26.01.23 um 01:28 schrieb Danilo Krummrich:

Quoted 6 lines

In dma_fence_allocate_private_stub() set the signaling bit of the newly allocated private stub fence rather than the signaling bit of the shared dma_fence_stub.

Fixes c85d00d4fd8b ("dma-buf: set signaling bit for the stub fence")

Good catch, Reviewed-by: Christian König <[email protected]>

Should I push it upstream as well or do you have commit access?

Quoted 17 lines
---
  drivers/dma-buf/dma-fence.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/dma-fence.c +1 -1
index 406b4e26f538..0de0482cd36e 100644
@@ -167,7 +167,7 @@ struct dma_fence *dma_fence_allocate_private_stub(void)
  		       0, 0);
 
  	set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-		&dma_fence_stub.flags);
+		&fence->flags);
 
  	dma_fence_signal(fence);
 
#2 lore raw
Quoted 11 lines · Christian König

Am 26.01.23 um 01:28 schrieb Danilo Krummrich:

Quoted 6 lines

In dma_fence_allocate_private_stub() set the signaling bit of the newly allocated private stub fence rather than the signaling bit of the shared dma_fence_stub.

Fixes c85d00d4fd8b ("dma-buf: set signaling bit for the stub fence")

Good catch, Reviewed-by: Christian König <[email protected]>

Should I push it upstream as well or do you have commit access?

Thanks, I can push it to drm-misc-next.

Quoted 17 lines
Quoted 16 lines

---
  drivers/dma-buf/dma-fence.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/dma-fence.c +1 -1
index 406b4e26f538..0de0482cd36e 100644
@@ -167,7 +167,7 @@ struct dma_fence 
 *dma_fence_allocate_private_stub(void)
                  0, 0);
       set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-        &dma_fence_stub.flags);
+        &fence->flags);
       dma_fence_signal(fence);
maintainer
#3 lore raw

Am 26.01.23 um 23:25 schrieb Danilo Krummrich:

Quoted 6 lines · Christian König
Quoted 5 lines

Am 26.01.23 um 01:28 schrieb Danilo Krummrich:

Quoted 4 lines

In dma_fence_allocate_private_stub() set the signaling bit of the newly allocated private stub fence rather than the signaling bit of the shared dma_fence_stub.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Fixes c85d00d4fd8b ("dma-buf: set signaling bit for the stub fence")

Good catch, Reviewed-by: Christian König <[email protected]>

Should I push it upstream as well or do you have commit access?

Thanks, I can push it to drm-misc-next.

This is clearly a bug fix so better push this to drm-misc-fixes and maybe even add a CC:stable tag.

Christian.

Quoted 19 lines
Quoted 18 lines
Quoted 17 lines

---
  drivers/dma-buf/dma-fence.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/dma-fence.c +1 -1
index 406b4e26f538..0de0482cd36e 100644
@@ -167,7 +167,7 @@ struct dma_fence 
 *dma_fence_allocate_private_stub(void)
                  0, 0);
       set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-        &dma_fence_stub.flags);
+        &fence->flags);
       dma_fence_signal(fence);
#4 lore raw

Am 27.01.23 um 08:49 schrieb Christian König:

Quoted 10 lines

Am 26.01.23 um 23:25 schrieb Danilo Krummrich:

Quoted 9 lines · Christian König
Quoted 8 lines

Am 26.01.23 um 01:28 schrieb Danilo Krummrich:

Quoted 6 lines

In dma_fence_allocate_private_stub() set the signaling bit of the newly allocated private stub fence rather than the signaling bit of the shared dma_fence_stub.

Fixes c85d00d4fd8b ("dma-buf: set signaling bit for the stub fence")
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Good catch, Reviewed-by: Christian König <[email protected]>

Should I push it upstream as well or do you have commit access?

Thanks, I can push it to drm-misc-next.

This is clearly a bug fix so better push this to drm-misc-fixes and maybe even add a CC:stable tag.

I have cherry-picked the patch into drm-misc-next-fixes.

Quoted 23 lines

Christian.

Quoted 19 lines
Quoted 18 lines
Quoted 17 lines

---
  drivers/dma-buf/dma-fence.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/dma-fence.c +1 -1
index 406b4e26f538..0de0482cd36e 100644
@@ -167,7 +167,7 @@ struct dma_fence 
 *dma_fence_allocate_private_stub(void)
                  0, 0);
       set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
-        &dma_fence_stub.flags);
+        &fence->flags);
       dma_fence_signal(fence);
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev