Module Name: src Committed By: riastradh Date: Sun Dec 19 00:26:41 UTC 2021
Modified Files: src/sys/external/bsd/drm2/i915drm: files.i915drmkms Added Files: src/sys/external/bsd/drm2/i915drm: i915_sw_fence.c i915_sw_fence.h Log Message: Stub i915_sw_fence.c. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/external/bsd/drm2/i915drm/files.i915drmkms cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/i915drm/i915_sw_fence.c \ src/sys/external/bsd/drm2/i915drm/i915_sw_fence.h 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/i915drm/files.i915drmkms diff -u src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.43 src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.44 --- src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.43 Sun Dec 19 00:26:16 2021 +++ src/sys/external/bsd/drm2/i915drm/files.i915drmkms Sun Dec 19 00:26:41 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.i915drmkms,v 1.43 2021/12/19 00:26:16 riastradh Exp $ +# $NetBSD: files.i915drmkms,v 1.44 2021/12/19 00:26:41 riastradh Exp $ version 20180827 @@ -36,6 +36,7 @@ makeoptions i915drmkms "CWARNFLAGS.int file external/bsd/drm2/i915drm/i915_gem_userptr.c i915drmkms file external/bsd/drm2/i915drm/i915_module.c i915drmkms file external/bsd/drm2/i915drm/i915_pci.c i915drmkms +file external/bsd/drm2/i915drm/i915_sw_fence.c i915drmkms file external/bsd/drm2/i915drm/i915_sysfs.c i915drmkms file external/bsd/drm2/i915drm/intel_dsi.c i915drmkms file external/bsd/drm2/i915drm/intel_gtt.c i915drmkms @@ -189,7 +190,7 @@ file external/bsd/drm2/dist/drm/i915/i91 file external/bsd/drm2/dist/drm/i915/i915_scatterlist.c i915drmkms file external/bsd/drm2/dist/drm/i915/i915_scheduler.c i915drmkms file external/bsd/drm2/dist/drm/i915/i915_suspend.c i915drmkms -file external/bsd/drm2/dist/drm/i915/i915_sw_fence.c i915drmkms +#file external/bsd/drm2/dist/drm/i915/i915_sw_fence.c i915drmkms file external/bsd/drm2/dist/drm/i915/i915_sw_fence_work.c i915drmkms file external/bsd/drm2/dist/drm/i915/i915_switcheroo.c i915drmkms file external/bsd/drm2/dist/drm/i915/i915_syncmap.c i915drmkms Added files: Index: src/sys/external/bsd/drm2/i915drm/i915_sw_fence.c diff -u /dev/null src/sys/external/bsd/drm2/i915drm/i915_sw_fence.c:1.1 --- /dev/null Sun Dec 19 00:26:41 2021 +++ src/sys/external/bsd/drm2/i915drm/i915_sw_fence.c Sun Dec 19 00:26:41 2021 @@ -0,0 +1,35 @@ +/* $NetBSD: i915_sw_fence.c,v 1.1 2021/12/19 00:26:41 riastradh Exp $ */ + +/*- + * Copyright (c) 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Taylor R. Campbell. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__KERNEL_RCSID(0, "$NetBSD: i915_sw_fence.c,v 1.1 2021/12/19 00:26:41 riastradh Exp $"); + +#include "i915_sw_fence.h" Index: src/sys/external/bsd/drm2/i915drm/i915_sw_fence.h diff -u /dev/null src/sys/external/bsd/drm2/i915drm/i915_sw_fence.h:1.1 --- /dev/null Sun Dec 19 00:26:41 2021 +++ src/sys/external/bsd/drm2/i915drm/i915_sw_fence.h Sun Dec 19 00:26:41 2021 @@ -0,0 +1,61 @@ +/* $NetBSD: i915_sw_fence.h,v 1.1 2021/12/19 00:26:41 riastradh Exp $ */ + +/*- + * Copyright (c) 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Taylor R. Campbell. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _I915DRM_I915_SW_FENCE_H_ +#define _I915DRM_I915_SW_FENCE_H_ + +#include <sys/cdefs.h> +#include <sys/types.h> + +struct dma_fence_ops; +struct i915_sw_fence; +struct reservation_object; + +struct i915_sw_fence { +}; + +enum i915_sw_fence_notify { + FENCE_COMPLETE, + FENCE_FREE, +}; + +#define __i915_sw_fence_call __aligned(4) + +void i915_sw_fence_init(struct i915_sw_fence *, + int (*)(struct i915_sw_fence *, enum i915_sw_fence_notify)); +void i915_sw_fence_fini(struct i915_sw_fence *); + +void i915_sw_fence_await_reservation(struct i915_sw_fence *, + struct reservation_object *, const struct dma_fence_ops *, bool, + unsigned long, gfp_t); +void i915_sw_fence_commit(struct i915_sw_fence *); + +#endif /* _I915DRM_I915_SW_FENCE_H_ */