summaryrefslogtreecommitdiff
path: root/bsd/drm_agpsupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd/drm_agpsupport.h')
-rw-r--r--bsd/drm_agpsupport.h54
1 files changed, 24 insertions, 30 deletions
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 <vm/vm.h>
-#include <vm/pmap.h>
-#if __REALLY_HAVE_AGP
-#include <sys/agpio.h>
-#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;