diff options
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r-- | drivers/char/drm/drmP.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index fb2af9279148..0a4358996970 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -539,6 +539,7 @@ typedef struct drm_dma_handle { | |||
539 | typedef struct drm_map_list { | 539 | typedef struct drm_map_list { |
540 | struct list_head head; /**< list head */ | 540 | struct list_head head; /**< list head */ |
541 | drm_map_t *map; /**< mapping */ | 541 | drm_map_t *map; /**< mapping */ |
542 | unsigned int user_token; | ||
542 | } drm_map_list_t; | 543 | } drm_map_list_t; |
543 | 544 | ||
544 | typedef drm_map_t drm_local_map_t; | 545 | typedef drm_map_t drm_local_map_t; |
@@ -759,6 +760,7 @@ typedef struct drm_device { | |||
759 | 760 | ||
760 | struct drm_driver *driver; | 761 | struct drm_driver *driver; |
761 | drm_local_map_t *agp_buffer_map; | 762 | drm_local_map_t *agp_buffer_map; |
763 | unsigned int agp_buffer_token; | ||
762 | drm_head_t primary; /**< primary screen head */ | 764 | drm_head_t primary; /**< primary screen head */ |
763 | } drm_device_t; | 765 | } drm_device_t; |
764 | 766 | ||
@@ -1048,16 +1050,12 @@ static __inline__ void drm_core_ioremapfree(struct drm_map *map, struct drm_devi | |||
1048 | drm_ioremapfree( map->handle, map->size, dev ); | 1050 | drm_ioremapfree( map->handle, map->size, dev ); |
1049 | } | 1051 | } |
1050 | 1052 | ||
1051 | static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, unsigned long offset) | 1053 | static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, unsigned int token) |
1052 | { | 1054 | { |
1053 | struct list_head *_list; | 1055 | drm_map_list_t *_entry; |
1054 | list_for_each( _list, &dev->maplist->head ) { | 1056 | list_for_each_entry(_entry, &dev->maplist->head, head) |
1055 | drm_map_list_t *_entry = list_entry( _list, drm_map_list_t, head ); | 1057 | if (_entry->user_token == token) |
1056 | if ( _entry->map && | ||
1057 | _entry->map->offset == offset ) { | ||
1058 | return _entry->map; | 1058 | return _entry->map; |
1059 | } | ||
1060 | } | ||
1061 | return NULL; | 1059 | return NULL; |
1062 | } | 1060 | } |
1063 | 1061 | ||