CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2022-05-21 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat May 21 23:42:13 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_cache.h

Log Message:
drm_cache.h: fix a merge error

this reverts revision 1.3 which should have been reverted when it got
introduced by upstream through revision 1.5.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/drm2/dist/include/drm/drm_cache.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/dist/include/drm/drm_cache.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.10 src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.11
--- src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.10	Sun Dec 19 11:33:30 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h	Sat May 21 23:42:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_cache.h,v 1.10 2021/12/19 11:33:30 riastradh Exp $	*/
+/*	$NetBSD: drm_cache.h,v 1.11 2022/05/21 23:42:13 tnn Exp $	*/
 
 /**
  *
@@ -69,8 +69,6 @@ static inline bool drm_arch_can_wc_memor
 	 * optimization entirely for ARM and arm64.
 	 */
 	return false;
-#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)
-	return false;
 #else
 	return true;
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2022-05-21 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat May 21 23:42:13 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_cache.h

Log Message:
drm_cache.h: fix a merge error

this reverts revision 1.3 which should have been reverted when it got
introduced by upstream through revision 1.5.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Dec 22 12:05:24 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_device.h

Log Message:
drm: Omit local diff -- vmem is entirely a NetBSDism.

Use struct vmem rather than vmem_t to obviate need for header file
dependency.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.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/dist/include/drm/drm_device.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.9 src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.10
--- src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.9	Tue Dec 21 12:28:34 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_device.h	Wed Dec 22 12:05:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_device.h,v 1.9 2021/12/21 12:28:34 tnn Exp $	*/
+/*	$NetBSD: drm_device.h,v 1.10 2021/12/22 12:05:24 riastradh Exp $	*/
 
 #ifndef _DRM_DEVICE_H_
 #define _DRM_DEVICE_H_
@@ -29,12 +29,6 @@ struct drm_fb_helper;
 struct pci_dev;
 struct pci_controller;
 
-#if defined(__NetBSD__)
-#include 
-#else
-typedef struct vmem vmem_t;
-#endif
-
 /**
  * enum drm_switch_power - power state of drm device
  */
