From e0b761290ebb6c726126444ac954ccddf594d6c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Tigeot?= Date: Tue, 14 Mar 2017 17:23:20 +0100 Subject: [PATCH] kernel: Remove broken DRM_LINUX option --- sys/conf/options | 1 - sys/config/LINT64 | 1 - sys/dev/drm/drm_drv.c | 44 -------------------------- sys/dev/drm/include/drm/drm_os_linux.h | 2 -- 4 files changed, 48 deletions(-) diff --git a/sys/conf/options b/sys/conf/options index 6ce9b4ed91..40f26cd7dc 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -369,7 +369,6 @@ AGP_DEBUG opt_agp.h # DRM options DRM_DEBUG opt_drm.h -DRM_LINUX opt_drm.h # DPT driver debug flags DPT_MEASURE_PERFORMANCE opt_dpt.h diff --git a/sys/config/LINT64 b/sys/config/LINT64 index 8a46c79ee8..5f023a170b 100644 --- a/sys/config/LINT64 +++ b/sys/config/LINT64 @@ -2129,7 +2129,6 @@ device "i915" device radeon options DRM_DEBUG -options DRM_LINUX # # Misc devices diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index d61ee3c502..6fe54fb98d 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -1275,52 +1275,12 @@ drm_mmap_single(struct dev_mmap_single_args *ap) } } -/* XXX broken code */ -#if DRM_LINUX - -#include - -MODULE_DEPEND(DRIVER_NAME, linux, 1, 1, 1); - -#define LINUX_IOCTL_DRM_MIN 0x6400 -#define LINUX_IOCTL_DRM_MAX 0x64ff - -static linux_ioctl_function_t drm_linux_ioctl; -static struct linux_ioctl_handler drm_handler = {drm_linux_ioctl, - LINUX_IOCTL_DRM_MIN, LINUX_IOCTL_DRM_MAX}; - -/* The bits for in/out are switched on Linux */ -#define LINUX_IOC_IN IOC_OUT -#define LINUX_IOC_OUT IOC_IN - -static int -drm_linux_ioctl(DRM_STRUCTPROC *p, struct linux_ioctl_args* args) -{ - int error; - int cmd = args->cmd; - - args->cmd &= ~(LINUX_IOC_IN | LINUX_IOC_OUT); - if (cmd & LINUX_IOC_IN) - args->cmd |= IOC_IN; - if (cmd & LINUX_IOC_OUT) - args->cmd |= IOC_OUT; - - error = ioctl(p, (struct ioctl_args *)args); - - return error; -} -#endif /* DRM_LINUX */ - static int drm_core_init(void *arg) { drm_global_init(); -#if DRM_LINUX - linux_ioctl_register_handler(&drm_handler); -#endif /* DRM_LINUX */ - DRM_INFO("Initialized %s %d.%d.%d %s\n", CORE_NAME, CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE); return 0; @@ -1330,10 +1290,6 @@ static void drm_core_exit(void *arg) { -#if DRM_LINUX - linux_ioctl_unregister_handler(&drm_handler); -#endif /* DRM_LINUX */ - drm_global_release(); } diff --git a/sys/dev/drm/include/drm/drm_os_linux.h b/sys/dev/drm/include/drm/drm_os_linux.h index aa3ac5b00c..da6f22fb89 100644 --- a/sys/dev/drm/include/drm/drm_os_linux.h +++ b/sys/dev/drm/include/drm/drm_os_linux.h @@ -20,8 +20,6 @@ # define DRM_DEBUG_DEFAULT_ON 1 # endif #undef DRM_DEBUG -/* XXX disable DRM_LINUX for now to unbreak LINT64 */ -#undef DRM_LINUX #endif /* DRM_DEBUG */ #endif /* DragonFly */ -- 2.41.0