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 linux dma-fence: Fix up more cal...
details: https://anonhg.NetBSD.org/src/rev/cb356579a2d7
branches: trunk
changeset: 1028485:cb356579a2d7
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:09:17 2021 +0000
description:
linux dma-fence: Fix up more callback uses.
diffstat:
sys/external/bsd/drm2/linux/linux_dma_fence.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 1d8d0d87cec6 -r cb356579a2d7 sys/external/bsd/drm2/linux/linux_dma_fence.c
--- a/sys/external/bsd/drm2/linux/linux_dma_fence.c Sun Dec 19 11:09:09 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_fence.c Sun Dec 19 11:09:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_dma_fence.c,v 1.14 2021/12/19 11:09:09 riastradh Exp $ */
+/* $NetBSD: linux_dma_fence.c,v 1.15 2021/12/19 11:09:17 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.14 2021/12/19 11:09:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.15 2021/12/19 11:09:17 riastradh Exp $");
#include <sys/atomic.h>
#include <sys/condvar.h>
@@ -330,6 +330,7 @@
return 0;
/* Otherwise, note that we've called it and call it. */
+ KASSERT(fence->ops->enable_signaling);
if (!(*fence->ops->enable_signaling)(fence)) {
/* If it failed, signal and return -ENOENT. */
dma_fence_signal_locked(fence);
@@ -766,7 +767,11 @@
KASSERT(dma_fence_referenced_p(fence));
- ret = (*fence->ops->wait)(fence, intr, MAX_SCHEDULE_TIMEOUT);
+ if (fence->ops->wait)
+ ret = (*fence->ops->wait)(fence, intr, MAX_SCHEDULE_TIMEOUT);
+ else
+ ret = dma_fence_default_wait(fence, intr,
+ MAX_SCHEDULE_TIMEOUT);
KASSERT(ret != 0);
return (ret < 0 ? ret : 0);
Home |
Main Index |
Thread Index |
Old Index