@@ -297,7 +291,7 @@ struct drm_device {
 	bool dmat_subregion_p;
 	bus_addr_t dmat_subregion_min;
 	bus_addr_t dmat_subregion_max;
-	vmem_t *cma_pool;
+	struct vmem *cma_pool;
 #endif
 
 	/** @num_crtcs: Number of CRTCs on this device */



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Dec 22 12:05:24 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_device.h

Log Message:
drm: Omit local diff -- vmem is entirely a NetBSDism.

Use struct vmem rather than vmem_t to obviate need for header file
dependency.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-21 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Tue Dec 21 12:28:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_device.h

Log Message:
drm_device.h: don't redefine vmem_t


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.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/dist/include/drm/drm_device.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.8 src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.9
--- src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.8	Sun Dec 19 12:05:09 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_device.h	Tue Dec 21 12:28:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_device.h,v 1.8 2021/12/19 12:05:09 riastradh Exp $	*/
+/*	$NetBSD: drm_device.h,v 1.9 2021/12/21 12:28:34 tnn Exp $	*/
 
 #ifndef _DRM_DEVICE_H_
 #define _DRM_DEVICE_H_
@@ -29,7 +29,11 @@ struct drm_fb_helper;
 struct pci_dev;
 struct pci_controller;
 
+#if defined(__NetBSD__)
+#include 
+#else
 typedef struct vmem vmem_t;
+#endif
 
 /**
  * enum drm_switch_power - power state of drm device



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-21 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Tue Dec 21 12:28:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_device.h

Log Message:
drm_device.h: don't redefine vmem_t


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 10:48:47 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_dp_helper.h

Log Message:
Forward declaration for struct seq_file.

No idea what side-loading will provide this.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/drm2/dist/include/drm/drm_dp_helper.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/dist/include/drm/drm_dp_helper.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_dp_helper.h:1.7 src/sys/external/bsd/drm2/dist/include/drm/drm_dp_helper.h:1.8
--- src/sys/external/bsd/drm2/dist/include/drm/drm_dp_helper.h:1.7	Sun Dec 19 10:38:05 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_dp_helper.h	Sun Dec 19 10:48:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_dp_helper.h,v 1.7 2021/12/19 10:38:05 riastradh Exp $	*/
+/*	$NetBSD: drm_dp_helper.h,v 1.8 2021/12/19 10:48:47 riastradh Exp $	*/
 
 /*
  * Copyright © 2008 Keith Packard
@@ -30,6 +30,8 @@
 #include 
 #include 
 
+struct seq_file;
+
 /*
  * Unless otherwise noted, all values are from the DP 1.1a spec.  Note that
  * DP and DPCD versions are independent.  Differences from 1.0 are not noted,



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 10:48:47 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_dp_helper.h

Log Message:
Forward declaration for struct seq_file.

No idea what side-loading will provide this.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/drm2/dist/include/drm/drm_dp_helper.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:58:30 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_tt.h

Log Message:
Re-introduce lost local diff.

We want declarations for ttm_tt_{,un}wire, and some different
members on struct ttm_tt

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.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/dist/include/drm/ttm/ttm_tt.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.4 src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.5
--- src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.4	Sun Dec 19 09:58:00 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h	Sun Dec 19 09:58:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_tt.h,v 1.4 2021/12/19 09:58:00 riastradh Exp $	*/
+/*	$NetBSD: ttm_tt.h,v 1.5 2021/12/19 09:58:30 riastradh Exp $	*/
 
 /**
  *
@@ -111,7 +111,12 @@ struct ttm_tt {
 	uint32_t page_flags;
 	unsigned long num_pages;
 	struct sg_table *sg; /* for SG objects via dma-buf */
+#ifdef __NetBSD__
+	struct uvm_object *swap_storage;
+	struct pglist pglist;
+#else
 	struct file *swap_storage;
+#endif
 	enum ttm_caching_state caching_state;
 	enum {
 		tt_bound,
@@ -211,6 +216,25 @@ void ttm_tt_destroy(struct ttm_tt *ttm);
  */
 void ttm_tt_unbind(struct ttm_tt *ttm);
 
+#ifdef __NetBSD__
+/**
+ * ttm_tt_wire
+ *
+ * @ttm The struct ttm_tt.
+ *
+ * Wire the pages of a ttm_tt, allocating pages for it if necessary.
+ */
+extern int ttm_tt_wire(struct ttm_tt *ttm);
+
+/**
+ * ttm_tt_unwire
+ *
+ * @ttm The struct ttm_tt.
+ *
+ * Unwire the pages of a ttm_tt.
+ */
+extern void ttm_tt_unwire(struct ttm_tt *ttm);
+#else
 /**
  * ttm_tt_swapin:
  *
@@ -219,6 +243,7 @@ void ttm_tt_unbind(struct ttm_tt *ttm);
  * Swap in a previously swap out ttm_tt.
  */
 int ttm_tt_swapin(struct ttm_tt *ttm);
+#endif
 
 /**
  * ttm_tt_set_placement_caching:



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:58:30 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_tt.h

Log Message:
Re-introduce lost local diff.

We want declarations for ttm_tt_{,un}wire, and some different
members on struct ttm_tt

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:58:23 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_set_memory.h

Log Message:
Avoid the set_pages_array_wc/wb paths in TTM for now

we did this before. maybe we'll eventually want to stop for
performance reasons?

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_set_memory.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/dist/include/drm/ttm/ttm_set_memory.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_set_memory.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_set_memory.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_set_memory.h:1.2	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_set_memory.h	Sun Dec 19 09:58:23 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_set_memory.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: ttm_set_memory.h,v 1.3 2021/12/19 09:58:23 riastradh Exp $	*/
 
 /**
  *
@@ -35,7 +35,7 @@
 
 #include 
 
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) && defined(__linux__)
 
 #include 
 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:58:23 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_set_memory.h

Log Message:
Avoid the set_pages_array_wc/wb paths in TTM for now

we did this before. maybe we'll eventually want to stop for
performance reasons?

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_set_memory.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:58:00 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_tt.h

Log Message:
constify

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.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/dist/include/drm/ttm/ttm_tt.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.3 src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.4
--- src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.3	Sun Dec 19 09:57:09 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h	Sun Dec 19 09:58:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_tt.h,v 1.3 2021/12/19 09:57:09 riastradh Exp $	*/
+/*	$NetBSD: ttm_tt.h,v 1.4 2021/12/19 09:58:00 riastradh Exp $	*/
 
 /**
  *
@@ -106,7 +106,7 @@ struct ttm_backend_func {
  */
 struct ttm_tt {
 	struct ttm_bo_device *bdev;
-	struct ttm_backend_func *func;
+	const struct ttm_backend_func *func;
 	struct page **pages;
 	uint32_t page_flags;
 	unsigned long num_pages;



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:58:00 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_tt.h

Log Message:
constify

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:57:09 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_tt.h

Log Message:
Restore local diff

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.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/dist/include/drm/ttm/ttm_tt.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h:1.2	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h	Sun Dec 19 09:57:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_tt.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: ttm_tt.h,v 1.3 2021/12/19 09:57:09 riastradh Exp $	*/
 
 /**
  *
@@ -133,7 +133,12 @@ struct ttm_tt {
  */
 struct ttm_dma_tt {
 	struct ttm_tt ttm;
+#ifdef __NetBSD__
+	bus_dma_segment_t *dma_segs;
+	bus_dmamap_t dma_address;
+#else
 	dma_addr_t *dma_address;
+#endif
 	struct list_head pages_list;
 };
 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:57:09 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_tt.h

Log Message:
Restore local diff

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_tt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:56:03 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
Reset after #undef free. This will surely come to bite us later, too.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/drm2/dist/include/drm/drm_gem.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/dist/include/drm/drm_gem.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.10 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.11
--- src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.10	Sun Dec 19 09:48:14 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h	Sun Dec 19 09:56:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_gem.h,v 1.10 2021/12/19 09:48:14 riastradh Exp $	*/
+/*	$NetBSD: drm_gem.h,v 1.11 2021/12/19 09:56:03 riastradh Exp $	*/
 
 #ifndef __DRM_GEM_H__
 #define __DRM_GEM_H__
@@ -44,6 +44,8 @@
 #include 
 #include 
 
+#include 
+#include 
 #include 
 #undef free
 
@@ -451,4 +453,6 @@ int drm_gem_dumb_destroy(struct drm_file
 			 struct drm_device *dev,
 			 uint32_t handle);
 
+#define	free(addr, type)		kern_free(addr)
+
 #endif /* __DRM_GEM_H__ */



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:56:03 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
Reset after #undef free. This will surely come to bite us later, too.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:55:14 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_bo_api.h

Log Message:
ifdef out things using vm_fault_t

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.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/dist/include/drm/ttm/ttm_bo_api.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h:1.6 src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h:1.7
--- src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h:1.6	Sun Dec 19 01:49:36 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h	Sun Dec 19 09:55:14 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_bo_api.h,v 1.6 2021/12/19 01:49:36 riastradh Exp $	*/
+/*	$NetBSD: ttm_bo_api.h,v 1.7 2021/12/19 09:55:14 riastradh Exp $	*/
 
 /**
  *
@@ -775,6 +775,7 @@ static inline bool ttm_bo_uses_embedded_
 /* Default number of pre-faulted pages in the TTM fault handler */
 #define TTM_BO_VM_NUM_PREFAULT 16
 
+#ifdef __linux__
 vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo,
 			 struct vm_fault *vmf);
 
@@ -790,5 +791,6 @@ void ttm_bo_vm_close(struct vm_area_stru
 
 int ttm_bo_vm_access(struct vm_area_struct *vma, unsigned long addr,
 		 void *buf, int len, int write);
+#endif
 
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:55:14 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_bo_api.h

Log Message:
ifdef out things using vm_fault_t

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:55:05 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_drv.h

Log Message:
Constify

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.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/dist/include/drm/drm_drv.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h:1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h:1.6
--- src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h:1.5	Sun Dec 19 09:50:36 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h	Sun Dec 19 09:55:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_drv.h,v 1.5 2021/12/19 09:50:36 riastradh Exp $	*/
+/*	$NetBSD: drm_drv.h,v 1.6 2021/12/19 09:55:05 riastradh Exp $	*/
 
 /*
  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -751,11 +751,11 @@ struct drm_driver {
 	/** @patchlevel: driver patch level */
 	int patchlevel;
 	/** @name: driver name */
-	char *name;
+	const char *name;
 	/** @desc: driver description */
-	char *desc;
+	const char *desc;
 	/** @date: driver date */
-	char *date;
+	const char *date;
 
 	/**
 	 * @driver_features:



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:55:05 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_drv.h

Log Message:
Constify

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:54:31 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Avoid declarations that appear in drm_debugfs.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.63 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.64
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.63	Sun Dec 19 09:52:43 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 09:54:31 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.63 2021/12/19 09:52:43 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.64 2021/12/19 09:54:31 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -119,28 +119,6 @@ struct dma_buf_attachment;
 struct seq_file;
 #endif
 
-/**
- * Info file list entry. This structure represents a debugfs or proc file to
- * be created by the drm core
- */
-struct drm_info_list {
-	const char *name; /** file name */
-	int (*show)(struct seq_file*, void*); /** show callback */
-	u32 driver_features; /**< Required driver features for this entry */
-	void *data;
-};
-
-/**
- * debugfs node structure. This structure represents a debugfs file.
- */
-struct drm_info_node {
-	struct list_head list;
-	struct drm_minor *minor;
-	const struct drm_info_list *info_ent;
-	struct dentry *dent;
-};
-
-
 /**/
 /** \name Internal function definitions */
 /*@{*/



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:54:31 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Avoid declarations that appear in drm_debugfs.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:52:50 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_device.h

Log Message:
We need these struct members for a couple of local drm files.

XXX: We might want to enable config legacy drm or adapt the local drm
files.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.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/dist/include/drm/drm_device.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.4 src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.5
--- src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.4	Sun Dec 19 09:52:43 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_device.h	Sun Dec 19 09:52:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_device.h,v 1.4 2021/12/19 09:52:43 riastradh Exp $	*/
+/*	$NetBSD: drm_device.h,v 1.5 2021/12/19 09:52:50 riastradh Exp $	*/
 
 #ifndef _DRM_DEVICE_H_
 #define _DRM_DEVICE_H_
@@ -335,7 +335,8 @@ struct drm_device {
 
 	/* Everything below here is for legacy driver, never use! */
 	/* private: */
-#if IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_LEGACY) || \
+defined(__NetBSD__) /* XXX drm_vm.c / drm_cdevsw.c use this */
 	/* Context handle management - linked list of context handles */
 	struct list_head ctxlist;
 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:52:50 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_device.h

Log Message:
We need these struct members for a couple of local drm files.

XXX: We might want to enable config legacy drm or adapt the local drm
files.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:52:43 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_device.h

Log Message:
Move drm_cdevsw out of drmP.h which should eventually be removed

drm_device.h seems like an OK spot.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.62 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.63
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.62	Sun Dec 19 09:51:41 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 09:52:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.62 2021/12/19 09:51:41 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.63 2021/12/19 09:52:43 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -213,8 +213,4 @@ drm_io_mapping_init_wc(struct drm_device
 
 #endif	/* defined(__NetBSD__) */
 
-#ifdef __NetBSD__
-extern const struct cdevsw drm_cdevsw;
-#endif
-
 #endif

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_device.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.4
--- src/sys/external/bsd/drm2/dist/include/drm/drm_device.h:1.3	Sun Dec 19 01:55:45 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_device.h	Sun Dec 19 09:52:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_device.h,v 1.3 2021/12/19 01:55:45 riastradh Exp $	*/
+/*	$NetBSD: drm_device.h,v 1.4 2021/12/19 09:52:43 riastradh Exp $	*/
 
 #ifndef _DRM_DEVICE_H_
 #define _DRM_DEVICE_H_
@@ -385,4 +385,8 @@ struct drm_device {
 #endif
 };
 
+#ifdef __NetBSD__
+extern const struct cdevsw drm_cdevsw;
+#endif
+
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:52:43 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_device.h

Log Message:
Move drm_cdevsw out of drmP.h which should eventually be removed

drm_device.h seems like an OK spot.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:51:42 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
remove declarations now in drm_irq.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.61 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.62
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.61	Sun Dec 19 09:51:34 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 09:51:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.61 2021/12/19 09:51:34 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.62 2021/12/19 09:51:41 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -148,14 +148,6 @@ struct drm_info_node {
 /* Device support (drm_fops.h) */
 extern int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv);
 
-/* IRQ support (drm_irq.h) */
-#ifdef __NetBSD__
-extern int drm_irq_install(struct drm_device *dev);
-#else
-extern int drm_irq_install(struct drm_device *dev, int irq);
-#endif
-extern int drm_irq_uninstall(struct drm_device *dev);
-
 /* Stub support (drm_stub.h) */
 extern struct drm_master *drm_master_get(struct drm_master *master);
 extern void drm_master_put(struct drm_master **master);



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:51:42 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
remove declarations now in drm_irq.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:51:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
delete defines now in drm_pci.h and drm_internal.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.60 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.61
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.60	Sun Dec 19 09:51:27 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 09:51:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.60 2021/12/19 09:51:27 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.61 2021/12/19 09:51:34 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -192,25 +192,6 @@ extern int drm_pci_attach(device_t, cons
 struct drm_device **);
 extern int drm_pci_detach(struct drm_device *, int);
 #endif
-#ifdef CONFIG_PCI
-extern int drm_get_pci_dev(struct pci_dev *pdev,
-			   const struct pci_device_id *ent,
-			   struct drm_driver *driver);
-extern int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
-#else
-static inline int drm_get_pci_dev(struct pci_dev *pdev,
-  const struct pci_device_id *ent,
-  struct drm_driver *driver)
-{
-	return -ENOSYS;
-}
-
-static inline int drm_pci_set_busid(struct drm_device *dev,
-struct drm_master *master)
-{
-	return -ENOSYS;
-}
-#endif
 
 extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);
 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:51:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
delete defines now in drm_pci.h and drm_internal.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:51:27 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
remove unused definitions

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.59 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.60
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.59	Sun Dec 19 01:59:11 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 09:51:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.59 2021/12/19 01:59:11 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.60 2021/12/19 09:51:27 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -212,10 +212,6 @@ static inline int drm_pci_set_busid(stru
 }
 #endif
 
-#define DRM_PCIE_SPEED_25 1
-#define DRM_PCIE_SPEED_50 2
-#define DRM_PCIE_SPEED_80 4
-
 extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);
 
 /* platform section */



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:51:27 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
remove unused definitions

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:50:36 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_drv.h

Log Message:
DRM_IRQ_ARGS

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.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/dist/include/drm/drm_drv.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h:1.4 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h:1.5
--- src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h:1.4	Sun Dec 19 01:56:33 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h	Sun Dec 19 09:50:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_drv.h,v 1.4 2021/12/19 01:56:33 riastradh Exp $	*/
+/*	$NetBSD: drm_drv.h,v 1.5 2021/12/19 09:50:36 riastradh Exp $	*/
 
 /*
  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -431,7 +431,7 @@ struct drm_driver {
 	 * Interrupt handler called when using drm_irq_install(). Not used by
 	 * drivers which implement their own interrupt handling.
 	 */
-	irqreturn_t(*irq_handler) (int irq, void *arg);
+	irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
 
 	/**
 	 * @irq_preinstall:



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:50:36 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_drv.h

Log Message:
DRM_IRQ_ARGS

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:49:01 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_irq.h

Log Message:
Provide our own declaration of drm_irq_install

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_irq.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/dist/include/drm/drm_irq.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_irq.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/drm_irq.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/drm_irq.h:1.2	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_irq.h	Sun Dec 19 09:49:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_irq.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: drm_irq.h,v 1.3 2021/12/19 09:49:01 riastradh Exp $	*/
 
 /*
  * Copyright 2016 Intel Corp.
@@ -28,7 +28,12 @@
 
 struct drm_device;
 
+#ifdef __NetBSD__
+int drm_irq_install(struct drm_device *dev);
+#else
 int drm_irq_install(struct drm_device *dev, int irq);
+#endif
+
 int drm_irq_uninstall(struct drm_device *dev);
 
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:49:01 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_irq.h

Log Message:
Provide our own declaration of drm_irq_install

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_irq.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:48:14 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
avoid malloc.h macro pollution.

free is a function in drm_gem_object_funcs

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/drm2/dist/include/drm/drm_gem.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/dist/include/drm/drm_gem.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.9 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.10
--- src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.9	Sun Dec 19 09:45:34 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h	Sun Dec 19 09:48:14 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_gem.h,v 1.9 2021/12/19 09:45:34 riastradh Exp $	*/
+/*	$NetBSD: drm_gem.h,v 1.10 2021/12/19 09:48:14 riastradh Exp $	*/
 
 #ifndef __DRM_GEM_H__
 #define __DRM_GEM_H__
@@ -45,6 +45,7 @@
 #include 
 
 #include 
+#undef free
 
 struct drm_gem_object;
 struct xarray;



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:48:14 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
avoid malloc.h macro pollution.

free is a function in drm_gem_object_funcs

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:47:52 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_flip_work.h

Log Message:
linux/bug.h for WARN_ON, linux/list.h for list functions

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_flip_work.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/dist/include/drm/drm_flip_work.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_flip_work.h:1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_flip_work.h:1.4
--- src/sys/external/bsd/drm2/dist/include/drm/drm_flip_work.h:1.3	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_flip_work.h	Sun Dec 19 09:47:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_flip_work.h,v 1.3 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: drm_flip_work.h,v 1.4 2021/12/19 09:47:52 riastradh Exp $	*/
 
 /*
  * Copyright (C) 2013 Red Hat
@@ -26,6 +26,8 @@
 #ifndef DRM_FLIP_WORK_H
 #define DRM_FLIP_WORK_H
 
+#include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:47:52 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_flip_work.h

Log Message:
linux/bug.h for WARN_ON, linux/list.h for list functions

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_flip_work.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:45:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
forward declaration of xarray instead of figuring out how it's side-loaded

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.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/dist/include/drm/drm_gem.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.8 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.9
--- src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.8	Sun Dec 19 01:54:35 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h	Sun Dec 19 09:45:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_gem.h,v 1.8 2021/12/19 01:54:35 riastradh Exp $	*/
+/*	$NetBSD: drm_gem.h,v 1.9 2021/12/19 09:45:34 riastradh Exp $	*/
 
 #ifndef __DRM_GEM_H__
 #define __DRM_GEM_H__
@@ -47,6 +47,7 @@
 #include 
 
 struct drm_gem_object;
+struct xarray;
 
 /**
  * struct drm_gem_object_funcs - GEM object functions



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:45:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
forward declaration of xarray instead of figuring out how it's side-loaded

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:43:13 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_connector.h

Log Message:
bus_formats seems to be passed to kfere, de-constify

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_connector.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/dist/include/drm/drm_connector.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_connector.h:1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_connector.h:1.4
--- src/sys/external/bsd/drm2/dist/include/drm/drm_connector.h:1.3	Sun Dec 19 01:02:10 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_connector.h	Sun Dec 19 09:43:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_connector.h,v 1.3 2021/12/19 01:02:10 riastradh Exp $	*/
+/*	$NetBSD: drm_connector.h,v 1.4 2021/12/19 09:43:13 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2016 Intel Corporation
@@ -412,7 +412,7 @@ struct drm_display_info {
 	 * @color_formats. Array of size @num_bus_formats encoded using
 	 * MEDIA_BUS_FMT\_ defines shared with v4l and media drivers.
 	 */
-	const u32 *bus_formats;
+	u32 *bus_formats;
 	/**
 	 * @num_bus_formats: Size of @bus_formats array.
 	 */



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 09:43:13 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_connector.h

Log Message:
bus_formats seems to be passed to kfere, de-constify

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_connector.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:59:11 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove more things defined in headers off drmP.h

(either drm_internal.h, drm_drv.h, drm_debugfs.h)

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.58 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.59
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.58	Sun Dec 19 01:59:03 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:59:11 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.58 2021/12/19 01:59:03 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.59 2021/12/19 01:59:11 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -165,28 +165,6 @@ extern void drm_unplug_dev(struct drm_de
 extern unsigned int drm_debug;
 extern bool drm_atomic;
 
-/* Debugfs support */
-#if defined(CONFIG_DEBUG_FS)
-extern int drm_debugfs_create_files(const struct drm_info_list *files,
-int count, struct dentry *root,
-struct drm_minor *minor);
-extern int drm_debugfs_remove_files(const struct drm_info_list *files,
-int count, struct drm_minor *minor);
-#else
-static inline int drm_debugfs_create_files(const struct drm_info_list *files,
-	   int count, struct dentry *root,
-	   struct drm_minor *minor)
-{
-	return 0;
-}
-
-static inline int drm_debugfs_remove_files(const struct drm_info_list *files,
-	   int count, struct drm_minor *minor)
-{
-	return 0;
-}
-#endif
-
 int drm_pci_set_unique(struct drm_device *dev,
 		   struct drm_master *master,
 		   struct drm_unique *u);
@@ -194,21 +172,6 @@ extern struct drm_dma_handle *drm_pci_al
 	size_t align);
 extern void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah);
 
-			   /* sysfs support (drm_sysfs.c) */
-extern void drm_sysfs_hotplug_event(struct drm_device *dev);
-
-
-struct drm_device *drm_dev_alloc(struct drm_driver *driver,
- struct device *parent);
-void drm_dev_ref(struct drm_device *dev);
-void drm_dev_unref(struct drm_device *dev);
-int drm_dev_register(struct drm_device *dev, unsigned long flags);
-void drm_dev_unregister(struct drm_device *dev);
-int drm_dev_set_unique(struct drm_device *dev, const char *fmt, ...);
-
-struct drm_minor *drm_minor_acquire(unsigned int minor_id);
-void drm_minor_release(struct drm_minor *minor);
-
 #ifdef __NetBSD__
 int drm_limit_dma_space(struct drm_device *, resource_size_t, resource_size_t);
 int drm_guarantee_initialized(void);



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:59:11 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove more things defined in headers off drmP.h

(either drm_internal.h, drm_drv.h, drm_debugfs.h)

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:59:03 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_file.h
drm_prime.h

Log Message:
Move more ifdef NetBSD goo from drmP.h to new headers

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/drm_file.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_prime.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.57 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.58
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.57	Sun Dec 19 01:57:20 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:59:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.57 2021/12/19 01:57:20 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.58 2021/12/19 01:59:03 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -102,7 +102,6 @@ struct drm_agp_head;
 struct drm_local_map;
 struct drm_device_dma;
 struct drm_dma_handle;
-struct drm_gem_object;
 struct drm_bus_irq_cookie;
 
 struct device_node;
@@ -116,49 +115,6 @@ struct dma_buf_attachment;
 
 #define DRM_IF_VERSION(maj, min) (maj << 16 | min)
 
-/**
- * Ioctl function type.
- *
- * \param inode device inode.
- * \param file_priv DRM file private pointer.
- * \param cmd command.
- * \param arg argument.
- */
-typedef int drm_ioctl_t(struct drm_device *dev, void *data,
-			struct drm_file *file_priv);
-
-typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
-			   unsigned long arg);
-
-/**
- * Creates a driver or general drm_ioctl_desc array entry for the given
- * ioctl, for use by drm_ioctl().
- */
-
-#define DRM_IOCTL_DEF_DRV(ioctl, _func, _flags)\
-	[DRM_IOCTL_NR(DRM_IOCTL_##ioctl) - DRM_COMMAND_BASE] = {	\
-		.cmd = DRM_IOCTL_##ioctl,\
-		.func = _func,		\
-		.flags = _flags,	\
-		.name = #ioctl		\
-	 }
-
-/* Event queued up for userspace to read */
-struct drm_pending_event {
-	struct drm_event *event;
-	struct list_head link;
-	struct drm_file *file_priv;
-	pid_t pid; /* pid of requester, no guarantee it's valid by the time
-		  we deliver the event, for tracing only */
-	void (*destroy)(struct drm_pending_event *event);
-};
-
-/* initial implementaton using a linked list - todo hashtab */
-struct drm_prime_file_private {
-	struct list_head head;
-	struct mutex lock;
-};
-
 #ifdef __NetBSD__		/* XXX debugfs */
 struct seq_file;
 #endif
@@ -184,25 +140,6 @@ struct drm_info_node {
 	struct dentry *dent;
 };
 
-/**
- * DRM minor structure. This structure represents a drm minor number.
- */
-struct drm_minor {
-	int index;			/**< Minor device number */
-	int type;   /**< Control or render */
-	struct device *kdev;		/**< Linux device */
-	struct drm_device *dev;
-
-#ifndef __NetBSD__		/* XXX debugfs */
-	struct dentry *debugfs_root;
-
-	struct list_head debugfs_list;
-	struct mutex debugfs_lock; /* Protects debugfs_list. */
-#endif
-
-	/* currently active master for this node. Protected by master_mutex */
-	struct drm_master *master;
-};
 
 /**/
 /** \name Internal function definitions */
@@ -250,34 +187,6 @@ static inline int drm_debugfs_remove_fil
 }
 #endif
 
-extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
-	struct drm_gem_object *obj,
-	int flags);
-extern int drm_gem_prime_handle_to_fd(struct drm_device *dev,
-		struct drm_file *file_priv, uint32_t handle, uint32_t flags,
-		int *prime_fd);
-extern struct drm_gem_object *drm_gem_prime_import(struct drm_device *dev,
-		struct dma_buf *dma_buf);
-extern int drm_gem_prime_fd_to_handle(struct drm_device *dev,
-		struct drm_file *file_priv, int prime_fd, uint32_t *handle);
-extern void drm_gem_dmabuf_release(struct dma_buf *dma_buf);
-
-#ifdef __NetBSD__
-extern struct sg_table *drm_prime_bus_dmamem_to_sg(bus_dma_tag_t, const bus_dma_segment_t *, int);
-extern struct sg_table *drm_prime_pglist_to_sg(struct pglist *, unsigned);
-extern int drm_prime_sg_to_bus_dmamem(bus_dma_tag_t, bus_dma_segment_t *, int, int *, const struct sg_table *);
-extern int drm_prime_bus_dmamap_load_sgt(bus_dma_tag_t, bus_dmamap_t, struct sg_table *);
-extern bus_size_t drm_prime_sg_size(struct sg_table *);
-extern void drm_prime_sg_free(struct sg_table *);
-extern bool drm_prime_sg_importable(bus_dma_tag_t, struct sg_table *);
-#else
-extern int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
-	dma_addr_t *addrs, int max_pages);
-#endif
-extern struct sg_table *drm_prime_pages_to_sg(struct page **pages, 

CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:59:03 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_file.h
drm_prime.h

Log Message:
Move more ifdef NetBSD goo from drmP.h to new headers

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/drm_file.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_prime.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:58:25 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_atomic_uapi.h

Log Message:
linux/compiler.h for __must_check

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_atomic_uapi.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/dist/include/drm/drm_atomic_uapi.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_atomic_uapi.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/drm_atomic_uapi.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/drm_atomic_uapi.h:1.2	Sat Dec 18 23:45:45 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_atomic_uapi.h	Sun Dec 19 01:58:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_atomic_uapi.h,v 1.2 2021/12/18 23:45:45 riastradh Exp $	*/
+/*	$NetBSD: drm_atomic_uapi.h,v 1.3 2021/12/19 01:58:25 riastradh Exp $	*/
 
 /*
  * Copyright (C) 2014 Red Hat
@@ -31,6 +31,8 @@
 #ifndef DRM_ATOMIC_UAPI_H_
 #define DRM_ATOMIC_UAPI_H_
 
+#include 
+
 struct drm_crtc_state;
 struct drm_display_mode;
 struct drm_property_blob;



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:58:25 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_atomic_uapi.h

Log Message:
linux/compiler.h for __must_check

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_atomic_uapi.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:58:04 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_vblank.h

Log Message:
make this a real function declaration

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.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/dist/include/drm/drm_vblank.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.7 src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.8
--- src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.7	Sun Dec 19 01:56:33 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h	Sun Dec 19 01:58:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_vblank.h,v 1.7 2021/12/19 01:56:33 riastradh Exp $	*/
+/*	$NetBSD: drm_vblank.h,v 1.8 2021/12/19 01:58:04 riastradh Exp $	*/
 
 /*
  * Copyright 2016 Intel Corp.
@@ -252,7 +252,7 @@ bool drm_calc_vbltimestamp_from_scanoutp
 void drm_calc_timestamping_constants(struct drm_crtc *crtc,
  const struct drm_display_mode *mode);
 #ifdef __NetBSD__
-drm_waitqueue_t *drm_crtc_vblank_waitqueue(struct drm_crtc *crtc)
+drm_waitqueue_t *drm_crtc_vblank_waitqueue(struct drm_crtc *crtc);
 #else
 wait_queue_head_t *drm_crtc_vblank_waitqueue(struct drm_crtc *crtc);
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:58:04 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_vblank.h

Log Message:
make this a real function declaration

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:35 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_atomic.h

Log Message:
Give up and include linux/completion.h

instead of figuring out how it's supposed to be side-loaded

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_atomic.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/dist/include/drm/drm_atomic.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_atomic.h:1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_atomic.h:1.4
--- src/sys/external/bsd/drm2/dist/include/drm/drm_atomic.h:1.3	Sat Dec 18 23:45:45 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_atomic.h	Sun Dec 19 01:57:35 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_atomic.h,v 1.3 2021/12/18 23:45:45 riastradh Exp $	*/
+/*	$NetBSD: drm_atomic.h,v 1.4 2021/12/19 01:57:35 riastradh Exp $	*/
 
 /*
  * Copyright (C) 2014 Red Hat
@@ -30,6 +30,7 @@
 #ifndef DRM_ATOMIC_H_
 #define DRM_ATOMIC_H_
 
+#include 
 #include 
 #include 
 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:35 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_atomic.h

Log Message:
Give up and include linux/completion.h

instead of figuring out how it's supposed to be side-loaded

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_atomic.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:21 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_file.h

Log Message:
move ifdef goo from drmP.h to drm_file.h

Remove declarations already appearing in other headers

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_file.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.56 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.57
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.56	Sun Dec 19 01:57:13 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:57:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.56 2021/12/19 01:57:13 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.57 2021/12/19 01:57:20 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -209,33 +209,8 @@ struct drm_minor {
 /*@{*/
 
 /* Device support (drm_fops.h) */
-#ifdef __NetBSD__
-extern int drm_open_file(struct drm_file *, void *, struct drm_minor *);
-extern void drm_close_file(struct drm_file *);
-#else
-extern int drm_open(struct inode *inode, struct file *filp);
-extern ssize_t drm_read(struct file *filp, char __user *buffer,
-			size_t count, loff_t *offset);
-extern int drm_release(struct inode *inode, struct file *filp);
-#endif
 extern int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv);
 
