Skip to contentSkip to conversation

dma-buf/reservation: should keep the new fence in add_shared_inplace

PATCH New Monk Liu 1 participant 1 message Mar 5, 2018 DMA buffer sharing framework

lore
Share & tools
lore

Monk Liu

author
#0 lore raw

PATCH 1/1 dma-buf/reservation: should keep the new fence in add_shared_inplace

Change-Id If6a979ba9fd6c923b82212f35f07a9ff31c86767
---
 drivers/dma-buf/reservation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/reservation.c +1 -1
index 375de41..9b875267 100644
@@ -118,7 +118,7 @@ reservation_object_add_shared_inplace(struct reservation_object *obj,
 		old_fence = rcu_dereference_protected(fobj->shared[i],
 						reservation_object_held(obj));
 
-		if (old_fence->context == fence->context) {
+		if (dma_fence_is_later(fence, old_fence)) {
 			/* memory barrier is added by write_seqcount_begin */
 			RCU_INIT_POINTER(fobj->shared[i], fence);
 			write_seqcount_end(&obj->seq);
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx