From 080a547d4d42d42e08a525aca9a62b5ece7616d5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 5 Feb 2005 08:00:14 +0000 Subject: - Implement drm_initmap, and extend it with the resource number to help FreeBSD. Add drm_get_resource_{start|len} so linux-specific stuff doesn't need to be in shared code. - Fix mach64 build by using __DECONST to work around passing a const pointer to useracc, which is unfortunately not marked const. - Get rid of a lot of maplist code by not having dev->maplist be a pointer, and by sticking the link entries directly in drm_local_map_t rather than having a separate structure for the linked list. - Factor out map uninit and removal into its own routine, rather than duplicating in both drm_takedown() and drm_rmmap(). - Hook up more driver functions, and correct FreeBSD-specific bits of radeon_cp.c, making radeon work. - Baby steps towards using bus_space as we should. --- linux-core/drmP.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index bbc7a237..e5789c65 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -851,7 +851,8 @@ extern int drm_addmap(struct inode *inode, struct file *filp, extern int drm_rmmap(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_initmap(drm_device_t * dev, unsigned int offset, - unsigned int size, int type, int flags); + unsigned int size, unsigned int resource, int type, + int flags); extern int drm_addbufs(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_infobufs(struct inode *inode, struct file *filp, @@ -863,6 +864,10 @@ extern int drm_freebufs(struct inode *inode, struct file *filp, extern int drm_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_order(unsigned long size); +extern unsigned long drm_get_resource_start(drm_device_t *dev, + unsigned int resource); +extern unsigned long drm_get_resource_len(drm_device_t *dev, + unsigned int resource); /* DMA support (drm_dma.h) */ extern int drm_dma_setup(drm_device_t * dev); -- cgit v1.2.3