-/* Mapping support (drm_vm.h) */
-#ifndef __NetBSD__
-extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
-#endif
-
-/* Misc. IOCTL support (drm_ioctl.c) */
-int drm_noop(struct drm_device *dev, void *data,
-	 struct drm_file *file_priv);
-int drm_invalid_op(struct drm_device *dev, void *data,
-		   struct drm_file *file_priv);
-
-/*
- * These are exported to drivers so that they can implement fencing using
- * DMA quiscent + idle. DMA quiescent usually requires the hardware lock.
- */
-
 /* IRQ support (drm_irq.h) */
 #ifdef __NetBSD__
 extern int drm_irq_install(struct drm_device *dev);

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_file.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.6
--- src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.5	Sun Dec 19 01:56:50 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_file.h	Sun Dec 19 01:57:21 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_file.h,v 1.5 2021/12/19 01:56:50 riastradh Exp $	*/
+/*	$NetBSD: drm_file.h,v 1.6 2021/12/19 01:57:21 riastradh Exp $	*/
 
 /*
  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -388,11 +388,16 @@ static inline bool drm_is_render_client(
 	return file_priv->minor->type == DRM_MINOR_RENDER;
 }
 
+#ifdef __NetBSD__
+extern int drm_open_file(struct drm_file *, void *, struct drm_minor *);
+extern void drm_close_file(struct drm_file *);
+#else
 int drm_open(struct inode *inode, struct file *filp);
 ssize_t drm_read(struct file *filp, char __user *buffer,
 		 size_t count, loff_t *offset);
 int drm_release(struct inode *inode, struct file *filp);
 __poll_t drm_poll(struct file *filp, struct poll_table_struct *wait);
+#endif
 int drm_event_reserve_init_locked(struct drm_device *dev,
   struct drm_file *file_priv,
   struct drm_pending_event *p,



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:21 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_file.h

Log Message:
move ifdef goo from drmP.h to drm_file.h

Remove declarations already appearing in other headers

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_file.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:13 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Delete structs that got moved off to different files.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.55 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.56
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.55	Sun Dec 19 01:56:50 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:57:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.55 2021/12/19 01:56:50 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.56 2021/12/19 01:57:13 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -159,34 +159,6 @@ struct drm_prime_file_private {
 	struct mutex lock;
 };
 
-/**
- * struct drm_master - drm master structure
- *
- * @refcount: Refcount for this master object.
- * @minor: Link back to minor char device we are master for. Immutable.
- * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex.
- * @unique_len: Length of unique field. Protected by drm_global_mutex.
- * @magic_map: Map of used authentication tokens. Protected by struct_mutex.
- * @lock: DRI lock information.
- * @driver_priv: Pointer to driver-private information.
- */
-struct drm_master {
-	struct kref refcount;
-	struct drm_minor *minor;
-	char *unique;
-	int unique_len;
-	struct idr magic_map;
-	struct drm_lock_data lock;
-	void *driver_priv;
-};
-
-enum drm_minor_type {
-	DRM_MINOR_LEGACY,
-	DRM_MINOR_CONTROL,
-	DRM_MINOR_RENDER,
-	DRM_MINOR_CNT,
-};
-
 #ifdef __NetBSD__		/* XXX debugfs */
 struct seq_file;
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:13 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Delete structs that got moved off to different files.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:06 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_prime.h

