Re: [PATCH] dma-buf/reservation: should keep the new fence in add_shared_inplace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2018年03月06日 11:09, Monk Liu wrote:
Change-Id: If6a979ba9fd6c923b82212f35f07a9ff31c86767
Signed-off-by: Monk Liu <Monk.Liu@xxxxxxx>
---
  drivers/dma-buf/reservation.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index 314eb10..29b7e45 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -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)) {
OK, good catch, to avoid warning of different context, which should be "if ((old_fence->context == fence->context) && dma_fence_is_later(fence, old_fence)) { "
and reservation_object_add_shared_replace need this fix as well.

Regards,
David Zhou
  			/* memory barrier is added by write_seqcount_begin */
  			RCU_INIT_POINTER(fobj->shared[i], fence);
  			write_seqcount_end(&obj->seq);

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux