From 7af0186f4ccef285c2158770781ebfc3a26ddd66 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 16 Aug 2005 12:51:57 +0000 Subject: add Egberts 32/64 bit patch (its in kernel already...) --- linux-core/drmP.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 2b4dbcf6..4f677471 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -100,12 +100,13 @@ #define DRIVER_USE_MTRR 0x4 #define DRIVER_PCI_DMA 0x8 #define DRIVER_SG 0x10 -#define DRIVER_FB_DMA 0x20 -#define DRIVER_HAVE_DMA 0x40 -#define DRIVER_HAVE_IRQ 0x80 -#define DRIVER_IRQ_SHARED 0x100 -#define DRIVER_IRQ_VBL 0x200 -#define DRIVER_DMA_QUEUE 0x400 +#define DRIVER_HAVE_DMA 0x20 +#define DRIVER_HAVE_IRQ 0x40 +#define DRIVER_IRQ_SHARED 0x80 +#define DRIVER_IRQ_VBL 0x100 +#define DRIVER_DMA_QUEUE 0x200 +#define DRIVER_FB_DMA 0x400 + /*@}*/ @@ -499,6 +500,7 @@ typedef struct drm_dma_handle { typedef struct drm_map_list { struct list_head head; /**< list head */ drm_map_t *map; /**< mapping */ + unsigned int user_token; } drm_map_list_t; typedef drm_map_t drm_local_map_t; @@ -729,6 +731,7 @@ typedef struct drm_device { struct drm_driver *driver; drm_local_map_t *agp_buffer_map; + unsigned int agp_buffer_token; drm_head_t primary; /**< primary screen head */ } drm_device_t; @@ -1019,16 +1022,12 @@ static __inline__ void drm_core_ioremapfree(struct drm_map *map, } static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, - unsigned long offset) + unsigned int token) { - struct list_head *_list; - list_for_each(_list, &dev->maplist->head) { - drm_map_list_t *_entry = - list_entry(_list, drm_map_list_t, head); - if (_entry->map && _entry->map->offset == offset) { + drm_map_list_t *_entry; + list_for_each_entry(_entry, &dev->maplist->head, head) + if (_entry->user_token == token) return _entry->map; - } - } return NULL; } -- cgit v1.2.3