From a10d8178e32528e0fd8a7afa24e71a35b1c0582d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 8 Nov 2005 20:25:00 +0000 Subject: Initial port of savage to FreeBSD for the AGP and !ShadowStatus case. Adds drm_mtrr_{add,del} for handling the MTRR setup. Still has a LOR issue with DRM_VERIFYAREA_READ/DRM_COPY_FROM_USER_UNCHECKED in savage_bci.c -- this won't work with the fine-grained locking in use, and just doing a single copyin to a temporary will probably work fine. Also note that the module leaks approximately 4 kb on unload. --- bsd-core/savage_drv.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'bsd-core/savage_drv.c') diff --git a/bsd-core/savage_drv.c b/bsd-core/savage_drv.c index c9a2fb10..71b5065b 100644 --- a/bsd-core/savage_drv.c +++ b/bsd-core/savage_drv.c @@ -43,15 +43,15 @@ extern int savage_max_ioctl; static void savage_configure(drm_device_t *dev) { dev->driver.buf_priv_size = sizeof(drm_savage_buf_priv_t); - dev->load = savage_driver_load; - dev->firstopen = savage_driver_firstopen; - dev->lastclose = savage_driver_lastclose; - dev->unload = savage_driver_unload; - dev->reclaim_buffers = savage_reclaim_buffers; - dev->dma_ioctl = savage_bci_buffers; + dev->driver.load = savage_driver_load; + dev->driver.firstopen = savage_driver_firstopen; + dev->driver.lastclose = savage_driver_lastclose; + dev->driver.unload = savage_driver_unload; + dev->driver.reclaim_buffers_locked = savage_reclaim_buffers; + dev->driver.dma_ioctl = savage_bci_buffers; - dev->ioctls = savage_ioctls; - dev->max_ioctl = savage_max_ioctl; + dev->driver.ioctls = savage_ioctls; + dev->driver.max_ioctl = savage_max_ioctl; dev->driver.name = DRIVER_NAME; dev->driver.desc = DRIVER_DESC; @@ -60,10 +60,10 @@ static void savage_configure(drm_device_t *dev) dev->driver.minor = DRIVER_MINOR; dev->driver.patchlevel = DRIVER_PATCHLEVEL; - dev->use_agp = 1; - dev->use_mtrr = 1; - dev->use_pci_dma = 1; - dev->use_dma = 1; + dev->driver.use_agp = 1; + dev->driver.use_mtrr = 1; + dev->driver.use_pci_dma = 1; + dev->driver.use_dma = 1; } #ifdef __FreeBSD__ -- cgit v1.2.3