Log Message:
Provide our own drm mmap declarations.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_prime.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/dist/include/drm/drm_prime.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_prime.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/drm_prime.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/drm_prime.h:1.2	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_prime.h	Sun Dec 19 01:57:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_prime.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: drm_prime.h,v 1.3 2021/12/19 01:57:06 riastradh Exp $	*/
 
 /*
  * Copyright © 2012 Red Hat
@@ -87,8 +87,15 @@ void drm_gem_unmap_dma_buf(struct dma_bu
 void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf);
 void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr);
 
+#ifdef __NetBSD__
+int gem_prime_mmap(struct drm_gem_object *, off_t *, size_t, int, int *,
+int *, struct uvm_object **, int *);
+int drm_gem_dmabuf_mmap(struct dma_buf *, off_t *, size_t, int, int *,
+int *, struct uvm_object **, int *);
+#else
 int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma);
 int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma);
+#endif
 
 struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages);
 struct dma_buf *drm_gem_prime_export(struct drm_gem_object *obj,



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:57:06 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_prime.h

Log Message:
Provide our own drm mmap declarations.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_prime.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:50 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_file.h

Log Message:
Move drm_file ifdef goo to the one defined in drm_file.h.

drm_lock_data is defined in drm_auth.h and already has the
ifdef goo.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/include/drm/drm_file.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.54 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.55
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.54	Sun Dec 19 01:56:42 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.54 2021/12/19 01:56:42 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.55 2021/12/19 01:56:50 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -159,89 +159,6 @@ struct drm_prime_file_private {
 	struct mutex lock;
 };
 
-/** File private data */
-struct drm_file {
-	unsigned authenticated :1;
-	/* Whether we're master for a minor. Protected by master_mutex */
-	unsigned is_master :1;
-	/* true when the client has asked us to expose stereo 3D mode flags */
-	unsigned stereo_allowed :1;
-	/*
-	 * true if client understands CRTC primary planes and cursor planes
-	 * in the plane list
-	 */
-	unsigned universal_planes:1;
-	/* true if client understands atomic properties */
-	unsigned atomic:1;
-	/*
-	 * This client is allowed to gain master privileges for @master.
-	 * Protected by struct drm_device::master_mutex.
-	 */
-	unsigned allowed_master:1;
-
-#ifndef __NetBSD__
-	struct pid *pid;
-	kuid_t uid;
-#endif
-	drm_magic_t magic;
-	struct list_head lhead;
-	struct drm_minor *minor;
-	unsigned long lock_count;
-
-	/** Mapping of mm object handles to object pointers. */
-	struct idr object_idr;
-	/** Lock for synchronization of access to object_idr. */
-	spinlock_t table_lock;
-
-	struct file *filp;
-	void *driver_priv;
-
-	struct drm_master *master; /* master this node is currently associated with
-  N.B. not always minor->master */
-	/**
-	 * fbs - List of framebuffers associated with this file.
-	 *
-	 * Protected by fbs_lock. Note that the fbs list holds a reference on
-	 * the fb object to prevent it from untimely disappearing.
-	 */
-	struct list_head fbs;
-	struct mutex fbs_lock;
-
-	/** User-created blob properties; this retains a reference on the
-	 *  property. */
-	struct list_head blobs;
-
-#ifdef __NetBSD__
-	drm_waitqueue_t event_wait;
-	struct selinfo event_selq;
-#else
-	wait_queue_head_t event_wait;
-#endif
-	struct list_head event_list;
-	int event_space;
-
-	struct drm_prime_file_private prime;
-};
-
-/**
- * Lock data.
- */
-struct drm_lock_data {
-	struct drm_hw_lock *hw_lock;	/**< Hardware lock */
-	/** Private of lock holder's file (NULL=kernel) */
-	struct drm_file *file_priv;
-#ifdef __NetBSD__
-	drm_waitqueue_t lock_queue;	/**< Queue of blocked processes */
-#else
-	wait_queue_head_t lock_queue;	/**< Queue of blocked processes */
-#endif
-	unsigned long lock_time;	/**< Time of last lock in jiffies */
-	spinlock_t spinlock;
-	uint32_t kernel_waiters;
-	uint32_t user_waiters;
-	int idle_has_lock;
-};
-
 /**
  * struct drm_master - drm master structure
  *

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_file.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.4 src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.5
--- src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.4	Sun Dec 19 00:58:04 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_file.h	Sun Dec 19 01:56:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_file.h,v 1.4 2021/12/19 00:58:04 riastradh Exp $	*/
+/*	$NetBSD: drm_file.h,v 1.5 2021/12/19 01:56:50 riastradh Exp $	*/
 
 /*
  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -230,8 +230,10 @@ struct drm_file {
 	 */
 	struct drm_master *master;
 
