]> err.no Git - linux-2.6/blobdiff - drivers/char/drm/drm_bufs.c
Pull sbs into release branch
[linux-2.6] / drivers / char / drm / drm_bufs.c
index d12e2876a2abd46d595d32abccfece5a96536643..923174c54a1cd3150d30cd06f298d130beb20e57 100644 (file)
@@ -49,10 +49,10 @@ unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource
 
 EXPORT_SYMBOL(drm_get_resource_len);
 
-static drm_map_list_t *drm_find_matching_map(struct drm_device *dev,
+static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
                                             drm_local_map_t *map)
 {
-       drm_map_list_t *entry;
+       struct drm_map_list *entry;
        list_for_each_entry(entry, &dev->maplist, head) {
                if (entry->map && map->type == entry->map->type &&
                    ((entry->map->offset == map->offset) ||
@@ -64,7 +64,7 @@ static drm_map_list_t *drm_find_matching_map(struct drm_device *dev,
        return NULL;
 }
 
-static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *hash,
+static int drm_map_handle(struct drm_device *dev, struct drm_hash_item *hash,
                          unsigned long user_token, int hashed_handle)
 {
        int use_hashed_handle;
@@ -103,10 +103,11 @@ static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *hash,
  */
 static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
                           unsigned int size, enum drm_map_type type,
-                          enum drm_map_flags flags, drm_map_list_t ** maplist)
+                          enum drm_map_flags flags,
+                          struct drm_map_list ** maplist)
 {
        struct drm_map *map;
-       drm_map_list_t *list;
+       struct drm_map_list *list;
        drm_dma_handle_t *dmah;
        unsigned long user_token;
        int ret;
@@ -212,7 +213,7 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
                }
                break;
        case _DRM_AGP: {
-               drm_agp_mem_t *entry;
+               struct drm_agp_mem *entry;
                int valid = 0;
 
                if (!drm_core_has_AGP(dev)) {
@@ -314,7 +315,7 @@ int drm_addmap(struct drm_device * dev, unsigned int offset,
               unsigned int size, enum drm_map_type type,
               enum drm_map_flags flags, drm_local_map_t ** map_ptr)
 {
-       drm_map_list_t *list;
+       struct drm_map_list *list;
        int rc;
 
        rc = drm_addmap_core(dev, offset, size, type, flags, &list);
@@ -331,7 +332,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
        struct drm_file *priv = filp->private_data;
        struct drm_device *dev = priv->head->dev;
        struct drm_map map;
-       drm_map_list_t *maplist;
+       struct drm_map_list *maplist;
        struct drm_map __user *argp = (void __user *)arg;
        int err;
 
@@ -378,7 +379,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
  */
 int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map)
 {
-       drm_map_list_t *r_list = NULL, *list_t;
+       struct drm_map_list *r_list = NULL, *list_t;
        drm_dma_handle_t dmah;
        int found = 0;
 
@@ -453,7 +454,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
        struct drm_device *dev = priv->head->dev;
        struct drm_map request;
        drm_local_map_t *map = NULL;
-       drm_map_list_t *r_list;
+       struct drm_map_list *r_list;
        int ret;
 
        if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) {
@@ -504,7 +505,8 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
  *
  * Frees any pages and buffers associated with the given entry.
  */
-static void drm_cleanup_buf_error(struct drm_device * dev, drm_buf_entry_t * entry)
+static void drm_cleanup_buf_error(struct drm_device * dev,
+                                 struct drm_buf_entry * entry)
 {
        int i;
 
@@ -551,10 +553,10 @@ static void drm_cleanup_buf_error(struct drm_device * dev, drm_buf_entry_t * ent
  */
 int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
 {
-       drm_device_dma_t *dma = dev->dma;
-       drm_buf_entry_t *entry;
-       drm_agp_mem_t *agp_entry;
-       drm_buf_t *buf;
+       struct drm_device_dma *dma = dev->dma;
+       struct drm_buf_entry *entry;
+       struct drm_agp_mem *agp_entry;
+       struct drm_buf *buf;
        unsigned long offset;
        unsigned long agp_offset;
        int count;
@@ -565,7 +567,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
        int total;
        int byte_count;
        int i, valid;
-       drm_buf_t **temp_buflist;
+       struct drm_buf **temp_buflist;
 
        if (!dma)
                return -EINVAL;
@@ -721,22 +723,22 @@ EXPORT_SYMBOL(drm_addbufs_agp);
 
 int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request)
 {
-       drm_device_dma_t *dma = dev->dma;
+       struct drm_device_dma *dma = dev->dma;
        int count;
        int order;
        int size;
        int total;
        int page_order;
-       drm_buf_entry_t *entry;
+       struct drm_buf_entry *entry;
        drm_dma_handle_t *dmah;
-       drm_buf_t *buf;
+       struct drm_buf *buf;
        int alignment;
        unsigned long offset;
        int i;
        int byte_count;
        int page_count;
        unsigned long *temp_pagelist;
-       drm_buf_t **temp_buflist;
+       struct drm_buf **temp_buflist;
 
        if (!drm_core_check_feature(dev, DRIVER_PCI_DMA))
                return -EINVAL;
@@ -947,9 +949,9 @@ EXPORT_SYMBOL(drm_addbufs_pci);
 
 static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request)
 {
-       drm_device_dma_t *dma = dev->dma;
-       drm_buf_entry_t *entry;
-       drm_buf_t *buf;
+       struct drm_device_dma *dma = dev->dma;
+       struct drm_buf_entry *entry;
+       struct drm_buf *buf;
        unsigned long offset;
        unsigned long agp_offset;
        int count;
@@ -960,7 +962,7 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request
        int total;
        int byte_count;
        int i;
-       drm_buf_t **temp_buflist;
+       struct drm_buf **temp_buflist;
 
        if (!drm_core_check_feature(dev, DRIVER_SG))
                return -EINVAL;
@@ -1109,9 +1111,9 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request
 
 static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request)
 {
-       drm_device_dma_t *dma = dev->dma;
-       drm_buf_entry_t *entry;
-       drm_buf_t *buf;
+       struct drm_device_dma *dma = dev->dma;
+       struct drm_buf_entry *entry;
+       struct drm_buf *buf;
        unsigned long offset;
        unsigned long agp_offset;
        int count;
@@ -1122,7 +1124,7 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request
        int total;
        int byte_count;
        int i;
-       drm_buf_t **temp_buflist;
+       struct drm_buf **temp_buflist;
 
        if (!drm_core_check_feature(dev, DRIVER_FB_DMA))
                return -EINVAL;
@@ -1339,7 +1341,7 @@ int drm_infobufs(struct inode *inode, struct file *filp,
 {
        struct drm_file *priv = filp->private_data;
        struct drm_device *dev = priv->head->dev;
-       drm_device_dma_t *dma = dev->dma;
+       struct drm_device_dma *dma = dev->dma;
        struct drm_buf_info request;
        struct drm_buf_info __user *argp = (void __user *)arg;
        int i;
@@ -1374,8 +1376,8 @@ int drm_infobufs(struct inode *inode, struct file *filp,
                        if (dma->bufs[i].buf_count) {
                                struct drm_buf_desc __user *to =
                                    &request.list[count];
-                               drm_buf_entry_t *from = &dma->bufs[i];
-                               drm_freelist_t *list = &dma->bufs[i].freelist;
+                               struct drm_buf_entry *from = &dma->bufs[i];
+                               struct drm_freelist *list = &dma->bufs[i].freelist;
                                if (copy_to_user(&to->count,
                                                 &from->buf_count,
                                                 sizeof(from->buf_count)) ||
@@ -1427,10 +1429,10 @@ int drm_markbufs(struct inode *inode, struct file *filp,
 {
        struct drm_file *priv = filp->private_data;
        struct drm_device *dev = priv->head->dev;
-       drm_device_dma_t *dma = dev->dma;
+       struct drm_device_dma *dma = dev->dma;
        struct drm_buf_desc request;
        int order;
-       drm_buf_entry_t *entry;
+       struct drm_buf_entry *entry;
 
        if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
                return -EINVAL;
@@ -1477,11 +1479,11 @@ int drm_freebufs(struct inode *inode, struct file *filp,
 {
        struct drm_file *priv = filp->private_data;
        struct drm_device *dev = priv->head->dev;
-       drm_device_dma_t *dma = dev->dma;
+       struct drm_device_dma *dma = dev->dma;
        struct drm_buf_free request;
        int i;
        int idx;
-       drm_buf_t *buf;
+       struct drm_buf *buf;
 
        if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
                return -EINVAL;
@@ -1533,7 +1535,7 @@ int drm_mapbufs(struct inode *inode, struct file *filp,
 {
        struct drm_file *priv = filp->private_data;
        struct drm_device *dev = priv->head->dev;
-       drm_device_dma_t *dma = dev->dma;
+       struct drm_device_dma *dma = dev->dma;
        struct drm_buf_map __user *argp = (void __user *)arg;
        int retcode = 0;
        const int zero = 0;