diff options
author | Dave Airlie <airlied@linux.ie> | 2007-05-27 07:26:52 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-05-27 07:26:52 +1000 |
commit | f64674743a49c242e4f24cbb7599c1c21c035a4f (patch) | |
tree | ce437c1c6d97fdc17a134609d2cb3ff3d59df59b /linux-core/drmP.h | |
parent | 2bb7703698bef1f599295126ca3834d37a8596c0 (diff) |
drm: convert drawable handling to use Linux idr
This cleans this code up a lot and uses the generic Linux idr which is
designed for this.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r-- | linux-core/drmP.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 6cede35e..16d7dbbf 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -76,6 +76,7 @@ #include <asm/pgalloc.h> #include "drm.h" #include <linux/slab.h> +#include <linux/idr.h> #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) #define __OS_HAS_MTRR (defined(CONFIG_MTRR)) @@ -593,6 +594,11 @@ typedef struct ati_pcigart_info { int table_size; } drm_ati_pcigart_info; +struct drm_drawable_list { + struct list_head head; + int id; + drm_drawable_info_t info; +}; #include "drm_objects.h" @@ -818,10 +824,8 @@ typedef struct drm_device { /** \name Drawable information */ /*@{ */ spinlock_t drw_lock; - unsigned int drw_bitfield_length; - u32 *drw_bitfield; - unsigned int drw_info_length; - drm_drawable_info_t **drw_info; + struct idr drw_idr; + struct list_head drwlist; /*@} */ } drm_device_t; |