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: Fix signalling return value...



details:   https://anonhg.NetBSD.org/src/rev/8bca32e408a5
branches:  trunk
changeset: 1028980:8bca32e408a5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:38:06 2021 +0000

description:
drm: Fix signalling return value if no enable_signaling op.

diffstat:

 sys/external/bsd/drm2/linux/linux_dma_fence.c |  20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diffs (42 lines):

diff -r 596b23db0eb5 -r 8bca32e408a5 sys/external/bsd/drm2/linux/linux_dma_fence.c
--- a/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:37:54 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:38:06 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_dma_fence.c,v 1.34 2021/12/19 12:35:21 riastradh Exp $   */
+/*     $NetBSD: linux_dma_fence.c,v 1.35 2021/12/19 12:38:06 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.34 2021/12/19 12:35:21 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.35 2021/12/19 12:38:06 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -406,16 +406,14 @@
 
        /*
         * Otherwise, if it wasn't enabled yet, try to enable
-        * signalling, or fail if the fence doesn't support that.
+        * signalling.
         */
-       if (!already_enabled) {
-               if (fence->ops->enable_signaling == NULL)
-                       return -ENOENT;
-               if (!(*fence->ops->enable_signaling)(fence)) {
-                       /* If it failed, signal and return -ENOENT.  */
-                       dma_fence_signal_locked(fence);
-                       return -ENOENT;
-               }
+       if (!already_enabled &&
+           fence->ops->enable_signaling &&
+           !(*fence->ops->enable_signaling)(fence)) {
+               /* If it failed, signal and return -ENOENT.  */
+               dma_fence_signal_locked(fence);
+               return -ENOENT;
        }
 
        /* Success!  */



Home | Main Index | Thread Index | Old Index