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: Set fence->ops for stub fen...



details:   https://anonhg.NetBSD.org/src/rev/a30be4b77c68
branches:  trunk
changeset: 1028935:a30be4b77c68
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:31:11 2021 +0000

description:
drm: Set fence->ops for stub fences too.

diffstat:

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

diffs (44 lines):

diff -r ace925595384 -r a30be4b77c68 sys/external/bsd/drm2/linux/linux_dma_fence.c
--- a/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:31:04 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 12:31:11 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_dma_fence.c,v 1.29 2021/12/19 12:30:56 riastradh Exp $   */
+/*     $NetBSD: linux_dma_fence.c,v 1.30 2021/12/19 12:31:11 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.29 2021/12/19 12:30:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.30 2021/12/19 12:31:11 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -221,6 +221,17 @@
        return a->seqno - b->seqno < INT_MAX;
 }
 
+static const char *dma_fence_stub_name(struct dma_fence *f)
+{
+
+       return "stub";
+}
+
+static const struct dma_fence_ops dma_fence_stub_ops = {
+       .get_driver_name = dma_fence_stub_name,
+       .get_timeline_name = dma_fence_stub_name,
+};
+
 /*
  * dma_fence_get_stub()
  *
@@ -238,6 +249,7 @@
        static struct dma_fence fence = {
                .refcount = {1}, /* always referenced */
                .flags = 1u << DMA_FENCE_FLAG_SIGNALED_BIT,
+               .ops = &dma_fence_stub_ops,
 #ifdef DIAGNOSTIC
                .f_magic = FENCE_MAGIC_GOOD,
 #endif



Home | Main Index | Thread Index | Old Index