drm: detypedeffing continues...

Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Dave Airlie 2007-07-11 16:53:40 +10:00
parent cdd55a294c
commit 55910517af
23 changed files with 143 additions and 142 deletions

View File

@ -73,9 +73,9 @@ static void drm_ati_free_pcigart_table(void *address, int order)
free_pages((unsigned long)address, order); free_pages((unsigned long)address, order);
} }
int drm_ati_pcigart_cleanup(struct drm_device *dev, drm_ati_pcigart_info *gart_info) int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
{ {
drm_sg_mem_t *entry = dev->sg; struct drm_sg_mem *entry = dev->sg;
unsigned long pages; unsigned long pages;
int i; int i;
int order; int order;
@ -122,9 +122,9 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, drm_ati_pcigart_info *gart_i
} }
EXPORT_SYMBOL(drm_ati_pcigart_cleanup); EXPORT_SYMBOL(drm_ati_pcigart_cleanup);
int drm_ati_pcigart_init(struct drm_device *dev, drm_ati_pcigart_info *gart_info) int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
{ {
drm_sg_mem_t *entry = dev->sg; struct drm_sg_mem *entry = dev->sg;
void *address = NULL; void *address = NULL;
unsigned long pages; unsigned long pages;
u32 *pci_gart, page_base, bus_address = 0; u32 *pci_gart, page_base, bus_address = 0;

View File

@ -399,7 +399,7 @@ struct drm_queue {
/** /**
* Lock data. * Lock data.
*/ */
typedef struct drm_lock_data { struct drm_lock_data {
struct drm_hw_lock *hw_lock; /**< Hardware lock */ struct drm_hw_lock *hw_lock; /**< Hardware lock */
struct file *filp; /**< File descr of lock holder (0=kernel) */ struct file *filp; /**< File descr of lock holder (0=kernel) */
wait_queue_head_t lock_queue; /**< Queue of blocked processes */ wait_queue_head_t lock_queue; /**< Queue of blocked processes */
@ -408,7 +408,7 @@ typedef struct drm_lock_data {
uint32_t kernel_waiters; uint32_t kernel_waiters;
uint32_t user_waiters; uint32_t user_waiters;
int idle_has_lock; int idle_has_lock;
} drm_lock_data_t; };
/** /**
* DMA data. * DMA data.
@ -434,20 +434,20 @@ struct drm_device_dma {
/** /**
* AGP memory entry. Stored as a doubly linked list. * AGP memory entry. Stored as a doubly linked list.
*/ */
typedef struct drm_agp_mem { struct drm_agp_mem {
unsigned long handle; /**< handle */ unsigned long handle; /**< handle */
DRM_AGP_MEM *memory; DRM_AGP_MEM *memory;
unsigned long bound; /**< address */ unsigned long bound; /**< address */
int pages; int pages;
struct list_head head; struct list_head head;
} drm_agp_mem_t; };
/** /**
* AGP data. * AGP data.
* *
* \sa drm_agp_init() and drm_device::agp. * \sa drm_agp_init() and drm_device::agp.
*/ */
typedef struct drm_agp_head { struct drm_agp_head {
DRM_AGP_KERN agp_info; /**< AGP device information */ DRM_AGP_KERN agp_info; /**< AGP device information */
struct list_head memory; struct list_head memory;
unsigned long mode; /**< AGP mode */ unsigned long mode; /**< AGP mode */
@ -458,51 +458,51 @@ typedef struct drm_agp_head {
int agp_mtrr; int agp_mtrr;
int cant_use_aperture; int cant_use_aperture;
unsigned long page_mask; unsigned long page_mask;
} drm_agp_head_t; };
/** /**
* Scatter-gather memory. * Scatter-gather memory.
*/ */
typedef struct drm_sg_mem { struct drm_sg_mem {
unsigned long handle; unsigned long handle;
void *virtual; void *virtual;
int pages; int pages;
struct page **pagelist; struct page **pagelist;
dma_addr_t *busaddr; dma_addr_t *busaddr;
} drm_sg_mem_t; };
typedef struct drm_sigdata { struct drm_sigdata {
int context; int context;
struct drm_hw_lock *lock; struct drm_hw_lock *lock;
} drm_sigdata_t; };
/** /**
* Mappings list * Mappings list
*/ */
typedef struct drm_map_list { struct drm_map_list {
struct list_head head; /**< list head */ struct list_head head; /**< list head */
drm_hash_item_t hash; drm_hash_item_t hash;
struct drm_map *map; /**< mapping */ struct drm_map *map; /**< mapping */
unsigned int user_token; unsigned int user_token;
} drm_map_list_t; };
typedef struct drm_map drm_local_map_t; typedef struct drm_map drm_local_map_t;
/** /**
* Context handle list * Context handle list
*/ */
typedef struct drm_ctx_list { struct drm_ctx_list {
struct list_head head; /**< list head */ struct list_head head; /**< list head */
drm_context_t handle; /**< context handle */ drm_context_t handle; /**< context handle */
struct drm_file *tag; /**< associated fd private data */ struct drm_file *tag; /**< associated fd private data */
} drm_ctx_list_t; };
typedef struct drm_vbl_sig { struct drm_vbl_sig {
struct list_head head; struct list_head head;
unsigned int sequence; unsigned int sequence;
struct siginfo info; struct siginfo info;
struct task_struct *task; struct task_struct *task;
} drm_vbl_sig_t; };
/* location of GART table */ /* location of GART table */
#define DRM_ATI_GART_MAIN 1 #define DRM_ATI_GART_MAIN 1
@ -512,19 +512,19 @@ typedef struct drm_vbl_sig {
#define DRM_ATI_GART_PCIE 2 #define DRM_ATI_GART_PCIE 2
#define DRM_ATI_GART_IGP 3 #define DRM_ATI_GART_IGP 3
typedef struct ati_pcigart_info { struct drm_ati_pcigart_info {
int gart_table_location; int gart_table_location;
int gart_reg_if; int gart_reg_if;
void *addr; void *addr;
dma_addr_t bus_addr; dma_addr_t bus_addr;
drm_local_map_t mapping; drm_local_map_t mapping;
int table_size; int table_size;
} drm_ati_pcigart_info; };
/* /*
* Generic memory manager structs * Generic memory manager structs
*/ */
typedef struct drm_mm_node { struct drm_mm_node {
struct list_head fl_entry; struct list_head fl_entry;
struct list_head ml_entry; struct list_head ml_entry;
int free; int free;
@ -532,12 +532,12 @@ typedef struct drm_mm_node {
unsigned long size; unsigned long size;
struct drm_mm *mm; struct drm_mm *mm;
void *private; void *private;
} drm_mm_node_t; };
typedef struct drm_mm { struct drm_mm {
struct list_head fl_entry; struct list_head fl_entry;
struct list_head ml_entry; struct list_head ml_entry;
} drm_mm_t; };
/** /**
* DRM driver structure. This structure represent the common code for * DRM driver structure. This structure represent the common code for
@ -680,7 +680,7 @@ struct drm_device {
int max_context; int max_context;
struct list_head vmalist; /**< List of vmas (for debugging) */ struct list_head vmalist; /**< List of vmas (for debugging) */
drm_lock_data_t lock; /**< Information on hardware lock */ struct drm_lock_data lock; /**< Information on hardware lock */
/*@} */ /*@} */
/** \name DMA queues (contexts) */ /** \name DMA queues (contexts) */
@ -728,7 +728,7 @@ struct drm_device {
wait_queue_head_t buf_readers; /**< Processes waiting to read */ wait_queue_head_t buf_readers; /**< Processes waiting to read */
wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */ wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */
drm_agp_head_t *agp; /**< AGP data */ struct drm_agp_head *agp; /**< AGP data */
struct pci_dev *pdev; /**< PCI device structure */ struct pci_dev *pdev; /**< PCI device structure */
int pci_vendor; /**< PCI vendor id */ int pci_vendor; /**< PCI vendor id */
@ -736,10 +736,10 @@ struct drm_device {
#ifdef __alpha__ #ifdef __alpha__
struct pci_controller *hose; struct pci_controller *hose;
#endif #endif
drm_sg_mem_t *sg; /**< Scatter gather memory */ struct drm_sg_mem *sg; /**< Scatter gather memory */
unsigned long *ctx_bitmap; /**< context bitmap */ unsigned long *ctx_bitmap; /**< context bitmap */
void *dev_private; /**< device private data */ void *dev_private; /**< device private data */
drm_sigdata_t sigdata; /**< For block_all_signals */ struct drm_sigdata sigdata; /**< For block_all_signals */
sigset_t sigmask; sigset_t sigmask;
struct drm_driver *driver; struct drm_driver *driver;
@ -915,10 +915,10 @@ extern int drm_lock(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_unlock(struct inode *inode, struct file *filp, extern int drm_unlock(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_lock_take(drm_lock_data_t *lock_data, unsigned int context); extern int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context);
extern int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context); extern int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context);
extern void drm_idlelock_take(drm_lock_data_t *lock_data); extern void drm_idlelock_take(struct drm_lock_data *lock_data);
extern void drm_idlelock_release(drm_lock_data_t *lock_data); extern void drm_idlelock_release(struct drm_lock_data *lock_data);
/* /*
* These are exported to drivers so that they can implement fencing using * These are exported to drivers so that they can implement fencing using
@ -979,7 +979,7 @@ extern void drm_vbl_send_signals(struct drm_device *dev);
extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*)); extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*));
/* AGP/GART support (drm_agpsupport.h) */ /* AGP/GART support (drm_agpsupport.h) */
extern drm_agp_head_t *drm_agp_init(struct drm_device *dev); extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
extern int drm_agp_acquire(struct drm_device *dev); extern int drm_agp_acquire(struct drm_device *dev);
extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
@ -1033,7 +1033,7 @@ extern int drm_proc_cleanup(int minor,
struct proc_dir_entry *dev_root); struct proc_dir_entry *dev_root);
/* Scatter Gather Support (drm_scatter.h) */ /* Scatter Gather Support (drm_scatter.h) */
extern void drm_sg_cleanup(drm_sg_mem_t * entry); extern void drm_sg_cleanup(struct drm_sg_mem * entry);
extern int drm_sg_alloc(struct inode *inode, struct file *filp, extern int drm_sg_alloc(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_sg_free(struct inode *inode, struct file *filp, extern int drm_sg_free(struct inode *inode, struct file *filp,
@ -1041,9 +1041,9 @@ extern int drm_sg_free(struct inode *inode, struct file *filp,
/* ATI PCIGART support (ati_pcigart.h) */ /* ATI PCIGART support (ati_pcigart.h) */
extern int drm_ati_pcigart_init(struct drm_device *dev, extern int drm_ati_pcigart_init(struct drm_device *dev,
drm_ati_pcigart_info * gart_info); struct drm_ati_pcigart_info * gart_info);
extern int drm_ati_pcigart_cleanup(struct drm_device *dev, extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
drm_ati_pcigart_info * gart_info); struct drm_ati_pcigart_info * gart_info);
extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
size_t align, dma_addr_t maxaddr); size_t align, dma_addr_t maxaddr);
@ -1060,18 +1060,18 @@ extern void drm_sysfs_device_remove(struct class_device *class_dev);
/* /*
* Basic memory manager support (drm_mm.c) * Basic memory manager support (drm_mm.c)
*/ */
extern drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent, extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node * parent,
unsigned long size, unsigned long size,
unsigned alignment); unsigned alignment);
void drm_mm_put_block(drm_mm_node_t * cur); void drm_mm_put_block(struct drm_mm_node * cur);
extern drm_mm_node_t *drm_mm_search_free(const drm_mm_t *mm, unsigned long size, extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, unsigned long size,
unsigned alignment, int best_match); unsigned alignment, int best_match);
extern int drm_mm_init(drm_mm_t *mm, unsigned long start, unsigned long size); extern int drm_mm_init(struct drm_mm *mm, unsigned long start, unsigned long size);
extern void drm_mm_takedown(drm_mm_t *mm); extern void drm_mm_takedown(struct drm_mm *mm);
extern int drm_mm_clean(drm_mm_t *mm); extern int drm_mm_clean(struct drm_mm *mm);
extern unsigned long drm_mm_tail_space(drm_mm_t *mm); extern unsigned long drm_mm_tail_space(struct drm_mm *mm);
extern int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size); extern int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size);
extern int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size); extern int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size);
extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev); extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev);
extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev); extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
@ -1079,7 +1079,7 @@ extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,
unsigned int token) unsigned int token)
{ {
drm_map_list_t *_entry; struct drm_map_list *_entry;
list_for_each_entry(_entry, &dev->maplist, head) list_for_each_entry(_entry, &dev->maplist, head)
if (_entry->user_token == token) if (_entry->user_token == token)
return _entry->map; return _entry->map;

View File

@ -209,7 +209,7 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
*/ */
int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request)
{ {
drm_agp_mem_t *entry; struct drm_agp_mem *entry;
DRM_AGP_MEM *memory; DRM_AGP_MEM *memory;
unsigned long pages; unsigned long pages;
u32 type; u32 type;
@ -258,7 +258,7 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
return err; return err;
if (copy_to_user(argp, &request, sizeof(request))) { if (copy_to_user(argp, &request, sizeof(request))) {
drm_agp_mem_t *entry; struct drm_agp_mem *entry;
list_for_each_entry(entry, &dev->agp->memory, head) { list_for_each_entry(entry, &dev->agp->memory, head) {
if (entry->handle == request.handle) if (entry->handle == request.handle)
break; break;
@ -281,10 +281,10 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
* *
* Walks through drm_agp_head::memory until finding a matching handle. * Walks through drm_agp_head::memory until finding a matching handle.
*/ */
static drm_agp_mem_t *drm_agp_lookup_entry(struct drm_device * dev, static struct drm_agp_mem *drm_agp_lookup_entry(struct drm_device * dev,
unsigned long handle) unsigned long handle)
{ {
drm_agp_mem_t *entry; struct drm_agp_mem *entry;
list_for_each_entry(entry, &dev->agp->memory, head) { list_for_each_entry(entry, &dev->agp->memory, head) {
if (entry->handle == handle) if (entry->handle == handle)
@ -307,7 +307,7 @@ static drm_agp_mem_t *drm_agp_lookup_entry(struct drm_device * dev,
*/ */
int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request) int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
{ {
drm_agp_mem_t *entry; struct drm_agp_mem *entry;
int ret; int ret;
if (!dev->agp || !dev->agp->acquired) if (!dev->agp || !dev->agp->acquired)
@ -352,7 +352,7 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
*/ */
int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request) int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
{ {
drm_agp_mem_t *entry; struct drm_agp_mem *entry;
int retcode; int retcode;
int page; int page;
@ -402,7 +402,7 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
*/ */
int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request) int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
{ {
drm_agp_mem_t *entry; struct drm_agp_mem *entry;
if (!dev->agp || !dev->agp->acquired) if (!dev->agp || !dev->agp->acquired)
return -EINVAL; return -EINVAL;
@ -442,9 +442,9 @@ int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
* via the inter_module_* functions. Creates and initializes a drm_agp_head * via the inter_module_* functions. Creates and initializes a drm_agp_head
* structure. * structure.
*/ */
drm_agp_head_t *drm_agp_init(struct drm_device *dev) struct drm_agp_head *drm_agp_init(struct drm_device *dev)
{ {
drm_agp_head_t *head = NULL; struct drm_agp_head *head = NULL;
if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS)))
return NULL; return NULL;

View File

@ -49,10 +49,10 @@ unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource
EXPORT_SYMBOL(drm_get_resource_len); 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_local_map_t *map)
{ {
drm_map_list_t *entry; struct drm_map_list *entry;
list_for_each_entry(entry, &dev->maplist, head) { list_for_each_entry(entry, &dev->maplist, head) {
if (entry->map && map->type == entry->map->type && if (entry->map && map->type == entry->map->type &&
((entry->map->offset == map->offset) || ((entry->map->offset == map->offset) ||
@ -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, static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
unsigned int size, enum drm_map_type type, 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; struct drm_map *map;
drm_map_list_t *list; struct drm_map_list *list;
drm_dma_handle_t *dmah; drm_dma_handle_t *dmah;
unsigned long user_token; unsigned long user_token;
int ret; int ret;
@ -212,7 +213,7 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
} }
break; break;
case _DRM_AGP: { case _DRM_AGP: {
drm_agp_mem_t *entry; struct drm_agp_mem *entry;
int valid = 0; int valid = 0;
if (!drm_core_has_AGP(dev)) { 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, unsigned int size, enum drm_map_type type,
enum drm_map_flags flags, drm_local_map_t ** map_ptr) enum drm_map_flags flags, drm_local_map_t ** map_ptr)
{ {
drm_map_list_t *list; struct drm_map_list *list;
int rc; int rc;
rc = drm_addmap_core(dev, offset, size, type, flags, &list); 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_file *priv = filp->private_data;
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_map map; struct drm_map map;
drm_map_list_t *maplist; struct drm_map_list *maplist;
struct drm_map __user *argp = (void __user *)arg; struct drm_map __user *argp = (void __user *)arg;
int err; 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) 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; drm_dma_handle_t dmah;
int found = 0; 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_device *dev = priv->head->dev;
struct drm_map request; struct drm_map request;
drm_local_map_t *map = NULL; drm_local_map_t *map = NULL;
drm_map_list_t *r_list; struct drm_map_list *r_list;
int ret; int ret;
if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) { if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) {
@ -554,7 +555,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
{ {
struct drm_device_dma *dma = dev->dma; struct drm_device_dma *dma = dev->dma;
struct drm_buf_entry *entry; struct drm_buf_entry *entry;
drm_agp_mem_t *agp_entry; struct drm_agp_mem *agp_entry;
struct drm_buf *buf; struct drm_buf *buf;
unsigned long offset; unsigned long offset;
unsigned long agp_offset; unsigned long agp_offset;

View File

@ -217,7 +217,7 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
struct drm_ctx_priv_map __user *argp = (void __user *)arg; struct drm_ctx_priv_map __user *argp = (void __user *)arg;
struct drm_ctx_priv_map request; struct drm_ctx_priv_map request;
struct drm_map *map; struct drm_map *map;
drm_map_list_t *_entry; struct drm_map_list *_entry;
if (copy_from_user(&request, argp, sizeof(request))) if (copy_from_user(&request, argp, sizeof(request)))
return -EFAULT; return -EFAULT;
@ -267,7 +267,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_ctx_priv_map request; struct drm_ctx_priv_map request;
struct drm_map *map = NULL; struct drm_map *map = NULL;
drm_map_list_t *r_list = NULL; struct drm_map_list *r_list = NULL;
if (copy_from_user(&request, if (copy_from_user(&request,
(struct drm_ctx_priv_map __user *) arg, (struct drm_ctx_priv_map __user *) arg,
@ -410,7 +410,7 @@ int drm_addctx(struct inode *inode, struct file *filp,
{ {
struct drm_file *priv = filp->private_data; struct drm_file *priv = filp->private_data;
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_ctx_list_t *ctx_entry; struct drm_ctx_list *ctx_entry;
struct drm_ctx __user *argp = (void __user *)arg; struct drm_ctx __user *argp = (void __user *)arg;
struct drm_ctx ctx; struct drm_ctx ctx;
@ -575,7 +575,7 @@ int drm_rmctx(struct inode *inode, struct file *filp,
mutex_lock(&dev->ctxlist_mutex); mutex_lock(&dev->ctxlist_mutex);
if (!list_empty(&dev->ctxlist)) { if (!list_empty(&dev->ctxlist)) {
drm_ctx_list_t *pos, *n; struct drm_ctx_list *pos, *n;
list_for_each_entry_safe(pos, n, &dev->ctxlist, head) { list_for_each_entry_safe(pos, n, &dev->ctxlist, head) {
if (pos->handle == ctx.handle) { if (pos->handle == ctx.handle) {

View File

@ -132,7 +132,7 @@ static drm_ioctl_desc_t drm_ioctls[] = {
int drm_lastclose(struct drm_device * dev) int drm_lastclose(struct drm_device * dev)
{ {
struct drm_magic_entry *pt, *next; struct drm_magic_entry *pt, *next;
drm_map_list_t *r_list, *list_t; struct drm_map_list *r_list, *list_t;
struct drm_vma_entry *vma, *vma_temp; struct drm_vma_entry *vma, *vma_temp;
int i; int i;
@ -178,7 +178,7 @@ int drm_lastclose(struct drm_device * dev)
/* Clear AGP information */ /* Clear AGP information */
if (drm_core_has_AGP(dev) && dev->agp) { if (drm_core_has_AGP(dev) && dev->agp) {
drm_agp_mem_t *entry, *tempe; struct drm_agp_mem *entry, *tempe;
/* Remove AGP resources, but leave dev->agp /* Remove AGP resources, but leave dev->agp
intact until drv_cleanup is called. */ intact until drv_cleanup is called. */
@ -520,7 +520,7 @@ EXPORT_SYMBOL(drm_ioctl);
drm_local_map_t *drm_getsarea(struct drm_device *dev) drm_local_map_t *drm_getsarea(struct drm_device *dev)
{ {
drm_map_list_t *entry; struct drm_map_list *entry;
list_for_each_entry(entry, &dev->maplist, head) { list_for_each_entry(entry, &dev->maplist, head) {
if (entry->map && entry->map->type == _DRM_SHM && if (entry->map && entry->map->type == _DRM_SHM &&

View File

@ -401,7 +401,7 @@ int drm_release(struct inode *inode, struct file *filp)
mutex_lock(&dev->ctxlist_mutex); mutex_lock(&dev->ctxlist_mutex);
if (!list_empty(&dev->ctxlist)) { if (!list_empty(&dev->ctxlist)) {
drm_ctx_list_t *pos, *n; struct drm_ctx_list *pos, *n;
list_for_each_entry_safe(pos, n, &dev->ctxlist, head) { list_for_each_entry_safe(pos, n, &dev->ctxlist, head) {
if (pos->tag == priv && if (pos->tag == priv &&

View File

@ -188,7 +188,7 @@ int drm_getmap(struct inode *inode, struct file *filp,
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_map __user *argp = (void __user *)arg; struct drm_map __user *argp = (void __user *)arg;
struct drm_map map; struct drm_map map;
drm_map_list_t *r_list = NULL; struct drm_map_list *r_list = NULL;
struct list_head *list; struct list_head *list;
int idx; int idx;
int i; int i;
@ -206,7 +206,7 @@ int drm_getmap(struct inode *inode, struct file *filp,
i = 0; i = 0;
list_for_each(list, &dev->maplist) { list_for_each(list, &dev->maplist) {
if (i == idx) { if (i == idx) {
r_list = list_entry(list, drm_map_list_t, head); r_list = list_entry(list, struct drm_map_list, head);
break; break;
} }
i++; i++;

View File

@ -294,7 +294,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
unsigned long irqflags; unsigned long irqflags;
struct list_head *vbl_sigs = (flags & _DRM_VBLANK_SECONDARY) struct list_head *vbl_sigs = (flags & _DRM_VBLANK_SECONDARY)
? &dev->vbl_sigs2 : &dev->vbl_sigs; ? &dev->vbl_sigs2 : &dev->vbl_sigs;
drm_vbl_sig_t *vbl_sig; struct drm_vbl_sig *vbl_sig;
spin_lock_irqsave(&dev->vbl_lock, irqflags); spin_lock_irqsave(&dev->vbl_lock, irqflags);
@ -324,7 +324,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
if (! if (!
(vbl_sig = (vbl_sig =
drm_alloc(sizeof(drm_vbl_sig_t), DRM_MEM_DRIVER))) { drm_alloc(sizeof(struct drm_vbl_sig), DRM_MEM_DRIVER))) {
return -ENOMEM; return -ENOMEM;
} }
@ -379,7 +379,7 @@ void drm_vbl_send_signals(struct drm_device * dev)
spin_lock_irqsave(&dev->vbl_lock, flags); spin_lock_irqsave(&dev->vbl_lock, flags);
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
drm_vbl_sig_t *vbl_sig, *tmp; struct drm_vbl_sig *vbl_sig, *tmp;
struct list_head *vbl_sigs = i ? &dev->vbl_sigs2 : &dev->vbl_sigs; struct list_head *vbl_sigs = i ? &dev->vbl_sigs2 : &dev->vbl_sigs;
unsigned int vbl_seq = atomic_read(i ? &dev->vbl_received2 : unsigned int vbl_seq = atomic_read(i ? &dev->vbl_received2 :
&dev->vbl_received); &dev->vbl_received);

View File

@ -202,7 +202,7 @@ int drm_unlock(struct inode *inode, struct file *filp,
* *
* Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction. * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
*/ */
int drm_lock_take(drm_lock_data_t *lock_data, int drm_lock_take(struct drm_lock_data *lock_data,
unsigned int context) unsigned int context)
{ {
unsigned int old, new, prev; unsigned int old, new, prev;
@ -251,7 +251,7 @@ int drm_lock_take(drm_lock_data_t *lock_data,
* Resets the lock file pointer. * Resets the lock file pointer.
* Marks the lock as held by the given context, via the \p cmpxchg instruction. * Marks the lock as held by the given context, via the \p cmpxchg instruction.
*/ */
static int drm_lock_transfer(drm_lock_data_t *lock_data, static int drm_lock_transfer(struct drm_lock_data *lock_data,
unsigned int context) unsigned int context)
{ {
unsigned int old, new, prev; unsigned int old, new, prev;
@ -277,7 +277,7 @@ static int drm_lock_transfer(drm_lock_data_t *lock_data,
* Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task * Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task
* waiting on the lock queue. * waiting on the lock queue.
*/ */
int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context) int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context)
{ {
unsigned int old, new, prev; unsigned int old, new, prev;
volatile unsigned int *lock = &lock_data->hw_lock->lock; volatile unsigned int *lock = &lock_data->hw_lock->lock;
@ -319,7 +319,7 @@ int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context)
*/ */
static int drm_notifier(void *priv) static int drm_notifier(void *priv)
{ {
drm_sigdata_t *s = (drm_sigdata_t *) priv; struct drm_sigdata *s = (struct drm_sigdata *) priv;
unsigned int old, new, prev; unsigned int old, new, prev;
/* Allow signal delivery if lock isn't held */ /* Allow signal delivery if lock isn't held */
@ -350,7 +350,7 @@ static int drm_notifier(void *priv)
* having to worry about starvation. * having to worry about starvation.
*/ */
void drm_idlelock_take(drm_lock_data_t *lock_data) void drm_idlelock_take(struct drm_lock_data *lock_data)
{ {
int ret = 0; int ret = 0;
@ -369,7 +369,7 @@ void drm_idlelock_take(drm_lock_data_t *lock_data)
} }
EXPORT_SYMBOL(drm_idlelock_take); EXPORT_SYMBOL(drm_idlelock_take);
void drm_idlelock_release(drm_lock_data_t *lock_data) void drm_idlelock_release(struct drm_lock_data *lock_data)
{ {
unsigned int old, prev; unsigned int old, prev;
volatile unsigned int *lock = &lock_data->hw_lock->lock; volatile unsigned int *lock = &lock_data->hw_lock->lock;

View File

@ -44,26 +44,26 @@
#include "drmP.h" #include "drmP.h"
#include <linux/slab.h> #include <linux/slab.h>
unsigned long drm_mm_tail_space(drm_mm_t *mm) unsigned long drm_mm_tail_space(struct drm_mm *mm)
{ {
struct list_head *tail_node; struct list_head *tail_node;
drm_mm_node_t *entry; struct drm_mm_node *entry;
tail_node = mm->ml_entry.prev; tail_node = mm->ml_entry.prev;
entry = list_entry(tail_node, drm_mm_node_t, ml_entry); entry = list_entry(tail_node, struct drm_mm_node, ml_entry);
if (!entry->free) if (!entry->free)
return 0; return 0;
return entry->size; return entry->size;
} }
int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size) int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size)
{ {
struct list_head *tail_node; struct list_head *tail_node;
drm_mm_node_t *entry; struct drm_mm_node *entry;
tail_node = mm->ml_entry.prev; tail_node = mm->ml_entry.prev;
entry = list_entry(tail_node, drm_mm_node_t, ml_entry); entry = list_entry(tail_node, struct drm_mm_node, ml_entry);
if (!entry->free) if (!entry->free)
return -ENOMEM; return -ENOMEM;
@ -75,13 +75,13 @@ int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size)
} }
static int drm_mm_create_tail_node(drm_mm_t *mm, static int drm_mm_create_tail_node(struct drm_mm *mm,
unsigned long start, unsigned long start,
unsigned long size) unsigned long size)
{ {
drm_mm_node_t *child; struct drm_mm_node *child;
child = (drm_mm_node_t *) child = (struct drm_mm_node *)
drm_alloc(sizeof(*child), DRM_MEM_MM); drm_alloc(sizeof(*child), DRM_MEM_MM);
if (!child) if (!child)
return -ENOMEM; return -ENOMEM;
@ -98,13 +98,13 @@ static int drm_mm_create_tail_node(drm_mm_t *mm,
} }
int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size) int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size)
{ {
struct list_head *tail_node; struct list_head *tail_node;
drm_mm_node_t *entry; struct drm_mm_node *entry;
tail_node = mm->ml_entry.prev; tail_node = mm->ml_entry.prev;
entry = list_entry(tail_node, drm_mm_node_t, ml_entry); entry = list_entry(tail_node, struct drm_mm_node, ml_entry);
if (!entry->free) { if (!entry->free) {
return drm_mm_create_tail_node(mm, entry->start + entry->size, size); return drm_mm_create_tail_node(mm, entry->start + entry->size, size);
} }
@ -112,12 +112,12 @@ int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size)
return 0; return 0;
} }
static drm_mm_node_t *drm_mm_split_at_start(drm_mm_node_t *parent, static struct drm_mm_node *drm_mm_split_at_start(struct drm_mm_node *parent,
unsigned long size) unsigned long size)
{ {
drm_mm_node_t *child; struct drm_mm_node *child;
child = (drm_mm_node_t *) child = (struct drm_mm_node *)
drm_alloc(sizeof(*child), DRM_MEM_MM); drm_alloc(sizeof(*child), DRM_MEM_MM);
if (!child) if (!child)
return NULL; return NULL;
@ -139,12 +139,12 @@ static drm_mm_node_t *drm_mm_split_at_start(drm_mm_node_t *parent,
drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent, struct drm_mm_node *drm_mm_get_block(struct drm_mm_node * parent,
unsigned long size, unsigned alignment) unsigned long size, unsigned alignment)
{ {
drm_mm_node_t *align_splitoff = NULL; struct drm_mm_node *align_splitoff = NULL;
drm_mm_node_t *child; struct drm_mm_node *child;
unsigned tmp = 0; unsigned tmp = 0;
if (alignment) if (alignment)
@ -175,26 +175,26 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
* Otherwise add to the free stack. * Otherwise add to the free stack.
*/ */
void drm_mm_put_block(drm_mm_node_t * cur) void drm_mm_put_block(struct drm_mm_node * cur)
{ {
drm_mm_t *mm = cur->mm; struct drm_mm *mm = cur->mm;
struct list_head *cur_head = &cur->ml_entry; struct list_head *cur_head = &cur->ml_entry;
struct list_head *root_head = &mm->ml_entry; struct list_head *root_head = &mm->ml_entry;
drm_mm_node_t *prev_node = NULL; struct drm_mm_node *prev_node = NULL;
drm_mm_node_t *next_node; struct drm_mm_node *next_node;
int merged = 0; int merged = 0;
if (cur_head->prev != root_head) { if (cur_head->prev != root_head) {
prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry); prev_node = list_entry(cur_head->prev, struct drm_mm_node, ml_entry);
if (prev_node->free) { if (prev_node->free) {
prev_node->size += cur->size; prev_node->size += cur->size;
merged = 1; merged = 1;
} }
} }
if (cur_head->next != root_head) { if (cur_head->next != root_head) {
next_node = list_entry(cur_head->next, drm_mm_node_t, ml_entry); next_node = list_entry(cur_head->next, struct drm_mm_node, ml_entry);
if (next_node->free) { if (next_node->free) {
if (merged) { if (merged) {
prev_node->size += next_node->size; prev_node->size += next_node->size;
@ -218,14 +218,14 @@ void drm_mm_put_block(drm_mm_node_t * cur)
} }
} }
drm_mm_node_t *drm_mm_search_free(const drm_mm_t * mm, struct drm_mm_node *drm_mm_search_free(const struct drm_mm * mm,
unsigned long size, unsigned long size,
unsigned alignment, int best_match) unsigned alignment, int best_match)
{ {
struct list_head *list; struct list_head *list;
const struct list_head *free_stack = &mm->fl_entry; const struct list_head *free_stack = &mm->fl_entry;
drm_mm_node_t *entry; struct drm_mm_node *entry;
drm_mm_node_t *best; struct drm_mm_node *best;
unsigned long best_size; unsigned long best_size;
unsigned wasted; unsigned wasted;
@ -233,7 +233,7 @@ drm_mm_node_t *drm_mm_search_free(const drm_mm_t * mm,
best_size = ~0UL; best_size = ~0UL;
list_for_each(list, free_stack) { list_for_each(list, free_stack) {
entry = list_entry(list, drm_mm_node_t, fl_entry); entry = list_entry(list, struct drm_mm_node, fl_entry);
wasted = 0; wasted = 0;
if (entry->size < size) if (entry->size < size)
@ -259,14 +259,14 @@ drm_mm_node_t *drm_mm_search_free(const drm_mm_t * mm,
return best; return best;
} }
int drm_mm_clean(drm_mm_t * mm) int drm_mm_clean(struct drm_mm * mm)
{ {
struct list_head *head = &mm->ml_entry; struct list_head *head = &mm->ml_entry;
return (head->next->next == head); return (head->next->next == head);
} }
int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size) int drm_mm_init(struct drm_mm * mm, unsigned long start, unsigned long size)
{ {
INIT_LIST_HEAD(&mm->ml_entry); INIT_LIST_HEAD(&mm->ml_entry);
INIT_LIST_HEAD(&mm->fl_entry); INIT_LIST_HEAD(&mm->fl_entry);
@ -275,12 +275,12 @@ int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size)
} }
void drm_mm_takedown(drm_mm_t * mm) void drm_mm_takedown(struct drm_mm * mm)
{ {
struct list_head *bnode = mm->fl_entry.next; struct list_head *bnode = mm->fl_entry.next;
drm_mm_node_t *entry; struct drm_mm_node *entry;
entry = list_entry(bnode, drm_mm_node_t, fl_entry); entry = list_entry(bnode, struct drm_mm_node, fl_entry);
if (entry->ml_entry.next != &mm->ml_entry || if (entry->ml_entry.next != &mm->ml_entry ||
entry->fl_entry.next != &mm->fl_entry) { entry->fl_entry.next != &mm->fl_entry) {

View File

@ -208,7 +208,7 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request,
struct drm_device *dev = (struct drm_device *) data; struct drm_device *dev = (struct drm_device *) data;
int len = 0; int len = 0;
struct drm_map *map; struct drm_map *map;
drm_map_list_t *r_list; struct drm_map_list *r_list;
/* Hardcoded from _DRM_FRAME_BUFFER, /* Hardcoded from _DRM_FRAME_BUFFER,
_DRM_REGISTERS, _DRM_SHM, _DRM_AGP, and _DRM_REGISTERS, _DRM_SHM, _DRM_AGP, and

View File

@ -36,7 +36,7 @@
#define DEBUG_SCATTER 0 #define DEBUG_SCATTER 0
void drm_sg_cleanup(drm_sg_mem_t * entry) void drm_sg_cleanup(struct drm_sg_mem * entry)
{ {
struct page *page; struct page *page;
int i; int i;
@ -69,7 +69,7 @@ int drm_sg_alloc(struct inode *inode, struct file *filp,
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_scatter_gather __user *argp = (void __user *)arg; struct drm_scatter_gather __user *argp = (void __user *)arg;
struct drm_scatter_gather request; struct drm_scatter_gather request;
drm_sg_mem_t *entry; struct drm_sg_mem *entry;
unsigned long pages, i, j; unsigned long pages, i, j;
DRM_DEBUG("%s\n", __FUNCTION__); DRM_DEBUG("%s\n", __FUNCTION__);
@ -204,7 +204,7 @@ int drm_sg_free(struct inode *inode, struct file *filp,
struct drm_file *priv = filp->private_data; struct drm_file *priv = filp->private_data;
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_scatter_gather request; struct drm_scatter_gather request;
drm_sg_mem_t *entry; struct drm_sg_mem *entry;
if (!drm_core_check_feature(dev, DRIVER_SG)) if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL; return -EINVAL;

View File

@ -88,8 +88,8 @@ EXPORT_SYMBOL(drm_sman_init);
static void *drm_sman_mm_allocate(void *private, unsigned long size, static void *drm_sman_mm_allocate(void *private, unsigned long size,
unsigned alignment) unsigned alignment)
{ {
drm_mm_t *mm = (drm_mm_t *) private; struct drm_mm *mm = (struct drm_mm *) private;
drm_mm_node_t *tmp; struct drm_mm_node *tmp;
tmp = drm_mm_search_free(mm, size, alignment, 1); tmp = drm_mm_search_free(mm, size, alignment, 1);
if (!tmp) { if (!tmp) {
@ -101,21 +101,21 @@ static void *drm_sman_mm_allocate(void *private, unsigned long size,
static void drm_sman_mm_free(void *private, void *ref) static void drm_sman_mm_free(void *private, void *ref)
{ {
drm_mm_node_t *node = (drm_mm_node_t *) ref; struct drm_mm_node *node = (struct drm_mm_node *) ref;
drm_mm_put_block(node); drm_mm_put_block(node);
} }
static void drm_sman_mm_destroy(void *private) static void drm_sman_mm_destroy(void *private)
{ {
drm_mm_t *mm = (drm_mm_t *) private; struct drm_mm *mm = (struct drm_mm *) private;
drm_mm_takedown(mm); drm_mm_takedown(mm);
drm_free(mm, sizeof(*mm), DRM_MEM_MM); drm_free(mm, sizeof(*mm), DRM_MEM_MM);
} }
static unsigned long drm_sman_mm_offset(void *private, void *ref) static unsigned long drm_sman_mm_offset(void *private, void *ref)
{ {
drm_mm_node_t *node = (drm_mm_node_t *) ref; struct drm_mm_node *node = (struct drm_mm_node *) ref;
return node->start; return node->start;
} }
@ -124,7 +124,7 @@ drm_sman_set_range(drm_sman_t * sman, unsigned int manager,
unsigned long start, unsigned long size) unsigned long start, unsigned long size)
{ {
drm_sman_mm_t *sman_mm; drm_sman_mm_t *sman_mm;
drm_mm_t *mm; struct drm_mm *mm;
int ret; int ret;
BUG_ON(manager >= sman->num_managers); BUG_ON(manager >= sman->num_managers);

View File

@ -82,7 +82,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
struct drm_file *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_map *map = NULL; struct drm_map *map = NULL;
drm_map_list_t *r_list; struct drm_map_list *r_list;
drm_hash_item_t *hash; drm_hash_item_t *hash;
/* /*
@ -97,7 +97,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash)) if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash))
goto vm_nopage_error; goto vm_nopage_error;
r_list = drm_hash_entry(hash, drm_map_list_t, hash); r_list = drm_hash_entry(hash, struct drm_map_list, hash);
map = r_list->map; map = r_list->map;
if (map && map->type == _DRM_AGP) { if (map && map->type == _DRM_AGP) {
@ -198,7 +198,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_vma_entry *pt, *temp; struct drm_vma_entry *pt, *temp;
struct drm_map *map; struct drm_map *map;
drm_map_list_t *r_list; struct drm_map_list *r_list;
int found_maps = 0; int found_maps = 0;
DRM_DEBUG("0x%08lx,0x%08lx\n", DRM_DEBUG("0x%08lx,0x%08lx\n",
@ -313,7 +313,7 @@ static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *vma,
struct drm_map *map = (struct drm_map *) vma->vm_private_data; struct drm_map *map = (struct drm_map *) vma->vm_private_data;
struct drm_file *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_sg_mem_t *entry = dev->sg; struct drm_sg_mem *entry = dev->sg;
unsigned long offset; unsigned long offset;
unsigned long map_offset; unsigned long map_offset;
unsigned long page_offset; unsigned long page_offset;
@ -574,7 +574,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
return -EINVAL; return -EINVAL;
} }
map = drm_hash_entry(hash, drm_map_list_t, hash)->map; map = drm_hash_entry(hash, struct drm_map_list, hash)->map;
if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN))) if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
return -EPERM; return -EPERM;

View File

@ -327,7 +327,7 @@ static int i810_dma_initialize(struct drm_device * dev,
drm_i810_private_t * dev_priv, drm_i810_private_t * dev_priv,
drm_i810_init_t * init) drm_i810_init_t * init)
{ {
drm_map_list_t *r_list; struct drm_map_list *r_list;
memset(dev_priv, 0, sizeof(drm_i810_private_t)); memset(dev_priv, 0, sizeof(drm_i810_private_t));
list_for_each_entry(r_list, &dev->maplist, head) { list_for_each_entry(r_list, &dev->maplist, head) {

View File

@ -334,7 +334,7 @@ static int i830_dma_initialize(struct drm_device * dev,
drm_i830_private_t * dev_priv, drm_i830_private_t * dev_priv,
drm_i830_init_t * init) drm_i830_init_t * init)
{ {
drm_map_list_t *r_list; struct drm_map_list *r_list;
memset(dev_priv, 0, sizeof(drm_i830_private_t)); memset(dev_priv, 0, sizeof(drm_i830_private_t));

View File

@ -548,7 +548,7 @@ static int mga_do_agp_dma_bootstrap(struct drm_device * dev,
} }
{ {
drm_map_list_t *_entry; struct drm_map_list *_entry;
unsigned long agp_token = 0; unsigned long agp_token = 0;
list_for_each_entry(_entry, &dev->maplist, head) { list_for_each_entry(_entry, &dev->maplist, head) {

View File

@ -118,7 +118,7 @@ typedef struct drm_r128_private {
drm_local_map_t *cce_ring; drm_local_map_t *cce_ring;
drm_local_map_t *ring_rptr; drm_local_map_t *ring_rptr;
drm_local_map_t *agp_textures; drm_local_map_t *agp_textures;
drm_ati_pcigart_info gart_info; struct drm_ati_pcigart_info gart_info;
} drm_r128_private_t; } drm_r128_private_t;
typedef struct drm_r128_buf_priv { typedef struct drm_r128_buf_priv {

View File

@ -1174,7 +1174,7 @@ static void radeon_cp_init_ring_buffer(struct drm_device * dev,
} else } else
#endif #endif
{ {
drm_sg_mem_t *entry = dev->sg; struct drm_sg_mem *entry = dev->sg;
unsigned long tmp_ofs, page_ofs; unsigned long tmp_ofs, page_ofs;
tmp_ofs = dev_priv->ring_rptr->offset - tmp_ofs = dev_priv->ring_rptr->offset -

View File

@ -287,7 +287,7 @@ typedef struct drm_radeon_private {
unsigned long pcigart_offset; unsigned long pcigart_offset;
unsigned int pcigart_offset_set; unsigned int pcigart_offset_set;
drm_ati_pcigart_info gart_info; struct drm_ati_pcigart_info gart_info;
u32 scratch_ages[5]; u32 scratch_ages[5];

View File

@ -231,7 +231,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS)
static drm_local_map_t *sis_reg_init(struct drm_device *dev) static drm_local_map_t *sis_reg_init(struct drm_device *dev)
{ {
drm_map_list_t *entry; struct drm_map_list *entry;
drm_local_map_t *map; drm_local_map_t *map;
list_for_each_entry(entry, &dev->maplist, head) { list_for_each_entry(entry, &dev->maplist, head) {

View File

@ -254,7 +254,7 @@ static __inline__ drm_local_map_t *via_drm_lookup_agp_map(drm_via_state_t *seq,
unsigned long size, unsigned long size,
struct drm_device * dev) struct drm_device * dev)
{ {
drm_map_list_t *r_list; struct drm_map_list *r_list;
drm_local_map_t *map = seq->map_cache; drm_local_map_t *map = seq->map_cache;
if (map && map->offset <= offset if (map && map->offset <= offset