Module Name: src Committed By: riastradh Date: Sun Dec 19 12:09:27 UTC 2021
Modified Files: src/sys/external/bsd/drm2/linux: linux_dma_fence.c Log Message: drm: Skip enabling signalling for fence if already signalled. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm2/linux/linux_dma_fence.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/linux/linux_dma_fence.c diff -u src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.21 src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.22 --- src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.21 Sun Dec 19 12:09:19 2021 +++ src/sys/external/bsd/drm2/linux/linux_dma_fence.c Sun Dec 19 12:09:27 2021 @@ -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 @@ dma_fence_enable_sw_signaling(struct dma 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); }