+#ifndef __NetBSD__
 	/** @pid: Process that opened this file. */
 	struct pid *pid;
+#endif
 
 	/** @magic: Authentication magic, see @authenticated. */
 	drm_magic_t magic;
@@ -299,7 +301,12 @@ struct drm_file {
 	struct list_head blobs;
 
 	/** @event_wait: Waitqueue for new events added to @event_list. */
+#ifdef __NetBSD__
+	drm_waitqueue_t event_wait;
+	struct selinfo event_selq;
+#else
 	wait_queue_head_t event_wait;
+#endif
 
 	/**
 	 * @pending_event_list:



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:50 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_file.h

Log Message:
Move drm_file ifdef goo to the one defined in drm_file.h.

drm_lock_data is defined in drm_auth.h and already has the
ifdef goo.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/include/drm/drm_file.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:43 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove declarations that appear in other headers or are unused

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.53 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.54
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.53	Sun Dec 19 01:56:33 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.53 2021/12/19 01:56:33 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.54 2021/12/19 01:56:42 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -315,33 +315,6 @@ struct drm_minor {
 	struct drm_master *master;
 };
 
-
-#define DRM_SWITCH_POWER_ON 0
-#define DRM_SWITCH_POWER_OFF 1
-#define DRM_SWITCH_POWER_CHANGING 2
-#define DRM_SWITCH_POWER_DYNAMIC_OFF 3
-
-static __inline__ int drm_core_check_feature(struct drm_device *dev,
-	 int feature)
-{
-	return ((dev->driver->driver_features & feature) ? 1 : 0);
-}
-
-static inline bool drm_is_render_client(const struct drm_file *file_priv)
-{
-	return file_priv->minor->type == DRM_MINOR_RENDER;
-}
-
-static inline bool drm_is_control_client(const struct drm_file *file_priv)
-{
-	return file_priv->minor->type == DRM_MINOR_CONTROL;
-}
-
-static inline bool drm_is_primary_client(const struct drm_file *file_priv)
-{
-	return file_priv->minor->type == DRM_MINOR_LEGACY;
-}
-
 /**/
 /** \name Internal function definitions */
 /*@{*/
@@ -471,18 +444,6 @@ int drm_guarantee_initialized(void);
 /*@}*/
 
 /* PCI section */
-static __inline__ int drm_pci_device_is_agp(struct drm_device *dev)
-{
-	if (dev->driver->device_is_agp != NULL) {
-		int err = (*dev->driver->device_is_agp) (dev);
-
-		if (err != 2) {
-			return err;
-		}
-	}
-
-	return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
-}
 void drm_pci_agp_destroy(struct drm_device *dev);
 
 extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:43 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove declarations that appear in other headers or are unused

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:33 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_drv.h
drm_vblank.h

Log Message:
Move drm_device ifdef goo to drm_drv.h

And drm vblank stuff to drm_vblank.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.52 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.53
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.52	Sun Dec 19 01:56:24 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.52 2021/12/19 01:56:24 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.53 2021/12/19 01:56:33 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -263,288 +263,6 @@ struct drm_master {
 	void *driver_priv;
 };
 
-/* Size of ringbuffer for vblank timestamps. Just double-buffer
- * in initial implementation.
- */
-#define DRM_VBLANKTIME_RBSIZE 2
-
-/* Flags and return codes for get_vblank_timestamp() driver function. */
-#define DRM_CALLED_FROM_VBLIRQ 1
-#define DRM_VBLANKTIME_SCANOUTPOS_METHOD (1 << 0)
-#define DRM_VBLANKTIME_IN_VBLANK (1 << 1)
-
-/* get_scanout_position() return flags */
-#define DRM_SCANOUTPOS_VALID(1 << 0)
-#define DRM_SCANOUTPOS_IN_VBLANK(1 << 1)
-#define DRM_SCANOUTPOS_ACCURATE (1 << 2)
-
-/**
- * DRM driver structure. This structure represent the common code for
- * a family of cards. There will one drm_device for each card present
- * in this family
- */
-struct drm_driver {
-	int (*load) (struct drm_device *, unsigned long flags);
-	int (*firstopen) (struct drm_device *);
-	int (*open) (struct drm_device *, struct drm_file *);
-	void (*preclose) (struct drm_device *, struct drm_file *file_priv);
-	void (*postclose) (struct drm_device *, struct drm_file *);
-	void (*lastclose) (struct drm_device *);
-	int (*unload) (struct drm_device *);
-	int (*suspend) (struct drm_device *, pm_message_t state);
-	int (*resume) (struct drm_device *);
-	int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
-	int (*dma_quiescent) (struct drm_device *);
-	int (*context_dtor) (struct drm_device *dev, int context);
-	int (*set_busid)(struct drm_device *dev, struct drm_master *master);
-	int (*set_unique)(struct drm_device *dev, struct drm_master *master,
-	struct drm_unique *);
-
-	/**
-	 * get_vblank_counter - get raw hardware vblank counter
-	 * @dev: DRM device
-	 * @pipe: counter to fetch
-	 *
-	 * Driver callback for fetching a raw hardware vblank counter for @crtc.
-	 * If a device doesn't have a hardware counter, the driver can simply
-	 * return the value of drm_vblank_count. The DRM core will account for
-	 * missed vblank events while interrupts where disabled based on system
-	 * timestamps.
-	 *
-	 * Wraparound handling and loss of events due to modesetting is dealt
-	 * with in the DRM core code.
-	 *
-	 * RETURNS
-	 * Raw vblank counter value.
-	 */
-	u32 (*get_vblank_counter) (struct drm_device *dev, unsigned int pipe);
-
-	/**
-	 * enable_vblank - enable vblank interrupt events
-	 * @dev: DRM device
-	 * @pipe: which irq to enable
-	 *
-	 * Enable vblank interrupts for @crtc.  If the device doesn't have
-	 * a hardware vblank counter, this routine should be a no-op, since
-	 * interrupts will have to stay on to keep the count accurate.
-	 *
-	 * RETURNS
-	 * Zero on success, appropriate errno if the given @crtc's vblank
-	 * interrupt cannot be enabled.
-	 */
-	int (*enable_vblank) (struct drm_device *dev, unsigned int pipe);
-
-	/**
-	 * disable_vblank - disable vblank interrupt events
-	 * @dev: DRM device
-	 * @pipe: which irq to enable
-	 *
-	 * Disable vblank interrupts for @crtc.  If the device doesn't have
-	 * a hardware vblank counter, this routine should be a no-op, since
-	 * interrupts will have to stay on to keep the count accurate.
-	 */
-	void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);
-
-	/**
-	 * Called by \c drm_device_is_agp.  Typically used to determine if a
-	 * card is really attached to AGP or not.
-	 *
-	 * \param dev  DRM device handle
-	 *
-	 * \returns
-	 * One of three values is returned depending on whether or not the
-	 * card is absolutely \b not AGP (return of 0), absolutely \b is AGP
-	 * (return of 1), or may or may not be AGP (return of 2).
-	 */
-	int (*device_is_agp) (struct drm_device *dev);
-
-	/**
-	 * Called by vblank timestamping code.
-	 *
-	 * Return the current 

CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:33 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_drv.h
drm_vblank.h

Log Message:
Move drm_device ifdef goo to drm_drv.h

And drm vblank stuff to drm_vblank.h

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/include/drm/drm_drv.h
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:24 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove drm_device_is_unplugged from drmP.h

Now defined in drm_drv.h.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.51 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.52
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.51	Sun Dec 19 01:56:16 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.51 2021/12/19 01:56:16 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.52 2021/12/19 01:56:24 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -641,13 +641,6 @@ static __inline__ int drm_core_check_fea
 	return ((dev->driver->driver_features & feature) ? 1 : 0);
 }
 
-static inline int drm_device_is_unplugged(struct drm_device *dev)
-{
-	int ret = atomic_read(>unplugged);
-	smp_rmb();
-	return ret;
-}
-
 static inline bool drm_is_render_client(const struct drm_file *file_priv)
 {
 	return file_priv->minor->type == DRM_MINOR_RENDER;



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:24 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove drm_device_is_unplugged from drmP.h

Now defined in drm_drv.h.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:16 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove unused function (local diff)

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.50 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.51
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.50	Sun Dec 19 01:56:08 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.50 2021/12/19 01:56:08 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.51 2021/12/19 01:56:16 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -641,12 +641,6 @@ static __inline__ int drm_core_check_fea
 	return ((dev->driver->driver_features & feature) ? 1 : 0);
 }
 
-static inline void drm_device_set_unplugged(struct drm_device *dev)
-{
-	smp_wmb();
-	atomic_set(>unplugged, 1);
-}
-
 static inline int drm_device_is_unplugged(struct drm_device *dev)
 {
 	int ret = atomic_read(>unplugged);



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:16 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove unused function (local diff)

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:08 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_ioctl.h

Log Message:
move drmP drm_ioctl stuff to drm_ioctl.h

including ifdef goo

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.49 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.50
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.49	Sun Dec 19 01:56:00 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.49 2021/12/19 01:56:00 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.50 2021/12/19 01:56:08 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -130,30 +130,6 @@ typedef int drm_ioctl_t(struct drm_devic
 typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
 			   unsigned long arg);
 
-#ifdef __NetBSD__
-/* XXX Kludge...is there a better way to do this?  */
-#define	DRM_IOCTL_NR(n)			\
-	(IOCBASECMD(n) &~ (IOC_DIRMASK | (IOCGROUP(n) << IOCGROUP_SHIFT)))
-#define	DRM_MAJOR	cdevsw_lookup_major(_cdevsw)
-#else
-#define DRM_IOCTL_NR(n)_IOC_NR(n)
-#define DRM_MAJOR   226
-#endif
-
-#define DRM_AUTH	0x1
-#define	DRM_MASTER	0x2
-#define DRM_ROOT_ONLY	0x4
-#define DRM_CONTROL_ALLOW 0x8
-#define DRM_UNLOCKED	0x10
-#define DRM_RENDER_ALLOW 0x20
-
-struct drm_ioctl_desc {
-	unsigned int cmd;
-	int flags;
-	drm_ioctl_t *func;
-	const char *name;
-};
-
 /**
  * Creates a driver or general drm_ioctl_desc array entry for the given
  * ioctl, for use by drm_ioctl().
@@ -697,20 +673,6 @@ static inline bool drm_is_primary_client
 /** \name Internal function definitions */
 /*@{*/
 
-/* Driver support (drm_drv.h) */
-extern int drm_ioctl_permit(u32 flags, struct drm_file *file_priv);
-#ifdef __NetBSD__
-extern int drm_ioctl(struct file *, unsigned long, void *);
-extern struct spinlock drm_minor_lock;
-extern struct idr drm_minors_idr;
-#else
-extern long drm_ioctl(struct file *filp,
-		  unsigned int cmd, unsigned long arg);
-extern long drm_compat_ioctl(struct file *filp,
-			 unsigned int cmd, unsigned long arg);
-#endif
-extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
-
 /* Device support (drm_fops.h) */
 #ifdef __NetBSD__
 extern int drm_open_file(struct drm_file *, void *, struct drm_minor *);

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h:1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h:1.4
--- src/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h:1.3	Sun Dec 19 00:57:21 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h	Sun Dec 19 01:56:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_ioctl.h,v 1.3 2021/12/19 00:57:21 riastradh Exp $	*/
+/*	$NetBSD: drm_ioctl.h,v 1.4 2021/12/19 01:56:08 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -69,8 +69,15 @@ typedef int drm_ioctl_t(struct drm_devic
 typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
 			   unsigned long arg);
 
+#ifdef __NetBSD__
+/* XXX Kludge...is there a better way to do this?  */
+#define	DRM_IOCTL_NR(n)			\
+	(IOCBASECMD(n) &~ (IOC_DIRMASK | (IOCGROUP(n) << IOCGROUP_SHIFT)))
+#define	DRM_MAJOR	cdevsw_lookup_major(_cdevsw)
+#else
 #define DRM_IOCTL_NR(n)_IOC_NR(n)
 #define DRM_MAJOR   226
+#endif
 
 /**
  * enum drm_ioctl_flags - DRM ioctl flags



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:08 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_ioctl.h

Log Message:
move drmP drm_ioctl stuff to drm_ioctl.h

including ifdef goo

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:00 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_util.h

Log Message:
drm_can_sleep now lives in drm_util.h, move ifdef goo there.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_util.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.48 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.49
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.48	Sun Dec 19 01:55:45 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.48 2021/12/19 01:55:45 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.49 2021/12/19 01:56:00 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -955,18 +955,6 @@ extern int drm_pcie_get_speed_cap_mask(s
 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);
 
-/* returns true if currently okay to sleep */
-static __inline__ bool drm_can_sleep(void)
-{
-#ifdef __NetBSD__
-	return false;		/* XXX */
-#else
-	if (in_atomic() || in_dbg_master() || irqs_disabled())
-		return false;
-	return true;
-#endif
-}
-
 #ifdef __NetBSD__
 
 /* XXX This is pretty kludgerific.  */

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_util.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_util.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/drm_util.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/drm_util.h:1.2	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_util.h	Sun Dec 19 01:56:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_util.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: drm_util.h,v 1.3 2021/12/19 01:56:00 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -77,9 +77,13 @@
  */
 static inline bool drm_can_sleep(void)
 {
+#ifdef __NetBSD__
+	return false;		/* XXX */
+#else
 	if (in_atomic() || in_dbg_master() || irqs_disabled())
 		return false;
 	return true;
+#endif
 }
 
 #endif



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:56:00 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_util.h

Log Message:
drm_can_sleep now lives in drm_util.h, move ifdef goo there.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_util.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:55:53 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_modes.h

Log Message:
Provide a forward declaration for a struct.

It's used in some function declarations here, easier than figuring
out where it belongs.

we don't have a definition of this, might need it later.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_modes.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/dist/include/drm/drm_modes.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_modes.h:1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_modes.h:1.6
--- src/sys/external/bsd/drm2/dist/include/drm/drm_modes.h:1.5	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_modes.h	Sun Dec 19 01:55:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_modes.h,v 1.5 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: drm_modes.h,v 1.6 2021/12/19 01:55:52 riastradh Exp $	*/
 
 /*
  * Copyright © 2006 Keith Packard
@@ -35,6 +35,7 @@
 #include 
 
 struct videomode;
+struct device_node;
 
 /*
  * Note on terminology:  here, for brevity and convenience, we refer to connector



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:55:53 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_modes.h

Log Message:
Provide a forward declaration for a struct.

It's used in some function declarations here, easier than figuring
out where it belongs.

we don't have a definition of this, might need it later.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_modes.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:55:45 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_device.h

Log Message:
struct drm_device is now in drm_device.h. move netbsd ifdef goo there

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.47 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.48
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.47	Sun Dec 19 01:55:37 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:55:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.47 2021/12/19 01:55:37 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.48 2021/12/19 01:55:45 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -654,159 +654,6 @@ struct drm_vblank_crtc {
 	   once per disable */
 };
 
