diff options
author | anholt <anholt@FreeBSD.org> | 2002-04-29 18:18:42 +0000 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2002-04-29 18:18:42 +0000 |
commit | f449944be8fd359010c95701a1a74b2685ea4467 (patch) | |
tree | 82f1baf5974fa0ac643272b9373e05eb7b3d67ef /sys/dev/drm/drm_bufs.h | |
parent | 38d2985e9b4d507e97a7aab9a2c08d5410b080b3 (diff) | |
download | FreeBSD-src-f449944be8fd359010c95701a1a74b2685ea4467.zip FreeBSD-src-f449944be8fd359010c95701a1a74b2685ea4467.tar.gz |
More diff reduction: Shuffle around some header code as was done in
drmcommand-0-0-1-branch of DRI CVS, more return code cleanup, and remove some
gratuitous ifdefs.
Approved by: des
Diffstat (limited to 'sys/dev/drm/drm_bufs.h')
-rw-r--r-- | sys/dev/drm/drm_bufs.h | 46 |
1 files changed, 13 insertions, 33 deletions
diff --git a/sys/dev/drm/drm_bufs.h b/sys/dev/drm/drm_bufs.h index 80308aa..1524e9d 100644 --- a/sys/dev/drm/drm_bufs.h +++ b/sys/dev/drm/drm_bufs.h @@ -65,6 +65,16 @@ #endif #endif +#if __REALLY_HAVE_AGP +int DRM(addbufs_agp)( DRM_OS_IOCTL ); +#endif +#if __HAVE_PCI_DMA +int DRM(addbufs_pci)( DRM_OS_IOCTL ); +#endif +#if __REALLY_HAVE_SG +int DRM(addbufs_sg)( DRM_OS_IOCTL ); +#endif + /* * Compute order. Can be made faster. */ @@ -136,21 +146,6 @@ int DRM(addmap)( DRM_OS_IOCTL ) map->mtrr = -1; map->handle = 0; -#ifdef __FreeBSD__ - TAILQ_FOREACH(list, dev->maplist, link) { - drm_map_t *entry = list->map; - if ( (entry->offset >= map->offset - && (entry->offset) < (map->offset + map->size) ) - || ((entry->offset + entry->size) >= map->offset - && (entry->offset + entry->size) < (map->offset + map->size) ) - || ((entry->offset < map->offset) - && (entry->offset + entry->size) >= (map->offset + map->size) ) ) - DRM_DEBUG("map collission: add(0x%lx-0x%lx), current(0x%lx-0x%lx)\n", - entry->offset, entry->offset + entry->size - 1, - map->offset, map->offset + map->size - 1); - } -#endif /* __FreeBSD__ */ - switch ( map->type ) { case _DRM_REGISTERS: case _DRM_FRAME_BUFFER: @@ -973,31 +968,16 @@ int DRM(addbufs)( DRM_OS_IOCTL ) #if __REALLY_HAVE_AGP if ( request.flags & _DRM_AGP_BUFFER ) -#ifdef __linux__ - return DRM(addbufs_agp)( inode, filp, cmd, data ); -#endif /* __linux__ */ -#ifdef __FreeBSD__ - return DRM(addbufs_agp)( kdev, cmd, data, flags, p ); -#endif /* __FreeBSD__ */ + return DRM(addbufs_agp)( IOCTL_ARGS_PASS ); else #endif #if __REALLY_HAVE_SG if ( request.flags & _DRM_SG_BUFFER ) -#ifdef __linux__ - return DRM(addbufs_sg)( inode, filp, cmd, data ); -#endif /* __linux__ */ -#ifdef __FreeBSD__ - return DRM(addbufs_sg)( kdev, cmd, data, flags, p ); -#endif /* __FreeBSD__ */ + return DRM(addbufs_sg)( IOCTL_ARGS_PASS ); else #endif #if __HAVE_PCI_DMA -#ifdef __linux__ - return DRM(addbufs_pci)( inode, filp, cmd, data ); -#endif /* __linux__ */ -#ifdef __FreeBSD__ - return DRM(addbufs_pci)( kdev, cmd, data, flags, p ); -#endif /* __FreeBSD__ */ + return DRM(addbufs_pci)( IOCTL_ARGS_PASS ); #else return DRM_OS_ERR(EINVAL); #endif |