Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/include/drm move drmP drm_ioctl s...
details: https://anonhg.NetBSD.org/src/rev/5ffe8304c46d
branches: trunk
changeset: 1028126:5ffe8304c46d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:56:08 2021 +0000
description:
move drmP drm_ioctl stuff to drm_ioctl.h
including ifdef goo
Author: Maya Rashish <maya%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/include/drm/drmP.h | 40 +---------------------
sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h | 9 ++++-
2 files changed, 9 insertions(+), 40 deletions(-)
diffs (86 lines):
diff -r f04528ca332a -r 5ffe8304c46d sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h Sun Dec 19 01:56:00 2021 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h Sun Dec 19 01:56:08 2021 +0000
@@ -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_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(&drm_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 @@
/** \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 *);
diff -r f04528ca332a -r 5ffe8304c46d sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h Sun Dec 19 01:56:00 2021 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_ioctl.h Sun Dec 19 01:56:08 2021 +0000
@@ -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_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(&drm_cdevsw)
+#else
#define DRM_IOCTL_NR(n) _IOC_NR(n)
#define DRM_MAJOR 226
+#endif
/**
* enum drm_ioctl_flags - DRM ioctl flags
Home |
Main Index |
Thread Index |
Old Index