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/include/drm Move drm_io_mapping_* to i...
details: https://anonhg.NetBSD.org/src/rev/1c7db3e6f637
branches: trunk
changeset: 1028297:1c7db3e6f637
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 10:28:52 2021 +0000
description:
Move drm_io_mapping_* to its own header file.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c | 8 ++-
sys/external/bsd/drm2/include/drm/drmP.h | 24 +---------
sys/external/bsd/drm2/include/drm/io-mapping.h | 50 +++++++++++++++++++++
3 files changed, 57 insertions(+), 25 deletions(-)
diffs (118 lines):
diff -r 588b7134b4bc -r 1c7db3e6f637 sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c Sun Dec 19 10:28:41 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c Sun Dec 19 10:28:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_ggtt.c,v 1.5 2021/12/19 10:28:31 riastradh Exp $ */
+/* $NetBSD: intel_ggtt.c,v 1.6 2021/12/19 10:28:52 riastradh Exp $ */
// SPDX-License-Identifier: MIT
/*
@@ -6,13 +6,17 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.5 2021/12/19 10:28:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.6 2021/12/19 10:28:52 riastradh Exp $");
#include <linux/stop_machine.h>
#include <asm/set_memory.h>
#include <asm/smp.h>
+#ifdef __NetBSD__
+#include <drm/io-mapping.h>
+#endif
+
#include "intel_gt.h"
#include "i915_drv.h"
#include "i915_scatterlist.h"
diff -r 588b7134b4bc -r 1c7db3e6f637 sys/external/bsd/drm2/include/drm/drmP.h
--- a/sys/external/bsd/drm2/include/drm/drmP.h Sun Dec 19 10:28:41 2021 +0000
+++ b/sys/external/bsd/drm2/include/drm/drmP.h Sun Dec 19 10:28:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drmP.h,v 1.1 2021/12/19 10:24:33 riastradh Exp $ */
+/* $NetBSD: drmP.h,v 1.2 2021/12/19 10:28:52 riastradh Exp $ */
/*
* Internal Header for the Direct Rendering Manager
@@ -153,26 +153,4 @@
extern int drm_platform_init(struct drm_driver *driver, struct platform_device *platform_device);
extern int drm_platform_set_busid(struct drm_device *d, struct drm_master *m);
-#ifdef __NetBSD__
-
-/* XXX This is pretty kludgerific. */
-
-#include <linux/io-mapping.h>
-
-static inline struct io_mapping *
-drm_io_mapping_create_wc(struct drm_device *dev, resource_size_t addr,
- unsigned long size)
-{
- return bus_space_io_mapping_create_wc(dev->bst, addr, size);
-}
-
-static inline bool
-drm_io_mapping_init_wc(struct drm_device *dev, struct io_mapping *mapping,
- resource_size_t addr, unsigned long size)
-{
- return bus_space_io_mapping_init_wc(dev->bst, mapping, addr, size);
-}
-
-#endif /* defined(__NetBSD__) */
-
#endif
diff -r 588b7134b4bc -r 1c7db3e6f637 sys/external/bsd/drm2/include/drm/io-mapping.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/drm2/include/drm/io-mapping.h Sun Dec 19 10:28:52 2021 +0000
@@ -0,0 +1,50 @@
+/* $NetBSD: io-mapping.h,v 1.1 2021/12/19 10:28:52 riastradh Exp $ */
+
+/*-
+ * Copyright (c) 2020 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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 _DRM_DRM_IO_MAPPING_H_
+#define _DRM_DRM_IO_MAPPING_H_
+
+#include <linux/io-mapping.h>
+
+#include <drm/drm_device.h>
+
+static inline struct io_mapping *
+drm_io_mapping_create_wc(struct drm_device *dev, resource_size_t addr,
+ unsigned long size)
+{
+ return bus_space_io_mapping_create_wc(dev->bst, addr, size);
+}
+
+static inline bool
+drm_io_mapping_init_wc(struct drm_device *dev, struct io_mapping *mapping,
+ resource_size_t addr, unsigned long size)
+{
+ return bus_space_io_mapping_init_wc(dev->bst, mapping, addr, size);
+}
+
+#endif /* _DRM_DRM_IO_MAPPING_H_ */
Home |
Main Index |
Thread Index |
Old Index