From 5b38e134163cc375e91424c4688cc9328c6e9082 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 19 Jul 2007 17:11:11 -0700 Subject: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE. The data is now in kernel space, copied in/out as appropriate according to the This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DRM is lost. --- bsd-core/drm_agpsupport.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'bsd-core/drm_agpsupport.c') diff --git a/bsd-core/drm_agpsupport.c b/bsd-core/drm_agpsupport.c index 28239d1b..e8e162de 100644 --- a/bsd-core/drm_agpsupport.c +++ b/bsd-core/drm_agpsupport.c @@ -125,11 +125,10 @@ int drm_agp_info(drm_device_t * dev, drm_agp_info_t *info) return 0; } -int drm_agp_info_ioctl(DRM_IOCTL_ARGS) +int drm_agp_info_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { int err; drm_agp_info_t info; - DRM_DEVICE; err = drm_agp_info(dev, &info); if (err != 0) @@ -139,9 +138,8 @@ int drm_agp_info_ioctl(DRM_IOCTL_ARGS) return 0; } -int drm_agp_acquire_ioctl(DRM_IOCTL_ARGS) +int drm_agp_acquire_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { - DRM_DEVICE; return drm_agp_acquire(dev); } @@ -161,9 +159,8 @@ int drm_agp_acquire(drm_device_t *dev) return 0; } -int drm_agp_release_ioctl(DRM_IOCTL_ARGS) +int drm_agp_release_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { - DRM_DEVICE; return drm_agp_release(dev); } @@ -190,10 +187,9 @@ int drm_agp_enable(drm_device_t *dev, drm_agp_mode_t mode) return 0; } -int drm_agp_enable_ioctl(DRM_IOCTL_ARGS) +int drm_agp_enable_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { drm_agp_mode_t mode; - DRM_DEVICE; mode = *(drm_agp_mode_t *) data; @@ -243,9 +239,8 @@ int drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request) return 0; } -int drm_agp_alloc_ioctl(DRM_IOCTL_ARGS) +int drm_agp_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { - DRM_DEVICE; drm_agp_buffer_t request; int retcode; @@ -292,9 +287,8 @@ int drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request) return retcode; } -int drm_agp_unbind_ioctl(DRM_IOCTL_ARGS) +int drm_agp_unbind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { - DRM_DEVICE; drm_agp_binding_t request; int retcode; @@ -333,9 +327,8 @@ int drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request) return retcode; } -int drm_agp_bind_ioctl(DRM_IOCTL_ARGS) +int drm_agp_bind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { - DRM_DEVICE; drm_agp_binding_t request; int retcode; @@ -378,9 +371,8 @@ int drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request) } -int drm_agp_free_ioctl(DRM_IOCTL_ARGS) +int drm_agp_free_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) { - DRM_DEVICE; drm_agp_buffer_t request; int retcode; -- cgit v1.2.3