From f64674743a49c242e4f24cbb7599c1c21c035a4f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 27 May 2007 07:26:52 +1000 Subject: 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 --- linux-core/drmP.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'linux-core/drmP.h') 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 #include "drm.h" #include +#include #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; -- cgit v1.2.3