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: Add a kassert for fence des...



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

description:
drm: Add a kassert for fence destruction.

diffstat:

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

diffs (27 lines):

diff -r 911e263bdc99 -r 27d99bc524db sys/external/bsd/drm2/linux/linux_dma_fence.c
--- a/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:09:43 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:09:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_dma_fence.c,v 1.22 2021/12/19 12:09:27 riastradh Exp $   */
+/*     $NetBSD: linux_dma_fence.c,v 1.23 2021/12/19 12:09:51 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.22 2021/12/19 12:09:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.23 2021/12/19 12:09:51 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -306,6 +306,8 @@
        struct dma_fence *fence = container_of(refcount, struct dma_fence,
            refcount);
 
+       KASSERTMSG(TAILQ_EMPTY(&fence->f_callbacks),
+           "fence %p has pending callbacks", fence);
        KASSERT(!dma_fence_referenced_p(fence));
 
        if (fence->ops->release)



Home | Main Index | Thread Index | Old Index