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/drm Make ourselves less dependent on d...
details: https://anonhg.NetBSD.org/src/rev/c5995ebc7ddb
branches: trunk
changeset: 1028225:c5995ebc7ddb
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 09:52:00 2021 +0000
description:
Make ourselves less dependent on drmP.h, removed upstream.
This causes some trouble as CONFIG_* lines might not be appropriately
defined. A few declarations remain in drmP.h so it's not gone.
Author: Maya Rashish <maya%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/drm_internal.h | 3 ++-
sys/external/bsd/drm2/dist/include/drm/drm_pci.h | 3 ++-
sys/external/bsd/drm2/drm/drm_agp_hook.c | 8 ++++----
sys/external/bsd/drm2/drm/drm_cache.c | 6 +++---
sys/external/bsd/drm2/drm/drm_cdevsw.c | 5 +++--
sys/external/bsd/drm2/drm/drm_file.c | 7 ++++---
sys/external/bsd/drm2/drm/drm_gem_cma_helper.c | 9 ++++++---
sys/external/bsd/drm2/drm/drm_gem_vm.c | 6 +++---
sys/external/bsd/drm2/drm/drm_lock.c | 7 +++----
sys/external/bsd/drm2/drm/drm_memory.c | 8 +++++---
sys/external/bsd/drm2/drm/drm_module.c | 9 ++++++---
11 files changed, 41 insertions(+), 30 deletions(-)
diffs (291 lines):
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/dist/drm/drm_internal.h
--- a/sys/external/bsd/drm2/dist/drm/drm_internal.h Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_internal.h Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_internal.h,v 1.9 2021/12/19 01:03:22 riastradh Exp $ */
+/* $NetBSD: drm_internal.h,v 1.10 2021/12/19 09:52:00 riastradh Exp $ */
/*
* Copyright © 2014 Intel Corporation
@@ -23,6 +23,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <linux/kernel.h>
#include <drm/drm_ioctl.h>
#define DRM_IF_MAJOR 1
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/dist/include/drm/drm_pci.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_pci.h Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_pci.h Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_pci.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $ */
+/* $NetBSD: drm_pci.h,v 1.3 2021/12/19 09:52:00 riastradh Exp $ */
/*
* Internal Header for the Direct Rendering Manager
@@ -35,6 +35,7 @@
#define _DRM_PCI_H_
#include <linux/pci.h>
+#include <drm/drm_os_netbsd.h>
struct drm_dma_handle;
struct drm_device;
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_agp_hook.c
--- a/sys/external/bsd/drm2/drm/drm_agp_hook.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_agp_hook.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_agp_hook.c,v 1.5 2021/12/19 00:48:45 riastradh Exp $ */
+/* $NetBSD: drm_agp_hook.c,v 1.6 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_agp_hook.c,v 1.5 2021/12/19 00:48:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_agp_hook.c,v 1.6 2021/12/19 09:52:00 riastradh Exp $");
#include <sys/types.h>
#include <sys/condvar.h>
@@ -38,8 +38,8 @@
#include <sys/mutex.h>
#include <sys/once.h>
-#include <drm/drmP.h>
-
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_drv.h>
#include "../dist/drm/drm_internal.h"
static struct {
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_cache.c
--- a/sys/external/bsd/drm2/drm/drm_cache.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_cache.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_cache.c,v 1.15 2021/12/19 00:49:36 riastradh Exp $ */
+/* $NetBSD: drm_cache.c,v 1.16 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.15 2021/12/19 00:49:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.16 2021/12/19 09:52:00 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -38,9 +38,9 @@
#include <uvm/uvm_extern.h>
+#include <linux/highmem.h>
#include <linux/mm_types.h>
-#include <drm/drmP.h>
#include <drm/drm_cache.h>
#if !defined(__arm__) && !defined(__aarch64__)
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_cdevsw.c
--- a/sys/external/bsd/drm2/drm/drm_cdevsw.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_cdevsw.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_cdevsw.c,v 1.22 2021/12/19 01:59:34 riastradh Exp $ */
+/* $NetBSD: drm_cdevsw.c,v 1.23 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_cdevsw.c,v 1.22 2021/12/19 01:59:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_cdevsw.c,v 1.23 2021/12/19 09:52:00 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -60,6 +60,7 @@
#include <drm/drmP.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
+#include <drm/drm_irq.h>
#include <drm/drm_legacy.h>
#include "../dist/drm/drm_internal.h"
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_file.c
--- a/sys/external/bsd/drm2/drm/drm_file.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_file.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_file.c,v 1.3 2021/12/19 09:46:40 riastradh Exp $ */
+/* $NetBSD: drm_file.c,v 1.4 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,12 +30,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_file.c,v 1.3 2021/12/19 09:46:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_file.c,v 1.4 2021/12/19 09:52:00 riastradh Exp $");
#include <sys/param.h>
#include <sys/select.h>
-#include <drm/drmP.h>
+#include <linux/capability.h>
+
#include <drm/drm_drv.h>
#include <drm/drm_legacy.h>
#include <drm/drm_file.h>
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_gem_cma_helper.c
--- a/sys/external/bsd/drm2/drm/drm_gem_cma_helper.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_gem_cma_helper.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_gem_cma_helper.c,v 1.12 2021/12/19 09:49:08 riastradh Exp $ */
+/* $NetBSD: drm_gem_cma_helper.c,v 1.13 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,9 +27,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_gem_cma_helper.c,v 1.12 2021/12/19 09:49:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_gem_cma_helper.c,v 1.13 2021/12/19 09:52:00 riastradh Exp $");
-#include <drm/drmP.h>
+#include <linux/err.h>
+
+#include <drm/drm_drv.h>
+#include <drm/drm_print.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/bus_dma_hacks.h>
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_gem_vm.c
--- a/sys/external/bsd/drm2/drm/drm_gem_vm.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_gem_vm.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_gem_vm.c,v 1.13 2021/12/19 09:49:31 riastradh Exp $ */
+/* $NetBSD: drm_gem_vm.c,v 1.14 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,14 +30,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_gem_vm.c,v 1.13 2021/12/19 09:49:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_gem_vm.c,v 1.14 2021/12/19 09:52:00 riastradh Exp $");
#include <sys/types.h>
#include <sys/file.h>
+#include <sys/mman.h>
#include <uvm/uvm_extern.h>
-#include <drm/drmP.h>
#include <drm/drm_drv.h>
#include <drm/drm_gem.h>
#include <drm/drm_legacy.h>
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_lock.c
--- a/sys/external/bsd/drm2/drm/drm_lock.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_lock.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_lock.c,v 1.11 2021/12/19 09:49:24 riastradh Exp $ */
+/* $NetBSD: drm_lock.c,v 1.12 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -46,15 +46,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_lock.c,v 1.11 2021/12/19 09:49:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_lock.c,v 1.12 2021/12/19 09:52:00 riastradh Exp $");
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/file.h>
#include <sys/systm.h>
-#include <drm/drmP.h>
-
+#include <drm/drm_print.h>
#include "../dist/drm/drm_internal.h"
#include "../dist/drm/drm_legacy.h"
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_memory.c
--- a/sys/external/bsd/drm2/drm/drm_memory.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_memory.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_memory.c,v 1.13 2018/08/27 15:32:06 riastradh Exp $ */
+/* $NetBSD: drm_memory.c,v 1.14 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.13 2018/08/27 15:32:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.14 2021/12/19 09:52:00 riastradh Exp $");
#if defined(__i386__) || defined(__x86_64__)
@@ -71,8 +71,10 @@
#include <dev/wsfb/genfbvar.h>
#endif
+#include <drm/drm_drv.h>
+#include <drm/drm_legacy.h>
+#include <drm/drm_pci.h>
#include <drm/drmP.h>
-#include <drm/drm_legacy.h>
/*
* XXX drm_bus_borrow is a horrible kludge!
diff -r bc0d906e4980 -r c5995ebc7ddb sys/external/bsd/drm2/drm/drm_module.c
--- a/sys/external/bsd/drm2/drm/drm_module.c Sun Dec 19 09:51:50 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_module.c Sun Dec 19 09:52:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_module.c,v 1.22 2021/12/19 09:50:42 riastradh Exp $ */
+/* $NetBSD: drm_module.c,v 1.23 2021/12/19 09:52:00 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.22 2021/12/19 09:50:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.23 2021/12/19 09:52:00 riastradh Exp $");
#include <sys/types.h>
#include <sys/condvar.h>
@@ -45,10 +45,13 @@
#include <linux/mutex.h>
#include <drm/drmP.h>
+#include <drm/drm_agpsupport.h>
#include <drm/drm_bridge.h>
#include <drm/drm_encoder_slave.h>
+#include <drm/drm_global.h>
#include <drm/drm_sysctl.h>
#include <drm/drm_panel.h>
+#include <drm/drm_print.h>
#include "../dist/drm/drm_crtc_internal.h"
#include "../dist/drm/drm_internal.h"
@@ -119,7 +122,7 @@
#endif
if (ISSET(boothowto, AB_DEBUG))
- drm_debug = DRM_UT_CORE | DRM_UT_DRIVER | DRM_UT_KMS;
+ __drm_debug = DRM_UT_CORE | DRM_UT_DRIVER | DRM_UT_KMS;
spin_lock_init(&drm_minor_lock);
idr_init(&drm_minors_idr);
Home |
Main Index |
Thread Index |
Old Index