aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drmP.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas@tungstengraphics.com>2006-07-10 13:00:21 +0000
committerThomas Hellstrom <thomas@tungstengraphics.com>2006-07-10 13:00:21 +0000
commita392349691ec2aa3f83d8a9fc4a485e4dbef4bbe (patch)
treea44b4d9facd06a4caec647e57dcbffdea4a836bf /linux-core/drmP.h
parentc21a7b763ad31c3473ba2c9a1a01bb729bc13bb5 (diff)
Change drm Map handles to be arbitrary 32-bit hash tokens in the range
0x10000000 to 0x90000000 in PAGE_SIZE increments. Implement hashed map lookups. This potentially breaks both 2D and 3D drivers. If so, the corresponding 2D and 3D driver should be fixed, and it's corresponding drm device driver should have its major bumped as soon as possible. Bump sis and via drm device driver majors. The SiS and Unichrome 3D drivers are fixed in Mesa CVS HEAD and mesa_6_4_branch.
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r--linux-core/drmP.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 6c56b7d4..fb0ba482 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -153,6 +153,7 @@
#define DRM_MEM_HASHTAB 23
#define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8)
+#define DRM_MAP_HASH_OFFSET 0x10000000
/*@}*/
@@ -502,6 +503,7 @@ typedef struct drm_sigdata {
*/
typedef struct drm_map_list {
struct list_head head; /**< list head */
+ drm_hash_item_t hash;
drm_map_t *map; /**< mapping */
unsigned int user_token;
} drm_map_list_t;
@@ -679,6 +681,7 @@ typedef struct drm_device {
/*@{ */
drm_map_list_t *maplist; /**< Linked list of regions */
int map_count; /**< Number of mappable regions */
+ drm_open_hash_t map_hash; /**< User token hash table for maps */
/** \name Context handle management */
/*@{ */