diff options
author | Dave Airlie <airlied@linux.ie> | 2007-07-17 02:46:52 +0200 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-07-17 03:04:33 +0200 |
commit | 62968144e673016180f530fdfe170874b80ab5a7 (patch) | |
tree | 36f763f7c03f12172bdd86d84d1c5071b3deee0f /drivers/char/drm/drmP.h | |
parent | Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sp... (diff) | |
download | linux-62968144e673016180f530fdfe170874b80ab5a7.tar.xz linux-62968144e673016180f530fdfe170874b80ab5a7.zip |
drm: convert drm context code to use Linux idr
This converts the drm context allocator to an idr, using the new idr
interface features from Kristian.
Fixes from Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r-- | drivers/char/drm/drmP.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 1277693e9ca4..b1cafe36611e 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -75,6 +75,8 @@ #include <asm/pgalloc.h> #include "drm.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)) @@ -676,8 +678,7 @@ struct drm_device { int ctx_count; /**< Number of context handles */ struct mutex ctxlist_mutex; /**< For ctxlist */ - struct drm_map **context_sareas; /**< per-context SAREA's */ - int max_context; + struct idr ctx_idr; struct list_head vmalist; /**< List of vmas (for debugging) */ struct drm_lock_data lock; /**< Information on hardware lock */ |