From 74ef13fd009b9e37956e4207d0a5ed92f4b5e39a Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Fri, 5 Jul 2002 08:31:11 +0000 Subject: merged bsd-3-0-0-branch --- bsd/drm_agpsupport.h | 54 +++++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) (limited to 'bsd/drm_agpsupport.h') diff --git a/bsd/drm_agpsupport.h b/bsd/drm_agpsupport.h index ac12c867..66de1053 100644 --- a/bsd/drm_agpsupport.h +++ b/bsd/drm_agpsupport.h @@ -31,15 +31,9 @@ #include "drmP.h" -#include -#include -#if __REALLY_HAVE_AGP -#include -#endif - -int DRM(agp_info)(DRM_OS_IOCTL) +int DRM(agp_info)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; struct agp_info *kern; drm_agp_info_t info; @@ -61,9 +55,9 @@ int DRM(agp_info)(DRM_OS_IOCTL) return 0; } -int DRM(agp_acquire)(DRM_OS_IOCTL) +int DRM(agp_acquire)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; int retcode; if (!dev->agp || dev->agp->acquired) return EINVAL; @@ -73,9 +67,9 @@ int DRM(agp_acquire)(DRM_OS_IOCTL) return 0; } -int DRM(agp_release)(DRM_OS_IOCTL) +int DRM(agp_release)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; if (!dev->agp || !dev->agp->acquired) return EINVAL; @@ -89,14 +83,14 @@ void DRM(agp_do_release)(void) { device_t agpdev; - agpdev = agp_find_device(); + agpdev = DRM_AGP_FIND_DEVICE(); if (agpdev) agp_release(agpdev); } -int DRM(agp_enable)(DRM_OS_IOCTL) +int DRM(agp_enable)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; drm_agp_mode_t mode; if (!dev->agp || !dev->agp->acquired) return EINVAL; @@ -110,9 +104,9 @@ int DRM(agp_enable)(DRM_OS_IOCTL) return 0; } -int DRM(agp_alloc)(DRM_OS_IOCTL) +int DRM(agp_alloc)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; drm_agp_buffer_t request; drm_agp_mem_t *entry; void *handle; @@ -165,9 +159,9 @@ static drm_agp_mem_t * DRM(agp_lookup_entry)(drm_device_t *dev, void *handle) return NULL; } -int DRM(agp_unbind)(DRM_OS_IOCTL) +int DRM(agp_unbind)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; drm_agp_binding_t request; drm_agp_mem_t *entry; int retcode; @@ -187,9 +181,9 @@ int DRM(agp_unbind)(DRM_OS_IOCTL) return retcode; } -int DRM(agp_bind)(DRM_OS_IOCTL) +int DRM(agp_bind)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; drm_agp_binding_t request; drm_agp_mem_t *entry; int retcode; @@ -209,9 +203,9 @@ int DRM(agp_bind)(DRM_OS_IOCTL) return 0; } -int DRM(agp_free)(DRM_OS_IOCTL) +int DRM(agp_free)(DRM_IOCTL_ARGS) { - drm_device_t *dev = kdev->si_drv1; + DRM_DEVICE; drm_agp_buffer_t request; drm_agp_mem_t *entry; @@ -235,7 +229,7 @@ drm_agp_head_t *DRM(agp_init)(void) drm_agp_head_t *head = NULL; int agp_available = 1; - agpdev = agp_find_device(); + agpdev = DRM_AGP_FIND_DEVICE(); if (!agpdev) agp_available = 0; @@ -267,9 +261,9 @@ drm_agp_head_t *DRM(agp_init)(void) default: } #endif - DRM_INFO("AGP at 0x%08x %dMB\n", + DRM_INFO("AGP at 0x%08lx %dMB\n", head->info.ai_aperture_base, - head->info.ai_aperture_size >> 20); + (int)(head->info.ai_aperture_size >> 20)); } return head; } @@ -284,7 +278,7 @@ agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type) { device_t agpdev; - agpdev = agp_find_device(); + agpdev = DRM_AGP_FIND_DEVICE(); if (!agpdev) return NULL; @@ -295,7 +289,7 @@ int DRM(agp_free_memory)(agp_memory *handle) { device_t agpdev; - agpdev = agp_find_device(); + agpdev = DRM_AGP_FIND_DEVICE(); if (!agpdev || !handle) return 0; @@ -307,7 +301,7 @@ int DRM(agp_bind_memory)(agp_memory *handle, off_t start) { device_t agpdev; - agpdev = agp_find_device(); + agpdev = DRM_AGP_FIND_DEVICE(); if (!agpdev || !handle) return EINVAL; @@ -318,7 +312,7 @@ int DRM(agp_unbind_memory)(agp_memory *handle) { device_t agpdev; - agpdev = agp_find_device(); + agpdev = DRM_AGP_FIND_DEVICE(); if (!agpdev || !handle) return EINVAL; -- cgit v1.2.3