aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-07-16 20:46:52 -0400
committerDave Airlie <airlied@linux.ie>2007-07-16 21:04:33 -0400
commit62968144e673016180f530fdfe170874b80ab5a7 (patch)
tree36f763f7c03f12172bdd86d84d1c5071b3deee0f /drivers/char/drm/drmP.h
parent7608a864e5211df1e3c1948e2719aec7c27b9333 (diff)
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.h5
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 @@
75#include <asm/pgalloc.h> 75#include <asm/pgalloc.h>
76#include "drm.h" 76#include "drm.h"
77 77
78#include <linux/idr.h>
79
78#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) 80#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))
79#define __OS_HAS_MTRR (defined(CONFIG_MTRR)) 81#define __OS_HAS_MTRR (defined(CONFIG_MTRR))
80 82
@@ -676,8 +678,7 @@ struct drm_device {
676 int ctx_count; /**< Number of context handles */ 678 int ctx_count; /**< Number of context handles */
677 struct mutex ctxlist_mutex; /**< For ctxlist */ 679 struct mutex ctxlist_mutex; /**< For ctxlist */
678 680
679 struct drm_map **context_sareas; /**< per-context SAREA's */ 681 struct idr ctx_idr;
680 int max_context;
681 682
682 struct list_head vmalist; /**< List of vmas (for debugging) */ 683 struct list_head vmalist; /**< List of vmas (for debugging) */
683 struct drm_lock_data lock; /**< Information on hardware lock */ 684 struct drm_lock_data lock; /**< Information on hardware lock */