Module Name: src Committed By: riastradh Date: Sun Dec 19 12:31:12 UTC 2021
Modified Files: src/sys/external/bsd/drm2/linux: linux_dma_fence.c Log Message: drm: Set fence->ops for stub fences too. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/external/bsd/drm2/linux/linux_dma_fence.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/linux/linux_dma_fence.c diff -u src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.29 src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.30 --- src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.29 Sun Dec 19 12:30:56 2021 +++ src/sys/external/bsd/drm2/linux/linux_dma_fence.c Sun Dec 19 12:31:11 2021 @@ -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 @@ dma_fence_is_later(struct dma_fence *a, 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 @@ dma_fence_get_stub(void) 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