summaryrefslogtreecommitdiff
path: root/bsd-core/drm_vm.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-11-06 01:41:47 +0000
committerEric Anholt <anholt@freebsd.org>2004-11-06 01:41:47 +0000
commitc9202c89653b8dac2ac322c3d3a7389945e1c94c (patch)
treeda57c01384977ea6a2962cfaac9c7c426da2c0f8 /bsd-core/drm_vm.c
parent39a23640b2de9e59e99d48e6de8c9edae0231856 (diff)
Commit WIP of BSD conversion to core model. Compiles for r128, radeon, but
doesn't run yet. Moves the ioctl definitions for these two drivers back to the shared code -- they aren't OS-specific.
Diffstat (limited to 'bsd-core/drm_vm.c')
-rw-r--r--bsd-core/drm_vm.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/bsd-core/drm_vm.c b/bsd-core/drm_vm.c
index e0d710fa..da6d7773 100644
--- a/bsd-core/drm_vm.c
+++ b/bsd-core/drm_vm.c
@@ -22,13 +22,16 @@
* DEALINGS IN THE SOFTWARE.
*/
+#include "drmP.h"
+#include "drm.h"
+
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
-static int DRM(dma_mmap)(struct cdev *kdev, vm_offset_t offset,
+static int drm_dma_mmap(struct cdev *kdev, vm_offset_t offset,
vm_paddr_t *paddr, int prot)
#elif defined(__FreeBSD__)
-static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
+static int drm_dma_mmap(dev_t kdev, vm_offset_t offset, int prot)
#elif defined(__NetBSD__)
-static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
+static paddr_t drm_dma_mmap(dev_t kdev, vm_offset_t offset, int prot)
#endif
{
DRM_DEVICE;
@@ -52,12 +55,12 @@ static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
}
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
-int DRM(mmap)(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr,
+int drm_mmap(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr,
int prot)
#elif defined(__FreeBSD__)
-int DRM(mmap)(dev_t kdev, vm_offset_t offset, int prot)
+int drm_mmap(dev_t kdev, vm_offset_t offset, int prot)
#elif defined(__NetBSD__)
-paddr_t DRM(mmap)(dev_t kdev, off_t offset, int prot)
+paddr_t drm_mmap(dev_t kdev, off_t offset, int prot)
#endif
{
DRM_DEVICE;
@@ -74,9 +77,9 @@ paddr_t DRM(mmap)(dev_t kdev, off_t offset, int prot)
&& offset >= 0
&& offset < ptoa(dev->dma->page_count))
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
- return DRM(dma_mmap)(kdev, offset, paddr, prot);
+ return drm_dma_mmap(kdev, offset, paddr, prot);
#else
- return DRM(dma_mmap)(kdev, offset, prot);
+ return drm_dma_mmap(kdev, offset, prot);
#endif
/* A sequential search of a linked list is