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 Fence release callback may be ab...



details:   https://anonhg.NetBSD.org/src/rev/9a04656411e1
branches:  trunk
changeset: 366213:9a04656411e1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 13:56:34 2018 +0000

description:
Fence release callback may be absent; default to fence_free.

diffstat:

 sys/external/bsd/drm2/linux/linux_fence.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 116e374bb9bc -r 9a04656411e1 sys/external/bsd/drm2/linux/linux_fence.c
--- a/sys/external/bsd/drm2/linux/linux_fence.c Mon Aug 27 13:56:22 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_fence.c Mon Aug 27 13:56:34 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_fence.c,v 1.2 2018/08/27 13:36:53 riastradh Exp $        */
+/*     $NetBSD: linux_fence.c,v 1.3 2018/08/27 13:56:34 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.2 2018/08/27 13:36:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.3 2018/08/27 13:56:34 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -155,7 +155,10 @@
 {
        struct fence *fence = container_of(refcount, struct fence, refcount);
 
-       (*fence->ops->release)(fence);
+       if (fence->ops->release)
+               (*fence->ops->release)(fence);
+       else
+               fence_free(fence);
 }
 
 /*



Home | Main Index | Thread Index | Old Index