Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/linux drm: Skip enabling signalling fo...



details:   https://anonhg.NetBSD.org/src/rev/1cd1801dbbbc
branches:  trunk
changeset: 1028828:1cd1801dbbbc
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:09:27 2021 +0000

description:
drm: Skip enabling signalling for fence if already signalled.

diffstat:

 sys/external/bsd/drm2/linux/linux_dma_fence.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r beb55c1ef4e5 -r 1cd1801dbbbc sys/external/bsd/drm2/linux/linux_dma_fence.c
--- a/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:09:19 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:09:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_dma_fence.c,v 1.21 2021/12/19 12:09:19 riastradh Exp $   */
+/*     $NetBSD: linux_dma_fence.c,v 1.22 2021/12/19 12:09:27 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.21 2021/12/19 12:09:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.22 2021/12/19 12:09:27 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -465,7 +465,8 @@
        KASSERT(dma_fence_referenced_p(fence));
 
        spin_lock(fence->lock);
-       (void)dma_fence_ensure_signal_enabled(fence);
+       if ((fence->flags & (1u << DMA_FENCE_FLAG_SIGNALED_BIT)) == 0)
+               (void)dma_fence_ensure_signal_enabled(fence);
        spin_unlock(fence->lock);
 }
 



Home | Main Index | Thread Index | Old Index