Module Name: src
Committed By: riastradh
Date: Mon Aug 27 06:06:42 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_dp_mst_helper.h
src/sys/external/bsd/drm2/include/linux: fb.h mm.h mutex.h types.h
ww_mutex.h
src/sys/external/bsd/drm2/pci: drm_pci.c
Log Message:
match linux side loading of headers
more bring in OLD drm code to unbreak the build
matching netbsd types etc. to get the build going
Author: coypu <[email protected]>
Committer: Taylor R Campbell <[email protected]>
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_dp_mst_helper.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/include/linux/fb.h
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/include/linux/mm.h
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/include/linux/mutex.h
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/include/linux/types.h
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/include/linux/ww_mutex.h
cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/drm2/pci/drm_pci.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/dist/include/drm/drm_dp_mst_helper.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_dp_mst_helper.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/drm_dp_mst_helper.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/drm_dp_mst_helper.h:1.2 Mon Aug 27 04:58:37 2018
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_dp_mst_helper.h Mon Aug 27 06:06:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_dp_mst_helper.h,v 1.2 2018/08/27 04:58:37 riastradh Exp $ */
+/* $NetBSD: drm_dp_mst_helper.h,v 1.3 2018/08/27 06:06:41 riastradh Exp $ */
/*
* Copyright © 2014 Red Hat.
@@ -456,7 +456,9 @@ struct drm_dp_mst_topology_mgr {
unsigned long payload_mask;
unsigned long vcpi_mask;
+#ifndef __NetBSD__
wait_queue_head_t tx_waitq;
+#endif
struct work_struct work;
struct work_struct tx_work;
Index: src/sys/external/bsd/drm2/include/linux/fb.h
diff -u src/sys/external/bsd/drm2/include/linux/fb.h:1.2 src/sys/external/bsd/drm2/include/linux/fb.h:1.3
--- src/sys/external/bsd/drm2/include/linux/fb.h:1.2 Tue Mar 18 18:20:43 2014
+++ src/sys/external/bsd/drm2/include/linux/fb.h Mon Aug 27 06:06:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fb.h,v 1.2 2014/03/18 18:20:43 riastradh Exp $ */
+/* $NetBSD: fb.h,v 1.3 2018/08/27 06:06:41 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,6 +32,9 @@
#ifndef _LINUX_FB_H_
#define _LINUX_FB_H_
+#include <linux/kgdb.h>
+#include <linux/notifier.h>
+
#define PICOS2KHZ(PICOS) (1000000000ul / (PICOS))
#define KHZ2PICOS(KHZ) (1000000000ul / (KHZ))
Index: src/sys/external/bsd/drm2/include/linux/mm.h
diff -u src/sys/external/bsd/drm2/include/linux/mm.h:1.6 src/sys/external/bsd/drm2/include/linux/mm.h:1.7
--- src/sys/external/bsd/drm2/include/linux/mm.h:1.6 Sun Oct 18 14:03:20 2015
+++ src/sys/external/bsd/drm2/include/linux/mm.h Mon Aug 27 06:06:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mm.h,v 1.6 2015/10/18 14:03:20 jmcneill Exp $ */
+/* $NetBSD: mm.h,v 1.7 2018/08/27 06:06:41 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,6 +35,8 @@
#include <uvm/uvm_extern.h>
#include <asm/page.h>
+#include <linux/shrinker.h>
+
struct file;
@@ -76,4 +78,10 @@ get_num_physpages(void)
return uvmexp.npages;
}
+static inline void
+kvfree(void * ptr)
+{
+ panic("Unimplemented");
+}
+
#endif /* _LINUX_MM_H_ */
Index: src/sys/external/bsd/drm2/include/linux/mutex.h
diff -u src/sys/external/bsd/drm2/include/linux/mutex.h:1.7 src/sys/external/bsd/drm2/include/linux/mutex.h:1.8
--- src/sys/external/bsd/drm2/include/linux/mutex.h:1.7 Sat Aug 23 08:03:33 2014
+++ src/sys/external/bsd/drm2/include/linux/mutex.h Mon Aug 27 06:06:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mutex.h,v 1.7 2014/08/23 08:03:33 riastradh Exp $ */
+/* $NetBSD: mutex.h,v 1.8 2018/08/27 06:06:41 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,6 +35,7 @@
#include <sys/mutex.h>
#include <lib/libkern/libkern.h> /* KASSERT */
+#include <linux/list.h>
#define __acquires(lock) /* XXX lockdep stuff */
#define __releases(lock) /* XXX lockdep stuff */
Index: src/sys/external/bsd/drm2/include/linux/types.h
diff -u src/sys/external/bsd/drm2/include/linux/types.h:1.4 src/sys/external/bsd/drm2/include/linux/types.h:1.5
--- src/sys/external/bsd/drm2/include/linux/types.h:1.4 Wed Jul 16 20:59:58 2014
+++ src/sys/external/bsd/drm2/include/linux/types.h Mon Aug 27 06:06:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.4 2014/07/16 20:59:58 riastradh Exp $ */
+/* $NetBSD: types.h,v 1.5 2018/08/27 06:06:41 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -77,4 +77,10 @@ typedef unsigned long long cycles_t;
/* XXX Not sure this is correct. */
typedef off_t loff_t;
+struct rcu_head {
+
+};
+
+#define DECLARE_BITMAP(name,size) size_t name[size/sizeof(size_t)]
+
#endif /* _LINUX_TYPES_H_ */
Index: src/sys/external/bsd/drm2/include/linux/ww_mutex.h
diff -u src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.11 src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.12
--- src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.11 Thu May 21 21:55:55 2015
+++ src/sys/external/bsd/drm2/include/linux/ww_mutex.h Mon Aug 27 06:06:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ww_mutex.h,v 1.11 2015/05/21 21:55:55 riastradh Exp $ */
+/* $NetBSD: ww_mutex.h,v 1.12 2018/08/27 06:06:41 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -37,6 +37,8 @@
#include <sys/mutex.h>
#include <sys/rbtree.h>
+#include <linux/mutex.h>
+
struct ww_class {
volatile uint64_t wwc_ticket;
};
Index: src/sys/external/bsd/drm2/pci/drm_pci.c
diff -u src/sys/external/bsd/drm2/pci/drm_pci.c:1.18 src/sys/external/bsd/drm2/pci/drm_pci.c:1.19
--- src/sys/external/bsd/drm2/pci/drm_pci.c:1.18 Thu Jul 27 02:11:24 2017
+++ src/sys/external/bsd/drm2/pci/drm_pci.c Mon Aug 27 06:06:42 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_pci.c,v 1.18 2017/07/27 02:11:24 nonaka Exp $ */
+/* $NetBSD: drm_pci.c,v 1.19 2018/08/27 06:06:42 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.18 2017/07/27 02:11:24 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.19 2018/08/27 06:06:42 riastradh Exp $");
#include <sys/types.h>
#include <sys/errno.h>
@@ -53,7 +53,6 @@ static void drm_pci_irq_uninstall(struct
struct drm_bus_irq_cookie *);
static const char *
drm_pci_get_name(struct drm_device *);
-static int drm_pci_set_busid(struct drm_device *, struct drm_master *);
static int drm_pci_set_unique(struct drm_device *, struct drm_master *,
struct drm_unique *);
static int drm_pci_irq_by_busid(struct drm_device *,
@@ -320,7 +319,7 @@ drm_pci_format_devname(struct drm_device
unique);
}
-static int
+int
drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
{
int n;