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: In dma_fence_wait_timeout, ...



details:   https://anonhg.NetBSD.org/src/rev/53ab88fb27de
branches:  trunk
changeset: 1028881:53ab88fb27de
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:23:34 2021 +0000

description:
drm: In dma_fence_wait_timeout, allow MAX_SCHEDULE_TIMEOUT.

In the Linux API, this means wait forever.

diffstat:

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

diffs (38 lines):

diff -r 50efdca947c4 -r 53ab88fb27de sys/external/bsd/drm2/linux/linux_dma_fence.c
--- a/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:23:27 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:23:34 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_dma_fence.c,v 1.27 2021/12/19 12:23:27 riastradh Exp $   */
+/*     $NetBSD: linux_dma_fence.c,v 1.28 2021/12/19 12:23:34 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.27 2021/12/19 12:23:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.28 2021/12/19 12:23:34 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -816,8 +816,8 @@
  *     signalled before the timeout.  Works by calling the fence wait
  *     callback.
  *
- *     The timeout must be nonnegative and less than
- *     MAX_SCHEDULE_TIMEOUT.
+ *     The timeout must be nonnegative and at most
+ *     MAX_SCHEDULE_TIMEOUT, which means wait indefinitely.
  */
 long
 dma_fence_wait_timeout(struct dma_fence *fence, bool intr, long timeout)
@@ -825,7 +825,7 @@
 
        KASSERT(dma_fence_referenced_p(fence));
        KASSERTMSG(timeout >= 0, "timeout %ld", timeout);
-       KASSERTMSG(timeout < MAX_SCHEDULE_TIMEOUT, "timeout %ld", timeout);
+       KASSERTMSG(timeout <= MAX_SCHEDULE_TIMEOUT, "timeout %ld", timeout);
 
        if (fence->ops->wait)
                return (*fence->ops->wait)(fence, intr, timeout);



Home | Main Index | Thread Index | Old Index