-/**
- * DRM device structure. This structure represent a complete card that
- * may contain multiple heads.
- */
-struct drm_device {
-	struct list_head legacy_dev_list;/**< list of devices per driver for stealth attach cleanup */
-	int if_version;			/**< Highest interface version set */
-
-	/** \name Lifetime Management */
-	/*@{ */
-	struct kref ref;		/**< Object ref-count */
-	struct device *dev;		/**< Device structure of bus-device */
-	struct drm_driver *driver;	/**< DRM driver managing the device */
-	void *dev_private;		/**< DRM driver private data */
-	struct drm_minor *control;		/**< Control node */
-	struct drm_minor *primary;		/**< Primary node */
-	struct drm_minor *render;		/**< Render node */
-	atomic_t unplugged;			/**< Flag whether dev is dead */
-	struct inode *anon_inode;		/**< inode for private address-space */
-	char *unique;/**< unique name of the device */
-	/*@} */
-
-	/** \name Locks */
-	/*@{ */
-	struct mutex struct_mutex;	/**< For others */
-	struct mutex master_mutex;  /**< For drm_minor::master and drm_file::is_master */
-	/*@} */
-
-	/** \name Usage Counters */
-	/*@{ */
-	int open_count;			/**< Outstanding files open, protected by drm_global_mutex. */
-	spinlock_t buf_lock;		/**< For drm_device::buf_use and a few other things. */
-	int buf_use;			/**< Buffers in use -- cannot alloc */
-	atomic_t buf_alloc;		/**< Buffer allocation in progress */
-	/*@} */
-
-	struct list_head filelist;
-
-	/** \name Memory management */
-	/*@{ */
-	struct list_head maplist;	/**< Linked list of regions */
-	struct drm_open_hash map_hash;	/**< User token hash table for maps */
-
-	/** \name Context handle management */
-	/*@{ */
-	struct list_head ctxlist;	/**< Linked list of context handles */
-	struct mutex ctxlist_mutex;	/**< For ctxlist */
-
-	struct idr ctx_idr;
-
-	struct list_head vmalist;	/**< List of vmas (for debugging) */
-
-	/*@} */
-
-	/** \name DMA support */
-	/*@{ */
-	struct drm_device_dma *dma;		/**< Optional pointer for DMA support */
-	/*@} */
-
-	/** \name Context support */
-	/*@{ */
-
-	__volatile__ long context_flag;	/**< Context swapping flag */
-	int last_context;		/**< Last current context */
-	/*@} */
-
-	/** \name VBLANK IRQ support */
-	/*@{ */
-	bool irq_enabled;
-	int irq;
-#ifdef __NetBSD__
-	struct drm_bus_irq_cookie *irq_cookie;
-#endif
-
-	/*
-	 * At load time, disabling the vblank interrupt won't be allowed since
-	 * old clients may not call the modeset ioctl and therefore misbehave.
-	 * Once the modeset ioctl *has* been called though, we can safely
-	 * disable them when unused.
-	 */
-	bool vblank_disable_allowed;
-
-	/*
-	 * If true, vblank interrupt will be disabled immediately when the
-	 * refcount drops to zero, as opposed to via the vblank disable
-	 * timer.
-	 * This can be set to true it the hardware has a working vblank
-	 * counter and the driver uses drm_vblank_on() and drm_vblank_off()
-	 * appropriately.
-	 */
-	bool vblank_disable_immediate;
-
-	/* array of size num_crtcs */
-	struct drm_vblank_crtc *vblank;
-
-	spinlock_t vblank_time_lock;/**< Protects vblank count and time updates during vblank enable/disable */
-	spinlock_t vbl_lock;
-
-	u32 max_vblank_count;   /**< size of vblank counter register */
-
-	/**
-	 * List of events
-	 */
-	struct list_head vblank_event_list;
-	spinlock_t event_lock;
-
-	/*@} */
-
-	struct drm_agp_head *agp;	/**< AGP data */
-
-	struct pci_dev *pdev;		/**< PCI device structure */
-#ifdef __alpha__
-	struct pci_controller *hose;
-#endif
-
-	struct platform_device *platformdev; /**< Platform device struture */
-	struct virtio_device *virtdev;
-
-#ifdef __NetBSD__
-	bus_space_tag_t bst;
-	struct drm_bus_map *bus_maps;
-	unsigned bus_nmaps;
-	bus_dma_tag_t bus_dmat;	/* 

CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:55:45 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_device.h

Log Message:
struct drm_device is now in drm_device.h. move netbsd ifdef goo there

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/include/drm/drm_device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:55:37 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove duplicate drm debug prints (now moved to debug_print.h)

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.46 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.47
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.46	Sun Dec 19 01:49:00 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:55:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.46 2021/12/19 01:49:00 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.47 2021/12/19 01:55:37 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -110,160 +110,6 @@ struct videomode;
 struct reservation_object;
 struct dma_buf_attachment;
 
-/*
- * 4 debug categories are defined:
- *
- * CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, drm_memory.c, ...
- *	 This is the category used by the DRM_DEBUG() macro.
- *
- * DRIVER: Used in the vendor specific part of the driver: i915, radeon, ...
- *	   This is the category used by the DRM_DEBUG_DRIVER() macro.
- *
- * KMS: used in the modesetting code.
- *	This is the category used by the DRM_DEBUG_KMS() macro.
- *
- * PRIME: used in the prime code.
- *	  This is the category used by the DRM_DEBUG_PRIME() macro.
- *
- * ATOMIC: used in the atomic code.
- *	  This is the category used by the DRM_DEBUG_ATOMIC() macro.
- *
- * VBL: used for verbose debug message in the vblank code
- *	  This is the category used by the DRM_DEBUG_VBL() macro.
- *
- * Enabling verbose debug messages is done through the drm.debug parameter,
- * each category being enabled by a bit.
- *
- * drm.debug=0x1 will enable CORE messages
- * drm.debug=0x2 will enable DRIVER messages
- * drm.debug=0x3 will enable CORE and DRIVER messages
- * ...
- * drm.debug=0x3f will enable all messages
- *
- * An interesting feature is that it's possible to enable verbose logging at
- * run-time by echoing the debug value in its sysfs node:
- *   # echo 0xf > /sys/module/drm/parameters/debug
- */
-#define DRM_UT_CORE 		0x01
-#define DRM_UT_DRIVER		0x02
-#define DRM_UT_KMS		0x04
-#define DRM_UT_PRIME		0x08
-#define DRM_UT_ATOMIC		0x10
-#define DRM_UT_VBL		0x20
-
-extern __printf(2, 3)
-void drm_ut_debug_printk(const char *function_name,
-			 const char *format, ...);
-extern __printf(4, 5)
-void drm_err(const char *file, int line, const char *func, const char *format, ...);
-
-/***/
-/** \name DRM template customization defaults */
-/*@{*/
-
-/* driver capabilities and requirements mask */
-#define DRIVER_USE_AGP			0x1
-#define DRIVER_PCI_DMA			0x8
-#define DRIVER_SG			0x10
-#define DRIVER_HAVE_DMA			0x20
-#define DRIVER_HAVE_IRQ			0x40
-#define DRIVER_IRQ_SHARED		0x80
-#define DRIVER_GEM			0x1000
-#define DRIVER_MODESET			0x2000
-#define DRIVER_PRIME			0x4000
-#define DRIVER_RENDER			0x8000
-#define DRIVER_ATOMIC			0x1
-#define DRIVER_KMS_LEGACY_CONTEXT	0x2
-
-/***/
-/** \name Macros to make printk easier */
-/*@{*/
-
-#define _DRM_PRINTK(once, level, fmt, ...)\
-	do {\
-		printk##once(KERN_##level "[" DRM_NAME "] " fmt,	\
-			 ##__VA_ARGS__);\
-	} while (0)
-
-#define DRM_INFO(fmt, ...)		\
-	_DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
-#define DRM_NOTE(fmt, ...)		\
-	_DRM_PRINTK(, NOTICE, fmt, ##__VA_ARGS__)
-#define DRM_WARN(fmt, ...)		\
-	_DRM_PRINTK(, WARNING, fmt, ##__VA_ARGS__)
-
-#define DRM_INFO_ONCE(fmt, ...)		\
-	_DRM_PRINTK(_once, INFO, fmt, ##__VA_ARGS__)
-#define DRM_NOTE_ONCE(fmt, ...)		\
-	_DRM_PRINTK(_once, NOTICE, fmt, ##__VA_ARGS__)
-#define DRM_WARN_ONCE(fmt, ...)		\
-	_DRM_PRINTK(_once, WARNING, fmt, ##__VA_ARGS__)
-
-/**
- * Error output.
- *
- * \param fmt printf() like format string.
- * \param arg arguments
- */
-#define DRM_ERROR(fmt, ...)\
-	drm_err(__FILE__, __LINE__, __func__, fmt, ##__VA_ARGS__)
-
-/**
- * Rate limited error output.  Like DRM_ERROR() but won't flood the log.
- *
- * \param fmt printf() like format string.
- * \param arg arguments
- */
-#define DRM_ERROR_RATELIMITED(fmt, ...)\
-({	\
-	static DEFINE_RATELIMIT_STATE(_rs,\
-  DEFAULT_RATELIMIT_INTERVAL,	\
-  DEFAULT_RATELIMIT_BURST);		\
-	\
-	if (__ratelimit(&_rs))		\
-		drm_err(__FILE__, __LINE__, __func__, fmt, ##__VA_ARGS__);\
-})
-
-/**
- * Debug output.
- *
- * \param fmt printf() like format string.
- * \param arg arguments
- */
-#define DRM_DEBUG(fmt, args...)		\
-	do 

CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:55:37 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
Remove duplicate drm debug prints (now moved to debug_print.h)

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:54:35 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
Put a guess for what the netbsd mmap type will be.

Probably the same as drm_gem_mmap_object?

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.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/dist/include/drm/drm_gem.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.7 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.8
--- src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h:1.7	Sun Dec 19 00:59:10 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h	Sun Dec 19 01:54:35 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_gem.h,v 1.7 2021/12/19 00:59:10 riastradh Exp $	*/
+/*	$NetBSD: drm_gem.h,v 1.8 2021/12/19 01:54:35 riastradh Exp $	*/
 
 #ifndef __DRM_GEM_H__
 #define __DRM_GEM_H__
@@ -168,7 +168,12 @@ struct drm_gem_object_funcs {
 	 * drm_gem_prime_mmap().  When @mmap is present @vm_ops is not
 	 * used, the @mmap callback must set vma->vm_ops instead.
 	 */
+#ifdef __NetBSD__
+	int (*mmap)(struct drm_device *, off_t, size_t, int, struct uvm_object **,
+	voff_t *, struct file *);
+#else
 	int (*mmap)(struct drm_gem_object *obj, struct vm_area_struct *vma);
+#endif
 
 	/**
 	 * @vm_ops:



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:54:35 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_gem.h

Log Message:
Put a guess for what the netbsd mmap type will be.

Probably the same as drm_gem_mmap_object?

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/include/drm/drm_gem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:54:28 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_auth.h

Log Message:
Use the netbsd-ish drm_waitqueue_t

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_auth.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/dist/include/drm/drm_auth.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_auth.h:1.3 src/sys/external/bsd/drm2/dist/include/drm/drm_auth.h:1.4
--- src/sys/external/bsd/drm2/dist/include/drm/drm_auth.h:1.3	Sun Dec 19 01:01:42 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_auth.h	Sun Dec 19 01:54:28 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_auth.h,v 1.3 2021/12/19 01:01:42 riastradh Exp $	*/
+/*	$NetBSD: drm_auth.h,v 1.4 2021/12/19 01:54:28 riastradh Exp $	*/
 
 #ifndef _DRM_AUTH_H_
 #define _DRM_AUTH_H_
@@ -61,7 +61,11 @@ struct drm_master;
 struct drm_lock_data {
 	struct drm_hw_lock *hw_lock;
 	struct drm_file *file_priv;
+#ifdef __NetBSD__
+	drm_waitqueue_t lock_queue; /**< Queue of blocked processes */
+#else
 	wait_queue_head_t lock_queue;
+#endif
 	unsigned long lock_time;
 	spinlock_t spinlock;
 	uint32_t kernel_waiters;



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:54:28 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_auth.h

Log Message:
Use the netbsd-ish drm_waitqueue_t

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/include/drm/drm_auth.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:49:44 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_cache.h

Log Message:
Forward-declare some structs.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/drm_cache.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/dist/include/drm/drm_cache.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.6 src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.7
--- src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.6	Sun Dec 19 01:49:00 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h	Sun Dec 19 01:49:44 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_cache.h,v 1.6 2021/12/19 01:49:00 riastradh Exp $	*/
+/*	$NetBSD: drm_cache.h,v 1.7 2021/12/19 01:49:44 riastradh Exp $	*/
 
 /**
  *
@@ -40,8 +40,11 @@
 #endif
 #include 
 
+struct page;
+
 void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
 #ifdef __NetBSD__		/* XXX drm clflush */
+struct pglist;
 void drm_clflush_pglist(struct pglist *);
 void drm_clflush_page(struct page *);
 void drm_clflush_virt_range(const void *, size_t);



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:49:44 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_cache.h

Log Message:
Forward-declare some structs.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:49:37 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_bo_api.h

Log Message:
Move #endif earlier to avoid excluding useful prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.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/dist/include/drm/ttm/ttm_bo_api.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h:1.5 src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h:1.6
--- src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h:1.5	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h	Sun Dec 19 01:49:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_bo_api.h,v 1.5 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: ttm_bo_api.h,v 1.6 2021/12/19 01:49:36 riastradh Exp $	*/
 
 /**
  *
@@ -719,12 +719,12 @@ int ttm_bo_mmap_obj(struct vm_area_struc
 int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma,
 		struct ttm_bo_device *bdev);
 
+#endif	/* __NetBSD__ */
+
 void *ttm_kmap_atomic_prot(struct page *page, pgprot_t prot);
 
 void ttm_kunmap_atomic_prot(void *addr, pgprot_t prot);
 
-#endif	/* __NetBSD__ */
-
 /**
  * ttm_bo_io
  *



CVS commit: src/sys/external/bsd/drm2/dist/include/drm/ttm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:49:37 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm/ttm: ttm_bo_api.h

Log Message:
Move #endif earlier to avoid excluding useful prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:49:00 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_cache.h

Log Message:
These declarations moved to drm_cache.h, move them along.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_cache.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.45 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.46
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.45	Sun Dec 19 01:34:39 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:49:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.45 2021/12/19 01:34:39 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.46 2021/12/19 01:49:00 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -1041,17 +1041,6 @@ int drm_noop(struct drm_device *dev, voi
 int drm_invalid_op(struct drm_device *dev, void *data,
 		   struct drm_file *file_priv);
 
-/* Cache management (drm_cache.c) */
-void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
-#ifdef __NetBSD__		/* XXX drm clflush */
-void drm_clflush_pglist(struct pglist *);
-void drm_clflush_page(struct page *);
-void drm_clflush_virt_range(const void *, size_t);
-#else
-void drm_clflush_sg(struct sg_table *st);
-void drm_clflush_virt_range(void *addr, unsigned long length);
-#endif
-
 /*
  * These are exported to drivers so that they can implement fencing using
  * DMA quiscent + idle. DMA quiescent usually requires the hardware lock.

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.6
--- src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h:1.5	Sat Dec 18 23:45:45 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h	Sun Dec 19 01:49:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_cache.h,v 1.5 2021/12/18 23:45:45 riastradh Exp $	*/
+/*	$NetBSD: drm_cache.h,v 1.6 2021/12/19 01:49:00 riastradh Exp $	*/
 
 /**
  *
@@ -41,8 +41,14 @@
 #include 
 
 void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
+#ifdef __NetBSD__		/* XXX drm clflush */
+void drm_clflush_pglist(struct pglist *);
+void drm_clflush_page(struct page *);
+void drm_clflush_virt_range(const void *, size_t);
+#else
 void drm_clflush_sg(struct sg_table *st);
 void drm_clflush_virt_range(void *addr, unsigned long length);
+#endif
 bool drm_need_swiotlb(int dma_bits);
 
 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:49:00 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_cache.h

Log Message:
These declarations moved to drm_cache.h, move them along.

Author: Maya Rashish 


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_cache.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:34:39 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
drm_io_mapping_init_wc


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/external/bsd/drm2/dist/include/drm/drmP.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/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.44 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.45
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.44	Sun Dec 19 00:27:25 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:34:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.44 2021/12/19 00:27:25 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.45 2021/12/19 01:34:39 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -1298,6 +1298,13 @@ drm_io_mapping_create_wc(struct drm_devi
 	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__) */
 
 #ifdef __NetBSD__



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:34:39 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
drm_io_mapping_init_wc


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:14:36 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_vblank.h

Log Message:
ktime_t needs 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.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/dist/include/drm/drm_vblank.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.6
--- src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.5	Sun Dec 19 00:47:17 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h	Sun Dec 19 01:14:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_vblank.h,v 1.5 2021/12/19 00:47:17 riastradh Exp $	*/
+/*	$NetBSD: drm_vblank.h,v 1.6 2021/12/19 01:14:36 riastradh Exp $	*/
 
 /*
  * Copyright 2016 Intel Corp.
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:14:36 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_vblank.h

Log Message:
ktime_t needs 


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:02:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_fb_helper.h

Log Message:
Ifdef out drm_fb_helper_ioctl too.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.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/dist/include/drm/drm_fb_helper.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.10 src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.11
--- src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.10	Sun Dec 19 01:02:25 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h	Sun Dec 19 01:02:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_fb_helper.h,v 1.10 2021/12/19 01:02:25 riastradh Exp $	*/
+/*	$NetBSD: drm_fb_helper.h,v 1.11 2021/12/19 01:02:34 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -274,10 +274,10 @@ void drm_fb_helper_set_suspend_unlocked(
 
 #ifndef __NetBSD__		/* XXX fb cmap */
 int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
-#endif
 
 int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd,
 			unsigned long arg);
+#endif
 
 int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
 int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:02:34 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_fb_helper.h

Log Message:
Ifdef out drm_fb_helper_ioctl too.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:02:25 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_fb_helper.h

Log Message:
Forward decl to minimize patch.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.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/dist/include/drm/drm_fb_helper.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.9 src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.10
--- src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.9	Sat Dec 18 23:45:45 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h	Sun Dec 19 01:02:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_fb_helper.h,v 1.9 2021/12/18 23:45:45 riastradh Exp $	*/
+/*	$NetBSD: drm_fb_helper.h,v 1.10 2021/12/19 01:02:25 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -32,6 +32,7 @@
 #ifndef DRM_FB_HELPER_H
 #define DRM_FB_HELPER_H
 
+struct apertures_struct;
 struct drm_fb_helper;
 
 #include 



CVS commit: src/sys/external/bsd/drm2/dist/include/drm

2021-12-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 19 01:02:25 UTC 2021

Modified Files:
src/sys/external/bsd/drm2/dist/include/drm: drm_fb_helper.h

Log Message:
Forward decl to minimize patch.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   >