summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-04-28 14:49:27 +1000
committerDave Airlie <airlied@linux.ie>2007-04-28 15:07:43 +1000
commit9f9c19065cecde16aa2994b6f777336a6e5f3409 (patch)
treeedee3b452c95f5a59a2a421ab808a24022acd92e /linux-core
parente88934274ab80119d6dd139e3d780c3cdea7e9e5 (diff)
remove DRM_GETSAREA and replace with drm_getsarea function
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h2
-rw-r--r--linux-core/drm_drv.c14
-rw-r--r--linux-core/drm_os_linux.h18
3 files changed, 16 insertions, 18 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 271c6c8e..37b93525 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -1128,6 +1128,8 @@ extern drm_head_t **drm_heads;
extern struct drm_sysfs_class *drm_class;
extern struct proc_dir_entry *drm_proc_root;
+extern drm_local_map_t *drm_getsarea(struct drm_device *dev);
+
/* Proc support (drm_proc.h) */
extern int drm_proc_init(drm_device_t * dev,
int minor,
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index b95f796f..3dc4d53c 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -622,3 +622,17 @@ err_i1:
return retcode;
}
EXPORT_SYMBOL(drm_ioctl);
+
+drm_local_map_t *drm_getsarea(struct drm_device *dev)
+{
+ drm_map_list_t *entry;
+
+ list_for_each_entry(entry, &dev->maplist->head, head) {
+ if (entry->map && entry->map->type == _DRM_SHM &&
+ (entry->map->flags & _DRM_CONTAINS_LOCK)) {
+ return entry->map;
+ }
+ }
+ return NULL;
+}
+EXPORT_SYMBOL(drm_getsarea);
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index 816959e8..2ea105c5 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -119,24 +119,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)
#define DRM_GET_PRIV_WITH_RETURN(_priv, _filp) _priv = _filp->private_data
-/**
- * Get the pointer to the SAREA.
- *
- * Searches the SAREA on the mapping lists and points drm_device::sarea to it.
- */
-#define DRM_GETSAREA() \
-do { \
- drm_map_list_t *entry; \
- list_for_each_entry( entry, &dev->maplist->head, head ) { \
- if ( entry->map && \
- entry->map->type == _DRM_SHM && \
- (entry->map->flags & _DRM_CONTAINS_LOCK) ) { \
- dev_priv->sarea = entry->map; \
- break; \
- } \
- } \
-} while (0)
-
#define DRM_HZ HZ
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \