Commit 84b1fd10 authored by Dave Airlie's avatar Dave Airlie

drm: remove drm_file_t, drm_device_t and drm_head_t typedefs

some drivers still todo.
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent c60ce623
...@@ -73,7 +73,7 @@ static void drm_ati_free_pcigart_table(void *address, int order) ...@@ -73,7 +73,7 @@ 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(drm_device_t *dev, drm_ati_pcigart_info *gart_info) int drm_ati_pcigart_cleanup(struct drm_device *dev, drm_ati_pcigart_info *gart_info)
{ {
drm_sg_mem_t *entry = dev->sg; drm_sg_mem_t *entry = dev->sg;
unsigned long pages; unsigned long pages;
...@@ -122,7 +122,7 @@ int drm_ati_pcigart_cleanup(drm_device_t *dev, drm_ati_pcigart_info *gart_info) ...@@ -122,7 +122,7 @@ int drm_ati_pcigart_cleanup(drm_device_t *dev, drm_ati_pcigart_info *gart_info)
} }
EXPORT_SYMBOL(drm_ati_pcigart_cleanup); EXPORT_SYMBOL(drm_ati_pcigart_cleanup);
int drm_ati_pcigart_init(drm_device_t *dev, drm_ati_pcigart_info *gart_info) int drm_ati_pcigart_init(struct drm_device *dev, drm_ati_pcigart_info *gart_info)
{ {
drm_sg_mem_t *entry = dev->sg; drm_sg_mem_t *entry = dev->sg;
void *address = NULL; void *address = NULL;
......
...@@ -366,7 +366,7 @@ typedef struct drm_buf_entry { ...@@ -366,7 +366,7 @@ typedef struct drm_buf_entry {
} drm_buf_entry_t; } drm_buf_entry_t;
/** File private data */ /** File private data */
typedef struct drm_file { struct drm_file {
int authenticated; int authenticated;
int master; int master;
int minor; int minor;
...@@ -379,7 +379,7 @@ typedef struct drm_file { ...@@ -379,7 +379,7 @@ typedef struct drm_file {
int remove_auth_on_close; int remove_auth_on_close;
unsigned long lock_count; unsigned long lock_count;
void *driver_priv; void *driver_priv;
} drm_file_t; };
/** Wait queue */ /** Wait queue */
typedef struct drm_queue { typedef struct drm_queue {
...@@ -498,7 +498,7 @@ typedef struct drm_map drm_local_map_t; ...@@ -498,7 +498,7 @@ typedef struct drm_map drm_local_map_t;
typedef struct drm_ctx_list { typedef 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 */
drm_file_t *tag; /**< associated fd private data */ struct drm_file *tag; /**< associated fd private data */
} drm_ctx_list_t; } drm_ctx_list_t;
typedef struct drm_vbl_sig { typedef struct drm_vbl_sig {
...@@ -553,21 +553,21 @@ struct drm_device; ...@@ -553,21 +553,21 @@ struct drm_device;
struct drm_driver { struct drm_driver {
int (*load) (struct drm_device *, unsigned long flags); int (*load) (struct drm_device *, unsigned long flags);
int (*firstopen) (struct drm_device *); int (*firstopen) (struct drm_device *);
int (*open) (struct drm_device *, drm_file_t *); int (*open) (struct drm_device *, struct drm_file *);
void (*preclose) (struct drm_device *, struct file * filp); void (*preclose) (struct drm_device *, struct file * filp);
void (*postclose) (struct drm_device *, drm_file_t *); void (*postclose) (struct drm_device *, struct drm_file *);
void (*lastclose) (struct drm_device *); void (*lastclose) (struct drm_device *);
int (*unload) (struct drm_device *); int (*unload) (struct drm_device *);
int (*dma_ioctl) (DRM_IOCTL_ARGS); int (*dma_ioctl) (DRM_IOCTL_ARGS);
void (*dma_ready) (struct drm_device *); void (*dma_ready) (struct drm_device *);
int (*dma_quiescent) (struct drm_device *); int (*dma_quiescent) (struct drm_device *);
int (*context_ctor) (struct drm_device * dev, int context); int (*context_ctor) (struct drm_device *dev, int context);
int (*context_dtor) (struct drm_device * dev, int context); int (*context_dtor) (struct drm_device *dev, int context);
int (*kernel_context_switch) (struct drm_device * dev, int old, int (*kernel_context_switch) (struct drm_device *dev, int old,
int new); int new);
void (*kernel_context_switch_unlock) (struct drm_device * dev); void (*kernel_context_switch_unlock) (struct drm_device *dev);
int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence); int (*vblank_wait) (struct drm_device *dev, unsigned int *sequence);
int (*vblank_wait2) (struct drm_device * dev, unsigned int *sequence); int (*vblank_wait2) (struct drm_device *dev, unsigned int *sequence);
int (*dri_library_name) (struct drm_device *dev, char *buf); int (*dri_library_name) (struct drm_device *dev, char *buf);
/** /**
...@@ -581,22 +581,22 @@ struct drm_driver { ...@@ -581,22 +581,22 @@ struct drm_driver {
* card is absolutely \b not AGP (return of 0), absolutely \b is AGP * card is absolutely \b not AGP (return of 0), absolutely \b is AGP
* (return of 1), or may or may not be AGP (return of 2). * (return of 1), or may or may not be AGP (return of 2).
*/ */
int (*device_is_agp) (struct drm_device * dev); int (*device_is_agp) (struct drm_device *dev);
/* these have to be filled in */ /* these have to be filled in */
irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
void (*irq_preinstall) (struct drm_device * dev); void (*irq_preinstall) (struct drm_device *dev);
void (*irq_postinstall) (struct drm_device * dev); void (*irq_postinstall) (struct drm_device *dev);
void (*irq_uninstall) (struct drm_device * dev); void (*irq_uninstall) (struct drm_device *dev);
void (*reclaim_buffers) (struct drm_device * dev, struct file * filp); void (*reclaim_buffers) (struct drm_device *dev, struct file * filp);
void (*reclaim_buffers_locked) (struct drm_device *dev, void (*reclaim_buffers_locked) (struct drm_device *dev,
struct file *filp); struct file *filp);
void (*reclaim_buffers_idlelocked) (struct drm_device *dev, void (*reclaim_buffers_idlelocked) (struct drm_device *dev,
struct file * filp); struct file * filp);
unsigned long (*get_map_ofs) (struct drm_map * map); unsigned long (*get_map_ofs) (struct drm_map * map);
unsigned long (*get_reg_ofs) (struct drm_device * dev); unsigned long (*get_reg_ofs) (struct drm_device *dev);
void (*set_version) (struct drm_device * dev, void (*set_version) (struct drm_device *dev,
struct drm_set_version *sv); struct drm_set_version *sv);
int major; int major;
...@@ -619,19 +619,19 @@ struct drm_driver { ...@@ -619,19 +619,19 @@ struct drm_driver {
* that may contain multiple heads. Embed one per head of these in the * that may contain multiple heads. Embed one per head of these in the
* private drm_device structure. * private drm_device structure.
*/ */
typedef struct drm_head { struct drm_head {
int minor; /**< Minor device number */ int minor; /**< Minor device number */
struct drm_device *dev; struct drm_device *dev;
struct proc_dir_entry *dev_root; /**< proc directory entry */ struct proc_dir_entry *dev_root; /**< proc directory entry */
dev_t device; /**< Device number for mknod */ dev_t device; /**< Device number for mknod */
struct class_device *dev_class; struct class_device *dev_class;
} drm_head_t; };
/** /**
* DRM device structure. This structure represent a complete card that * DRM device structure. This structure represent a complete card that
* may contain multiple heads. * may contain multiple heads.
*/ */
typedef struct drm_device { struct drm_device {
char *unique; /**< Unique identifier: e.g., busid */ char *unique; /**< Unique identifier: e.g., busid */
int unique_len; /**< Length of unique field */ int unique_len; /**< Length of unique field */
char *devname; /**< For /proc/interrupts */ char *devname; /**< For /proc/interrupts */
...@@ -749,7 +749,7 @@ typedef struct drm_device { ...@@ -749,7 +749,7 @@ typedef struct drm_device {
struct drm_driver *driver; struct drm_driver *driver;
drm_local_map_t *agp_buffer_map; drm_local_map_t *agp_buffer_map;
unsigned int agp_buffer_token; unsigned int agp_buffer_token;
drm_head_t primary; /**< primary screen head */ struct drm_head primary; /**< primary screen head */
/** \name Drawable information */ /** \name Drawable information */
/*@{ */ /*@{ */
...@@ -759,7 +759,7 @@ typedef struct drm_device { ...@@ -759,7 +759,7 @@ typedef struct drm_device {
unsigned int drw_info_length; unsigned int drw_info_length;
struct drm_drawable_info **drw_info; struct drm_drawable_info **drw_info;
/*@} */ /*@} */
} drm_device_t; };
static __inline__ int drm_core_check_feature(struct drm_device *dev, static __inline__ int drm_core_check_feature(struct drm_device *dev,
int feature) int feature)
...@@ -831,7 +831,7 @@ extern int drm_ioctl(struct inode *inode, struct file *filp, ...@@ -831,7 +831,7 @@ extern int drm_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern long drm_compat_ioctl(struct file *filp, extern long drm_compat_ioctl(struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_lastclose(drm_device_t *dev); extern int drm_lastclose(struct drm_device *dev);
/* Device support (drm_fops.h) */ /* Device support (drm_fops.h) */
extern int drm_open(struct inode *inode, struct file *filp); extern int drm_open(struct inode *inode, struct file *filp);
...@@ -850,7 +850,7 @@ extern int drm_mem_info(char *buf, char **start, off_t offset, ...@@ -850,7 +850,7 @@ extern int drm_mem_info(char *buf, char **start, off_t offset,
int request, int *eof, void *data); int request, int *eof, void *data);
extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area); extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area);
extern DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type); extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type);
extern int drm_free_agp(DRM_AGP_MEM * handle, int pages); extern int drm_free_agp(DRM_AGP_MEM * handle, int pages);
extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
extern int drm_unbind_agp(DRM_AGP_MEM * handle); extern int drm_unbind_agp(DRM_AGP_MEM * handle);
...@@ -889,9 +889,9 @@ extern int drm_newctx(struct inode *inode, struct file *filp, ...@@ -889,9 +889,9 @@ extern int drm_newctx(struct inode *inode, struct file *filp,
extern int drm_rmctx(struct inode *inode, struct file *filp, extern int drm_rmctx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_ctxbitmap_init(drm_device_t * dev); extern int drm_ctxbitmap_init(struct drm_device *dev);
extern void drm_ctxbitmap_cleanup(drm_device_t * dev); extern void drm_ctxbitmap_cleanup(struct drm_device *dev);
extern void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle); extern void drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle);
extern int drm_setsareactx(struct inode *inode, struct file *filp, extern int drm_setsareactx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
...@@ -905,7 +905,7 @@ extern int drm_rmdraw(struct inode *inode, struct file *filp, ...@@ -905,7 +905,7 @@ extern int drm_rmdraw(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_update_drawable_info(struct inode *inode, struct file *filp, extern int drm_update_drawable_info(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern struct drm_drawable_info *drm_get_drawable_info(drm_device_t *dev, extern struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev,
drm_drawable_t id); drm_drawable_t id);
/* Authentication IOCTL support (drm_auth.h) */ /* Authentication IOCTL support (drm_auth.h) */
...@@ -933,15 +933,15 @@ extern int drm_i_have_hw_lock(struct file *filp); ...@@ -933,15 +933,15 @@ extern int drm_i_have_hw_lock(struct file *filp);
extern int drm_kernel_take_hw_lock(struct file *filp); extern int drm_kernel_take_hw_lock(struct file *filp);
/* Buffer management support (drm_bufs.h) */ /* Buffer management support (drm_bufs.h) */
extern int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request); extern int drm_addbufs_agp(struct drm_device *dev, struct drm_buf_desc * request);
extern int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request); extern int drm_addbufs_pci(struct drm_device *dev, struct drm_buf_desc * request);
extern int drm_addmap(drm_device_t * dev, unsigned int offset, extern 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);
extern int drm_addmap_ioctl(struct inode *inode, struct file *filp, extern int drm_addmap_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_rmmap(drm_device_t * dev, drm_local_map_t * map); extern int drm_rmmap(struct drm_device *dev, drm_local_map_t * map);
extern int drm_rmmap_locked(drm_device_t * dev, drm_local_map_t * map); extern int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t * map);
extern int drm_rmmap_ioctl(struct inode *inode, struct file *filp, extern int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
...@@ -956,56 +956,56 @@ extern int drm_freebufs(struct inode *inode, struct file *filp, ...@@ -956,56 +956,56 @@ extern int drm_freebufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_mapbufs(struct inode *inode, struct file *filp, extern int drm_mapbufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern unsigned long drm_get_resource_start(drm_device_t * dev, extern unsigned long drm_get_resource_start(struct drm_device *dev,
unsigned int resource); unsigned int resource);
extern unsigned long drm_get_resource_len(drm_device_t * dev, extern unsigned long drm_get_resource_len(struct drm_device *dev,
unsigned int resource); unsigned int resource);
/* DMA support (drm_dma.h) */ /* DMA support (drm_dma.h) */
extern int drm_dma_setup(drm_device_t * dev); extern int drm_dma_setup(struct drm_device *dev);
extern void drm_dma_takedown(drm_device_t * dev); extern void drm_dma_takedown(struct drm_device *dev);
extern void drm_free_buffer(drm_device_t * dev, drm_buf_t * buf); extern void drm_free_buffer(struct drm_device *dev, drm_buf_t * buf);
extern void drm_core_reclaim_buffers(drm_device_t * dev, struct file *filp); extern void drm_core_reclaim_buffers(struct drm_device *dev, struct file *filp);
/* IRQ support (drm_irq.h) */ /* IRQ support (drm_irq.h) */
extern int drm_control(struct inode *inode, struct file *filp, extern int drm_control(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS); extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS);
extern int drm_irq_uninstall(drm_device_t * dev); extern int drm_irq_uninstall(struct drm_device *dev);
extern void drm_driver_irq_preinstall(drm_device_t * dev); extern void drm_driver_irq_preinstall(struct drm_device *dev);
extern void drm_driver_irq_postinstall(drm_device_t * dev); extern void drm_driver_irq_postinstall(struct drm_device *dev);
extern void drm_driver_irq_uninstall(drm_device_t * dev); extern void drm_driver_irq_uninstall(struct drm_device *dev);
extern int drm_wait_vblank(struct inode *inode, struct file *filp, extern int drm_wait_vblank(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_vblank_wait(drm_device_t * dev, unsigned int *vbl_seq); extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
extern void drm_vbl_send_signals(drm_device_t * dev); extern void drm_vbl_send_signals(struct drm_device *dev);
extern void drm_locked_tasklet(drm_device_t *dev, void(*func)(drm_device_t*)); 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(drm_device_t * dev); extern drm_agp_head_t *drm_agp_init(struct drm_device *dev);
extern int drm_agp_acquire(drm_device_t * 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);
extern int drm_agp_release(drm_device_t * dev); extern int drm_agp_release(struct drm_device *dev);
extern int drm_agp_release_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_release_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_agp_enable(drm_device_t * dev, struct drm_agp_mode mode); extern int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode);
extern int drm_agp_enable_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_agp_info(drm_device_t * dev, struct drm_agp_info * info); extern int drm_agp_info(struct drm_device *dev, struct drm_agp_info * info);
extern int drm_agp_info_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_info_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_agp_alloc(drm_device_t *dev, struct drm_agp_buffer *request); extern int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request);
extern int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_agp_free(drm_device_t *dev, struct drm_agp_buffer *request); extern int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request);
extern int drm_agp_free_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_agp_unbind(drm_device_t *dev, struct drm_agp_binding *request); extern int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request);
extern int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern int drm_agp_bind(drm_device_t *dev, struct drm_agp_binding *request); extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request);
extern int drm_agp_bind_ioctl(struct inode *inode, struct file *filp, extern int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge,
...@@ -1017,18 +1017,18 @@ extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle); ...@@ -1017,18 +1017,18 @@ extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
/* Stub support (drm_stub.h) */ /* Stub support (drm_stub.h) */
extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
struct drm_driver *driver); struct drm_driver *driver);
extern int drm_put_dev(drm_device_t * dev); extern int drm_put_dev(struct drm_device *dev);
extern int drm_put_head(drm_head_t * head); extern int drm_put_head(struct drm_head *head);
extern unsigned int drm_debug; extern unsigned int drm_debug;
extern unsigned int drm_cards_limit; extern unsigned int drm_cards_limit;
extern drm_head_t **drm_heads; extern struct drm_head **drm_heads;
extern struct class *drm_class; extern struct class *drm_class;
extern struct proc_dir_entry *drm_proc_root; extern struct proc_dir_entry *drm_proc_root;
extern drm_local_map_t *drm_getsarea(struct drm_device *dev); extern drm_local_map_t *drm_getsarea(struct drm_device *dev);
/* Proc support (drm_proc.h) */ /* Proc support (drm_proc.h) */
extern int drm_proc_init(drm_device_t * dev, extern int drm_proc_init(struct drm_device *dev,
int minor, int minor,
struct proc_dir_entry *root, struct proc_dir_entry *root,
struct proc_dir_entry **dev_root); struct proc_dir_entry **dev_root);
...@@ -1044,21 +1044,21 @@ extern int drm_sg_free(struct inode *inode, struct file *filp, ...@@ -1044,21 +1044,21 @@ extern int drm_sg_free(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
/* ATI PCIGART support (ati_pcigart.h) */ /* ATI PCIGART support (ati_pcigart.h) */
extern int drm_ati_pcigart_init(drm_device_t * dev, extern int drm_ati_pcigart_init(struct drm_device *dev,
drm_ati_pcigart_info * gart_info); drm_ati_pcigart_info * gart_info);
extern int drm_ati_pcigart_cleanup(drm_device_t * dev, extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
drm_ati_pcigart_info * gart_info); drm_ati_pcigart_info * gart_info);
extern drm_dma_handle_t *drm_pci_alloc(drm_device_t * 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);
extern void __drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah); extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
extern void drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah); extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
/* sysfs support (drm_sysfs.c) */ /* sysfs support (drm_sysfs.c) */
extern struct class *drm_sysfs_create(struct module *owner, char *name); extern struct class *drm_sysfs_create(struct module *owner, char *name);
extern void drm_sysfs_destroy(struct class *cs); extern void drm_sysfs_destroy(struct class *cs);
extern struct class_device *drm_sysfs_device_add(struct class *cs, extern struct class_device *drm_sysfs_device_add(struct class *cs,
drm_head_t *head); struct drm_head *head);
extern void drm_sysfs_device_remove(struct class_device *class_dev); extern void drm_sysfs_device_remove(struct class_device *class_dev);
/* /*
...@@ -1090,7 +1090,7 @@ static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, ...@@ -1090,7 +1090,7 @@ static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,
return NULL; return NULL;
} }
static __inline__ int drm_device_is_agp(drm_device_t * dev) static __inline__ int drm_device_is_agp(struct drm_device *dev)
{ {
if (dev->driver->device_is_agp != NULL) { if (dev->driver->device_is_agp != NULL) {
int err = (*dev->driver->device_is_agp) (dev); int err = (*dev->driver->device_is_agp) (dev);
...@@ -1103,7 +1103,7 @@ static __inline__ int drm_device_is_agp(drm_device_t * dev) ...@@ -1103,7 +1103,7 @@ static __inline__ int drm_device_is_agp(drm_device_t * dev)
return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
} }
static __inline__ int drm_device_is_pcie(drm_device_t * dev) static __inline__ int drm_device_is_pcie(struct drm_device *dev)
{ {
return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP);
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
* Verifies the AGP device has been initialized and acquired and fills in the * Verifies the AGP device has been initialized and acquired and fills in the
* drm_agp_info structure with the information in drm_agp_head::agp_info. * drm_agp_info structure with the information in drm_agp_head::agp_info.
*/ */
int drm_agp_info(drm_device_t * dev, struct drm_agp_info * info) int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info)
{ {
DRM_AGP_KERN *kern; DRM_AGP_KERN *kern;
...@@ -74,8 +74,8 @@ EXPORT_SYMBOL(drm_agp_info); ...@@ -74,8 +74,8 @@ EXPORT_SYMBOL(drm_agp_info);
int drm_agp_info_ioctl(struct inode *inode, struct file *filp, int drm_agp_info_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_agp_info info; struct drm_agp_info info;
int err; int err;
...@@ -97,7 +97,7 @@ int drm_agp_info_ioctl(struct inode *inode, struct file *filp, ...@@ -97,7 +97,7 @@ int drm_agp_info_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device hasn't been acquired before and calls * Verifies the AGP device hasn't been acquired before and calls
* \c agp_backend_acquire. * \c agp_backend_acquire.
*/ */
int drm_agp_acquire(drm_device_t * dev) int drm_agp_acquire(struct drm_device * dev)
{ {
if (!dev->agp) if (!dev->agp)
return -ENODEV; return -ENODEV;
...@@ -126,9 +126,9 @@ EXPORT_SYMBOL(drm_agp_acquire); ...@@ -126,9 +126,9 @@ EXPORT_SYMBOL(drm_agp_acquire);
int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp, int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
return drm_agp_acquire((drm_device_t *) priv->head->dev); return drm_agp_acquire((struct drm_device *) priv->head->dev);
} }
/** /**
...@@ -139,7 +139,7 @@ int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp, ...@@ -139,7 +139,7 @@ int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
* *
* Verifies the AGP device has been acquired and calls \c agp_backend_release. * Verifies the AGP device has been acquired and calls \c agp_backend_release.
*/ */
int drm_agp_release(drm_device_t * dev) int drm_agp_release(struct drm_device * dev)
{ {
if (!dev->agp || !dev->agp->acquired) if (!dev->agp || !dev->agp->acquired)
return -EINVAL; return -EINVAL;
...@@ -152,8 +152,8 @@ EXPORT_SYMBOL(drm_agp_release); ...@@ -152,8 +152,8 @@ EXPORT_SYMBOL(drm_agp_release);
int drm_agp_release_ioctl(struct inode *inode, struct file *filp, int drm_agp_release_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
return drm_agp_release(dev); return drm_agp_release(dev);
} }
...@@ -168,7 +168,7 @@ int drm_agp_release_ioctl(struct inode *inode, struct file *filp, ...@@ -168,7 +168,7 @@ int drm_agp_release_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device has been acquired but not enabled, and calls * Verifies the AGP device has been acquired but not enabled, and calls
* \c agp_enable. * \c agp_enable.
*/ */
int drm_agp_enable(drm_device_t * dev, struct drm_agp_mode mode) int drm_agp_enable(struct drm_device * dev, struct drm_agp_mode mode)
{ {
if (!dev->agp || !dev->agp->acquired) if (!dev->agp || !dev->agp->acquired)
return -EINVAL; return -EINVAL;
...@@ -185,8 +185,8 @@ EXPORT_SYMBOL(drm_agp_enable); ...@@ -185,8 +185,8 @@ EXPORT_SYMBOL(drm_agp_enable);
int drm_agp_enable_ioctl(struct inode *inode, struct file *filp, int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_agp_mode mode; struct drm_agp_mode mode;
if (copy_from_user(&mode, (struct drm_agp_mode __user *) arg, sizeof(mode))) if (copy_from_user(&mode, (struct drm_agp_mode __user *) arg, sizeof(mode)))
...@@ -207,7 +207,7 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp, ...@@ -207,7 +207,7 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device is present and has been acquired, allocates the * Verifies the AGP device is present and has been acquired, allocates the
* memory via alloc_agp() and creates a drm_agp_mem entry for it. * memory via alloc_agp() and creates a drm_agp_mem entry for it.
*/ */
int drm_agp_alloc(drm_device_t *dev, struct drm_agp_buffer *request) int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request)
{ {
drm_agp_mem_t *entry; drm_agp_mem_t *entry;
DRM_AGP_MEM *memory; DRM_AGP_MEM *memory;
...@@ -244,8 +244,8 @@ EXPORT_SYMBOL(drm_agp_alloc); ...@@ -244,8 +244,8 @@ EXPORT_SYMBOL(drm_agp_alloc);
int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp, int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_agp_buffer request; struct drm_agp_buffer request;
struct drm_agp_buffer __user *argp = (void __user *)arg; struct drm_agp_buffer __user *argp = (void __user *)arg;
int err; int err;
...@@ -281,7 +281,7 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp, ...@@ -281,7 +281,7 @@ 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(drm_device_t * dev, static drm_agp_mem_t *drm_agp_lookup_entry(struct drm_device * dev,
unsigned long handle) unsigned long handle)
{ {
drm_agp_mem_t *entry; drm_agp_mem_t *entry;
...@@ -305,7 +305,7 @@ static drm_agp_mem_t *drm_agp_lookup_entry(drm_device_t * dev, ...@@ -305,7 +305,7 @@ static drm_agp_mem_t *drm_agp_lookup_entry(drm_device_t * dev,
* Verifies the AGP device is present and acquired, looks-up the AGP memory * Verifies the AGP device is present and acquired, looks-up the AGP memory
* entry and passes it to the unbind_agp() function. * entry and passes it to the unbind_agp() function.
*/ */
int drm_agp_unbind(drm_device_t *dev, struct drm_agp_binding *request) int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
{ {
drm_agp_mem_t *entry; drm_agp_mem_t *entry;
int ret; int ret;
...@@ -326,8 +326,8 @@ EXPORT_SYMBOL(drm_agp_unbind); ...@@ -326,8 +326,8 @@ EXPORT_SYMBOL(drm_agp_unbind);
int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp, int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_agp_binding request; struct drm_agp_binding request;
if (copy_from_user if (copy_from_user
...@@ -350,7 +350,7 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp, ...@@ -350,7 +350,7 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
* is currently bound into the GATT. Looks-up the AGP memory entry and passes * is currently bound into the GATT. Looks-up the AGP memory entry and passes
* it to bind_agp() function. * it to bind_agp() function.
*/ */
int drm_agp_bind(drm_device_t *dev, struct drm_agp_binding *request) int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
{ {
drm_agp_mem_t *entry; drm_agp_mem_t *entry;
int retcode; int retcode;
...@@ -375,8 +375,8 @@ EXPORT_SYMBOL(drm_agp_bind); ...@@ -375,8 +375,8 @@ EXPORT_SYMBOL(drm_agp_bind);
int drm_agp_bind_ioctl(struct inode *inode, struct file *filp, int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_agp_binding request; struct drm_agp_binding request;
if (copy_from_user if (copy_from_user
...@@ -400,7 +400,7 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp, ...@@ -400,7 +400,7 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
* unbind_agp(). Frees it via free_agp() as well as the entry itself * unbind_agp(). Frees it via free_agp() as well as the entry itself
* and unlinks from the doubly linked list it's inserted in. * and unlinks from the doubly linked list it's inserted in.
*/ */
int drm_agp_free(drm_device_t *dev, struct drm_agp_buffer *request) int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
{ {
drm_agp_mem_t *entry; drm_agp_mem_t *entry;
...@@ -422,8 +422,8 @@ EXPORT_SYMBOL(drm_agp_free); ...@@ -422,8 +422,8 @@ EXPORT_SYMBOL(drm_agp_free);
int drm_agp_free_ioctl(struct inode *inode, struct file *filp, int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_agp_buffer request; struct drm_agp_buffer request;
if (copy_from_user if (copy_from_user
...@@ -442,7 +442,7 @@ int drm_agp_free_ioctl(struct inode *inode, struct file *filp, ...@@ -442,7 +442,7 @@ 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(drm_device_t * dev) drm_agp_head_t *drm_agp_init(struct drm_device *dev)
{ {
drm_agp_head_t *head = NULL; drm_agp_head_t *head = NULL;
......
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
* the one with matching magic number, while holding the drm_device::struct_mutex * the one with matching magic number, while holding the drm_device::struct_mutex
* lock. * lock.
*/ */
static drm_file_t *drm_find_file(drm_device_t * dev, drm_magic_t magic) static struct drm_file *drm_find_file(struct drm_device * dev, drm_magic_t magic)
{ {
drm_file_t *retval = NULL; struct drm_file *retval = NULL;
drm_magic_entry_t *pt; drm_magic_entry_t *pt;
drm_hash_item_t *hash; drm_hash_item_t *hash;
...@@ -71,7 +71,7 @@ static drm_file_t *drm_find_file(drm_device_t * dev, drm_magic_t magic) ...@@ -71,7 +71,7 @@ static drm_file_t *drm_find_file(drm_device_t * dev, drm_magic_t magic)
* associated the magic number hash key in drm_device::magiclist, while holding * associated the magic number hash key in drm_device::magiclist, while holding
* the drm_device::struct_mutex lock. * the drm_device::struct_mutex lock.
*/ */
static int drm_add_magic(drm_device_t * dev, drm_file_t * priv, static int drm_add_magic(struct drm_device * dev, struct drm_file * priv,
drm_magic_t magic) drm_magic_t magic)
{ {
drm_magic_entry_t *entry; drm_magic_entry_t *entry;
...@@ -102,7 +102,7 @@ static int drm_add_magic(drm_device_t * dev, drm_file_t * priv, ...@@ -102,7 +102,7 @@ static int drm_add_magic(drm_device_t * dev, drm_file_t * priv,
* Searches and unlinks the entry in drm_device::magiclist with the magic * Searches and unlinks the entry in drm_device::magiclist with the magic
* number hash key, while holding the drm_device::struct_mutex lock. * number hash key, while holding the drm_device::struct_mutex lock.
*/ */
static int drm_remove_magic(drm_device_t * dev, drm_magic_t magic) static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic)
{ {
drm_magic_entry_t *pt; drm_magic_entry_t *pt;
drm_hash_item_t *hash; drm_hash_item_t *hash;
...@@ -142,8 +142,8 @@ int drm_getmagic(struct inode *inode, struct file *filp, ...@@ -142,8 +142,8 @@ int drm_getmagic(struct inode *inode, struct file *filp,
{ {
static drm_magic_t sequence = 0; static drm_magic_t sequence = 0;
static DEFINE_SPINLOCK(lock); static DEFINE_SPINLOCK(lock);
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_auth auth; struct drm_auth auth;
/* Find unique magic */ /* Find unique magic */
...@@ -181,10 +181,10 @@ int drm_getmagic(struct inode *inode, struct file *filp, ...@@ -181,10 +181,10 @@ int drm_getmagic(struct inode *inode, struct file *filp,
int drm_authmagic(struct inode *inode, struct file *filp, int drm_authmagic(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_auth auth; struct drm_auth auth;
drm_file_t *file; struct drm_file *file;
if (copy_from_user(&auth, (struct drm_auth __user *) arg, sizeof(auth))) if (copy_from_user(&auth, (struct drm_auth __user *) arg, sizeof(auth)))
return -EFAULT; return -EFAULT;
......
...@@ -36,20 +36,20 @@ ...@@ -36,20 +36,20 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include "drmP.h" #include "drmP.h"
unsigned long drm_get_resource_start(drm_device_t *dev, unsigned int resource) unsigned long drm_get_resource_start(struct drm_device *dev, unsigned int resource)
{ {
return pci_resource_start(dev->pdev, resource); return pci_resource_start(dev->pdev, resource);
} }
EXPORT_SYMBOL(drm_get_resource_start); EXPORT_SYMBOL(drm_get_resource_start);
unsigned long drm_get_resource_len(drm_device_t *dev, unsigned int resource) unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource)
{ {
return pci_resource_len(dev->pdev, resource); return pci_resource_len(dev->pdev, resource);
} }
EXPORT_SYMBOL(drm_get_resource_len); EXPORT_SYMBOL(drm_get_resource_len);
static drm_map_list_t *drm_find_matching_map(drm_device_t *dev, static drm_map_list_t *drm_find_matching_map(struct drm_device *dev,
drm_local_map_t *map) drm_local_map_t *map)
{ {
drm_map_list_t *entry; drm_map_list_t *entry;
...@@ -64,7 +64,7 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev, ...@@ -64,7 +64,7 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev,
return NULL; return NULL;
} }
static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash, static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *hash,
unsigned long user_token, int hashed_handle) unsigned long user_token, int hashed_handle)
{ {
int use_hashed_handle; int use_hashed_handle;
...@@ -101,7 +101,7 @@ static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash, ...@@ -101,7 +101,7 @@ static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash,
* type. Adds the map to the map list drm_device::maplist. Adds MTRR's where * type. Adds the map to the map list drm_device::maplist. Adds MTRR's where
* applicable and if supported by the kernel. * applicable and if supported by the kernel.
*/ */
static int drm_addmap_core(drm_device_t * 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, drm_map_list_t ** maplist)
{ {
...@@ -310,7 +310,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset, ...@@ -310,7 +310,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
return 0; return 0;
} }
int drm_addmap(drm_device_t * dev, unsigned int offset, 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)
{ {
...@@ -328,8 +328,8 @@ EXPORT_SYMBOL(drm_addmap); ...@@ -328,8 +328,8 @@ EXPORT_SYMBOL(drm_addmap);
int drm_addmap_ioctl(struct inode *inode, struct file *filp, int drm_addmap_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_map map; struct drm_map map;
drm_map_list_t *maplist; drm_map_list_t *maplist;
struct drm_map __user *argp = (void __user *)arg; struct drm_map __user *argp = (void __user *)arg;
...@@ -376,7 +376,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp, ...@@ -376,7 +376,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
* *
* \sa drm_addmap * \sa drm_addmap
*/ */
int drm_rmmap_locked(drm_device_t *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; drm_map_list_t *r_list = NULL, *list_t;
drm_dma_handle_t dmah; drm_dma_handle_t dmah;
...@@ -426,7 +426,7 @@ int drm_rmmap_locked(drm_device_t *dev, drm_local_map_t *map) ...@@ -426,7 +426,7 @@ int drm_rmmap_locked(drm_device_t *dev, drm_local_map_t *map)
return 0; return 0;
} }
int drm_rmmap(drm_device_t *dev, drm_local_map_t *map) int drm_rmmap(struct drm_device *dev, drm_local_map_t *map)
{ {
int ret; int ret;
...@@ -449,8 +449,8 @@ int drm_rmmap(drm_device_t *dev, drm_local_map_t *map) ...@@ -449,8 +449,8 @@ int drm_rmmap(drm_device_t *dev, drm_local_map_t *map)
int drm_rmmap_ioctl(struct inode *inode, struct file *filp, int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *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; drm_map_list_t *r_list;
...@@ -504,7 +504,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp, ...@@ -504,7 +504,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
* *
* Frees any pages and buffers associated with the given entry. * Frees any pages and buffers associated with the given entry.
*/ */
static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry) static void drm_cleanup_buf_error(struct drm_device * dev, drm_buf_entry_t * entry)
{ {
int i; int i;
...@@ -541,7 +541,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry) ...@@ -541,7 +541,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry)
/** /**
* Add AGP buffers for DMA transfers. * Add AGP buffers for DMA transfers.
* *
* \param dev drm_device_t to which the buffers are to be added. * \param dev struct drm_device to which the buffers are to be added.
* \param request pointer to a struct drm_buf_desc describing the request. * \param request pointer to a struct drm_buf_desc describing the request.
* \return zero on success or a negative number on failure. * \return zero on success or a negative number on failure.
* *
...@@ -549,7 +549,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry) ...@@ -549,7 +549,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry)
* reallocates the buffer list of the same size order to accommodate the new * reallocates the buffer list of the same size order to accommodate the new
* buffers. * buffers.
*/ */
int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request) int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry; drm_buf_entry_t *entry;
...@@ -719,7 +719,7 @@ int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request) ...@@ -719,7 +719,7 @@ int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request)
EXPORT_SYMBOL(drm_addbufs_agp); EXPORT_SYMBOL(drm_addbufs_agp);
#endif /* __OS_HAS_AGP */ #endif /* __OS_HAS_AGP */
int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request) int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
int count; int count;
...@@ -945,7 +945,7 @@ int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request) ...@@ -945,7 +945,7 @@ int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request)
} }
EXPORT_SYMBOL(drm_addbufs_pci); EXPORT_SYMBOL(drm_addbufs_pci);
static int drm_addbufs_sg(drm_device_t * dev, struct drm_buf_desc * request) static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry; drm_buf_entry_t *entry;
...@@ -1107,7 +1107,7 @@ static int drm_addbufs_sg(drm_device_t * dev, struct drm_buf_desc * request) ...@@ -1107,7 +1107,7 @@ static int drm_addbufs_sg(drm_device_t * dev, struct drm_buf_desc * request)
return 0; return 0;
} }
static int drm_addbufs_fb(drm_device_t * 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_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry; drm_buf_entry_t *entry;
...@@ -1286,8 +1286,8 @@ int drm_addbufs(struct inode *inode, struct file *filp, ...@@ -1286,8 +1286,8 @@ int drm_addbufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct drm_buf_desc request; struct drm_buf_desc request;
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
int ret; int ret;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
...@@ -1337,8 +1337,8 @@ int drm_addbufs(struct inode *inode, struct file *filp, ...@@ -1337,8 +1337,8 @@ int drm_addbufs(struct inode *inode, struct file *filp,
int drm_infobufs(struct inode *inode, struct file *filp, int drm_infobufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
struct drm_buf_info request; struct drm_buf_info request;
struct drm_buf_info __user *argp = (void __user *)arg; struct drm_buf_info __user *argp = (void __user *)arg;
...@@ -1425,8 +1425,8 @@ int drm_infobufs(struct inode *inode, struct file *filp, ...@@ -1425,8 +1425,8 @@ int drm_infobufs(struct inode *inode, struct file *filp,
int drm_markbufs(struct inode *inode, struct file *filp, int drm_markbufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
struct drm_buf_desc request; struct drm_buf_desc request;
int order; int order;
...@@ -1475,8 +1475,8 @@ int drm_markbufs(struct inode *inode, struct file *filp, ...@@ -1475,8 +1475,8 @@ int drm_markbufs(struct inode *inode, struct file *filp,
int drm_freebufs(struct inode *inode, struct file *filp, int drm_freebufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
struct drm_buf_free request; struct drm_buf_free request;
int i; int i;
...@@ -1531,8 +1531,8 @@ int drm_freebufs(struct inode *inode, struct file *filp, ...@@ -1531,8 +1531,8 @@ int drm_freebufs(struct inode *inode, struct file *filp,
int drm_mapbufs(struct inode *inode, struct file *filp, int drm_mapbufs(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
struct drm_buf_map __user *argp = (void __user *)arg; struct drm_buf_map __user *argp = (void __user *)arg;
int retcode = 0; int retcode = 0;
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* in drm_device::context_sareas, while holding the drm_device::struct_mutex * in drm_device::context_sareas, while holding the drm_device::struct_mutex
* lock. * lock.
*/ */
void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle) void drm_ctxbitmap_free(struct drm_device * dev, int ctx_handle)
{ {
if (ctx_handle < 0) if (ctx_handle < 0)
goto failed; goto failed;
...@@ -85,7 +85,7 @@ void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle) ...@@ -85,7 +85,7 @@ void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle)
* drm_device::context_sareas to accommodate the new entry while holding the * drm_device::context_sareas to accommodate the new entry while holding the
* drm_device::struct_mutex lock. * drm_device::struct_mutex lock.
*/ */
static int drm_ctxbitmap_next(drm_device_t * dev) static int drm_ctxbitmap_next(struct drm_device * dev)
{ {
int bit; int bit;
...@@ -147,7 +147,7 @@ static int drm_ctxbitmap_next(drm_device_t * dev) ...@@ -147,7 +147,7 @@ static int drm_ctxbitmap_next(drm_device_t * dev)
* Allocates and initialize drm_device::ctx_bitmap and drm_device::context_sareas, while holding * Allocates and initialize drm_device::ctx_bitmap and drm_device::context_sareas, while holding
* the drm_device::struct_mutex lock. * the drm_device::struct_mutex lock.
*/ */
int drm_ctxbitmap_init(drm_device_t * dev) int drm_ctxbitmap_init(struct drm_device * dev)
{ {
int i; int i;
int temp; int temp;
...@@ -180,7 +180,7 @@ int drm_ctxbitmap_init(drm_device_t * dev) ...@@ -180,7 +180,7 @@ int drm_ctxbitmap_init(drm_device_t * dev)
* Frees drm_device::ctx_bitmap and drm_device::context_sareas, while holding * Frees drm_device::ctx_bitmap and drm_device::context_sareas, while holding
* the drm_device::struct_mutex lock. * the drm_device::struct_mutex lock.
*/ */
void drm_ctxbitmap_cleanup(drm_device_t * dev) void drm_ctxbitmap_cleanup(struct drm_device * dev)
{ {
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
if (dev->context_sareas) if (dev->context_sareas)
...@@ -212,8 +212,8 @@ void drm_ctxbitmap_cleanup(drm_device_t * dev) ...@@ -212,8 +212,8 @@ void drm_ctxbitmap_cleanup(drm_device_t * dev)
int drm_getsareactx(struct inode *inode, struct file *filp, int drm_getsareactx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
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;
...@@ -263,8 +263,8 @@ int drm_getsareactx(struct inode *inode, struct file *filp, ...@@ -263,8 +263,8 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
int drm_setsareactx(struct inode *inode, struct file *filp, int drm_setsareactx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *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; drm_map_list_t *r_list = NULL;
...@@ -313,7 +313,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp, ...@@ -313,7 +313,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
* *
* Attempt to set drm_device::context_flag. * Attempt to set drm_device::context_flag.
*/ */
static int drm_context_switch(drm_device_t * dev, int old, int new) static int drm_context_switch(struct drm_device * dev, int old, int new)
{ {
if (test_and_set_bit(0, &dev->context_flag)) { if (test_and_set_bit(0, &dev->context_flag)) {
DRM_ERROR("Reentering -- FIXME\n"); DRM_ERROR("Reentering -- FIXME\n");
...@@ -341,7 +341,7 @@ static int drm_context_switch(drm_device_t * dev, int old, int new) ...@@ -341,7 +341,7 @@ static int drm_context_switch(drm_device_t * dev, int old, int new)
* hardware lock is held, clears the drm_device::context_flag and wakes up * hardware lock is held, clears the drm_device::context_flag and wakes up
* drm_device::context_wait. * drm_device::context_wait.
*/ */
static int drm_context_switch_complete(drm_device_t * dev, int new) static int drm_context_switch_complete(struct drm_device * dev, int new)
{ {
dev->last_context = new; /* PRE/POST: This is the _only_ writer. */ dev->last_context = new; /* PRE/POST: This is the _only_ writer. */
dev->last_switch = jiffies; dev->last_switch = jiffies;
...@@ -408,8 +408,8 @@ int drm_resctx(struct inode *inode, struct file *filp, ...@@ -408,8 +408,8 @@ int drm_resctx(struct inode *inode, struct file *filp,
int drm_addctx(struct inode *inode, struct file *filp, int drm_addctx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_ctx_list_t *ctx_entry; drm_ctx_list_t *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;
...@@ -504,8 +504,8 @@ int drm_getctx(struct inode *inode, struct file *filp, ...@@ -504,8 +504,8 @@ int drm_getctx(struct inode *inode, struct file *filp,
int drm_switchctx(struct inode *inode, struct file *filp, int drm_switchctx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_ctx ctx; struct drm_ctx ctx;
if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))
...@@ -529,8 +529,8 @@ int drm_switchctx(struct inode *inode, struct file *filp, ...@@ -529,8 +529,8 @@ int drm_switchctx(struct inode *inode, struct file *filp,
int drm_newctx(struct inode *inode, struct file *filp, int drm_newctx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_ctx ctx; struct drm_ctx ctx;
if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))
...@@ -556,8 +556,8 @@ int drm_newctx(struct inode *inode, struct file *filp, ...@@ -556,8 +556,8 @@ int drm_newctx(struct inode *inode, struct file *filp,
int drm_rmctx(struct inode *inode, struct file *filp, int drm_rmctx(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_ctx ctx; struct drm_ctx ctx;
if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
* *
* Allocate and initialize a drm_device_dma structure. * Allocate and initialize a drm_device_dma structure.
*/ */
int drm_dma_setup(drm_device_t * dev) int drm_dma_setup(struct drm_device *dev)
{ {
int i; int i;
...@@ -67,7 +67,7 @@ int drm_dma_setup(drm_device_t * dev) ...@@ -67,7 +67,7 @@ int drm_dma_setup(drm_device_t * dev)
* Free all pages associated with DMA buffers, the buffers and pages lists, and * Free all pages associated with DMA buffers, the buffers and pages lists, and
* finally the drm_device::dma structure itself. * finally the drm_device::dma structure itself.
*/ */
void drm_dma_takedown(drm_device_t * dev) void drm_dma_takedown(struct drm_device *dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
int i, j; int i, j;
...@@ -129,7 +129,7 @@ void drm_dma_takedown(drm_device_t * dev) ...@@ -129,7 +129,7 @@ void drm_dma_takedown(drm_device_t * dev)
* *
* Resets the fields of \p buf. * Resets the fields of \p buf.
*/ */
void drm_free_buffer(drm_device_t * dev, drm_buf_t * buf) void drm_free_buffer(struct drm_device *dev, drm_buf_t * buf)
{ {
if (!buf) if (!buf)
return; return;
...@@ -152,7 +152,7 @@ void drm_free_buffer(drm_device_t * dev, drm_buf_t * buf) ...@@ -152,7 +152,7 @@ void drm_free_buffer(drm_device_t * dev, drm_buf_t * buf)
* *
* Frees each buffer associated with \p filp not already on the hardware. * Frees each buffer associated with \p filp not already on the hardware.
*/ */
void drm_core_reclaim_buffers(drm_device_t * dev, struct file *filp) void drm_core_reclaim_buffers(struct drm_device *dev, struct file *filp)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
int i; int i;
......
...@@ -322,7 +322,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS) { ...@@ -322,7 +322,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS) {
/** /**
* Caller must hold the drawable spinlock! * Caller must hold the drawable spinlock!
*/ */
struct drm_drawable_info *drm_get_drawable_info(drm_device_t *dev, drm_drawable_t id) { struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, drm_drawable_t id) {
u32 *bitfield = dev->drw_bitfield; u32 *bitfield = dev->drw_bitfield;
unsigned int idx, shift; unsigned int idx, shift;
......
...@@ -129,7 +129,7 @@ static drm_ioctl_desc_t drm_ioctls[] = { ...@@ -129,7 +129,7 @@ static drm_ioctl_desc_t drm_ioctls[] = {
* *
* \sa drm_device * \sa drm_device
*/ */
int drm_lastclose(drm_device_t * dev) int drm_lastclose(struct drm_device * dev)
{ {
drm_magic_entry_t *pt, *next; drm_magic_entry_t *pt, *next;
drm_map_list_t *r_list, *list_t; drm_map_list_t *r_list, *list_t;
...@@ -290,7 +290,7 @@ EXPORT_SYMBOL(drm_init); ...@@ -290,7 +290,7 @@ EXPORT_SYMBOL(drm_init);
* *
* \sa drm_init * \sa drm_init
*/ */
static void drm_cleanup(drm_device_t * dev) static void drm_cleanup(struct drm_device * dev)
{ {
DRM_DEBUG("\n"); DRM_DEBUG("\n");
...@@ -330,8 +330,8 @@ static void drm_cleanup(drm_device_t * dev) ...@@ -330,8 +330,8 @@ static void drm_cleanup(drm_device_t * dev)
void drm_exit(struct drm_driver *driver) void drm_exit(struct drm_driver *driver)
{ {
int i; int i;
drm_device_t *dev = NULL; struct drm_device *dev = NULL;
drm_head_t *head; struct drm_head *head;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
...@@ -430,8 +430,8 @@ module_exit(drm_core_exit); ...@@ -430,8 +430,8 @@ module_exit(drm_core_exit);
static int drm_version(struct inode *inode, struct file *filp, static int drm_version(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_version __user *argp = (void __user *)arg; struct drm_version __user *argp = (void __user *)arg;
struct drm_version version; struct drm_version version;
int len; int len;
...@@ -466,8 +466,8 @@ static int drm_version(struct inode *inode, struct file *filp, ...@@ -466,8 +466,8 @@ static int drm_version(struct inode *inode, struct file *filp,
int drm_ioctl(struct inode *inode, struct file *filp, int drm_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_ioctl_desc_t *ioctl; drm_ioctl_desc_t *ioctl;
drm_ioctl_t *func; drm_ioctl_t *func;
unsigned int nr = DRM_IOCTL_NR(cmd); unsigned int nr = DRM_IOCTL_NR(cmd);
......
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
#include <linux/poll.h> #include <linux/poll.h>
static int drm_open_helper(struct inode *inode, struct file *filp, static int drm_open_helper(struct inode *inode, struct file *filp,
drm_device_t * dev); struct drm_device * dev);
static int drm_setup(drm_device_t * dev) static int drm_setup(struct drm_device * dev)
{ {
drm_local_map_t *map; drm_local_map_t *map;
int i; int i;
...@@ -128,7 +128,7 @@ static int drm_setup(drm_device_t * dev) ...@@ -128,7 +128,7 @@ static int drm_setup(drm_device_t * dev)
*/ */
int drm_open(struct inode *inode, struct file *filp) int drm_open(struct inode *inode, struct file *filp)
{ {
drm_device_t *dev = NULL; struct drm_device *dev = NULL;
int minor = iminor(inode); int minor = iminor(inode);
int retcode = 0; int retcode = 0;
...@@ -167,7 +167,7 @@ EXPORT_SYMBOL(drm_open); ...@@ -167,7 +167,7 @@ EXPORT_SYMBOL(drm_open);
*/ */
int drm_stub_open(struct inode *inode, struct file *filp) int drm_stub_open(struct inode *inode, struct file *filp)
{ {
drm_device_t *dev = NULL; struct drm_device *dev = NULL;
int minor = iminor(inode); int minor = iminor(inode);
int err = -ENODEV; int err = -ENODEV;
const struct file_operations *old_fops; const struct file_operations *old_fops;
...@@ -223,10 +223,10 @@ static int drm_cpu_valid(void) ...@@ -223,10 +223,10 @@ static int drm_cpu_valid(void)
* filp and add it into the double linked list in \p dev. * filp and add it into the double linked list in \p dev.
*/ */
static int drm_open_helper(struct inode *inode, struct file *filp, static int drm_open_helper(struct inode *inode, struct file *filp,
drm_device_t * dev) struct drm_device * dev)
{ {
int minor = iminor(inode); int minor = iminor(inode);
drm_file_t *priv; struct drm_file *priv;
int ret; int ret;
if (filp->f_flags & O_EXCL) if (filp->f_flags & O_EXCL)
...@@ -295,8 +295,8 @@ static int drm_open_helper(struct inode *inode, struct file *filp, ...@@ -295,8 +295,8 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
/** No-op. */ /** No-op. */
int drm_fasync(int fd, struct file *filp, int on) int drm_fasync(int fd, struct file *filp, int on)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
int retcode; int retcode;
DRM_DEBUG("fd = %d, device = 0x%lx\n", fd, DRM_DEBUG("fd = %d, device = 0x%lx\n", fd,
...@@ -322,8 +322,8 @@ EXPORT_SYMBOL(drm_fasync); ...@@ -322,8 +322,8 @@ EXPORT_SYMBOL(drm_fasync);
*/ */
int drm_release(struct inode *inode, struct file *filp) int drm_release(struct inode *inode, struct file *filp)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev; struct drm_device *dev;
int retcode = 0; int retcode = 0;
lock_kernel(); lock_kernel();
...@@ -422,7 +422,7 @@ int drm_release(struct inode *inode, struct file *filp) ...@@ -422,7 +422,7 @@ int drm_release(struct inode *inode, struct file *filp)
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
if (priv->remove_auth_on_close == 1) { if (priv->remove_auth_on_close == 1) {
drm_file_t *temp; struct drm_file *temp;
list_for_each_entry(temp, &dev->filelist, lhead) list_for_each_entry(temp, &dev->filelist, lhead)
temp->authenticated = 0; temp->authenticated = 0;
......
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
int drm_getunique(struct inode *inode, struct file *filp, int drm_getunique(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_unique __user *argp = (void __user *)arg; struct drm_unique __user *argp = (void __user *)arg;
struct drm_unique u; struct drm_unique u;
...@@ -86,8 +86,8 @@ int drm_getunique(struct inode *inode, struct file *filp, ...@@ -86,8 +86,8 @@ int drm_getunique(struct inode *inode, struct file *filp,
int drm_setunique(struct inode *inode, struct file *filp, int drm_setunique(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_unique u; struct drm_unique u;
int domain, bus, slot, func, ret; int domain, bus, slot, func, ret;
...@@ -136,7 +136,7 @@ int drm_setunique(struct inode *inode, struct file *filp, ...@@ -136,7 +136,7 @@ int drm_setunique(struct inode *inode, struct file *filp,
return 0; return 0;
} }
static int drm_set_busid(drm_device_t * dev) static int drm_set_busid(struct drm_device * dev)
{ {
int len; int len;
...@@ -184,8 +184,8 @@ static int drm_set_busid(drm_device_t * dev) ...@@ -184,8 +184,8 @@ static int drm_set_busid(drm_device_t * dev)
int drm_getmap(struct inode *inode, struct file *filp, int drm_getmap(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *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; drm_map_list_t *r_list = NULL;
...@@ -245,11 +245,11 @@ int drm_getmap(struct inode *inode, struct file *filp, ...@@ -245,11 +245,11 @@ int drm_getmap(struct inode *inode, struct file *filp,
int drm_getclient(struct inode *inode, struct file *filp, int drm_getclient(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_client __user *argp = (struct drm_client __user *)arg; struct drm_client __user *argp = (struct drm_client __user *)arg;
struct drm_client client; struct drm_client client;
drm_file_t *pt; struct drm_file *pt;
int idx; int idx;
int i; int i;
...@@ -294,8 +294,8 @@ int drm_getclient(struct inode *inode, struct file *filp, ...@@ -294,8 +294,8 @@ int drm_getclient(struct inode *inode, struct file *filp,
int drm_getstats(struct inode *inode, struct file *filp, int drm_getstats(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_stats stats; struct drm_stats stats;
int i; int i;
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
int drm_irq_by_busid(struct inode *inode, struct file *filp, int drm_irq_by_busid(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_irq_busid __user *argp = (void __user *)arg; struct drm_irq_busid __user *argp = (void __user *)arg;
struct drm_irq_busid p; struct drm_irq_busid p;
...@@ -87,7 +87,7 @@ int drm_irq_by_busid(struct inode *inode, struct file *filp, ...@@ -87,7 +87,7 @@ int drm_irq_by_busid(struct inode *inode, struct file *filp,
* \c drm_driver_irq_preinstall() and \c drm_driver_irq_postinstall() functions * \c drm_driver_irq_preinstall() and \c drm_driver_irq_postinstall() functions
* before and after the installation. * before and after the installation.
*/ */
static int drm_irq_install(drm_device_t * dev) static int drm_irq_install(struct drm_device * dev)
{ {
int ret; int ret;
unsigned long sh_flags = 0; unsigned long sh_flags = 0;
...@@ -155,7 +155,7 @@ static int drm_irq_install(drm_device_t * dev) ...@@ -155,7 +155,7 @@ static int drm_irq_install(drm_device_t * dev)
* *
* Calls the driver's \c drm_driver_irq_uninstall() function, and stops the irq. * Calls the driver's \c drm_driver_irq_uninstall() function, and stops the irq.
*/ */
int drm_irq_uninstall(drm_device_t * dev) int drm_irq_uninstall(struct drm_device * dev)
{ {
int irq_enabled; int irq_enabled;
...@@ -197,8 +197,8 @@ EXPORT_SYMBOL(drm_irq_uninstall); ...@@ -197,8 +197,8 @@ EXPORT_SYMBOL(drm_irq_uninstall);
int drm_control(struct inode *inode, struct file *filp, int drm_control(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_control ctl; struct drm_control ctl;
/* if we haven't irq we fallback for compatibility reasons - this used to be a separate function in drm_dma.h */ /* if we haven't irq we fallback for compatibility reasons - this used to be a separate function in drm_dma.h */
...@@ -244,8 +244,8 @@ int drm_control(struct inode *inode, struct file *filp, ...@@ -244,8 +244,8 @@ int drm_control(struct inode *inode, struct file *filp,
*/ */
int drm_wait_vblank(DRM_IOCTL_ARGS) int drm_wait_vblank(DRM_IOCTL_ARGS)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
union drm_wait_vblank __user *argp = (void __user *)data; union drm_wait_vblank __user *argp = (void __user *)data;
union drm_wait_vblank vblwait; union drm_wait_vblank vblwait;
struct timeval now; struct timeval now;
...@@ -371,7 +371,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS) ...@@ -371,7 +371,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
* *
* If a signal is not requested, then calls vblank_wait(). * If a signal is not requested, then calls vblank_wait().
*/ */
void drm_vbl_send_signals(drm_device_t * dev) void drm_vbl_send_signals(struct drm_device * dev)
{ {
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -416,7 +416,7 @@ EXPORT_SYMBOL(drm_vbl_send_signals); ...@@ -416,7 +416,7 @@ EXPORT_SYMBOL(drm_vbl_send_signals);
*/ */
static void drm_locked_tasklet_func(unsigned long data) static void drm_locked_tasklet_func(unsigned long data)
{ {
drm_device_t *dev = (drm_device_t*)data; struct drm_device *dev = (struct drm_device *)data;
unsigned long irqflags; unsigned long irqflags;
spin_lock_irqsave(&dev->tasklet_lock, irqflags); spin_lock_irqsave(&dev->tasklet_lock, irqflags);
...@@ -453,7 +453,7 @@ static void drm_locked_tasklet_func(unsigned long data) ...@@ -453,7 +453,7 @@ static void drm_locked_tasklet_func(unsigned long data)
* context, it must not make any assumptions about this. Also, the HW lock will * context, it must not make any assumptions about this. Also, the HW lock will
* be held with the kernel context or any client context. * be held with the kernel context or any client context.
*/ */
void drm_locked_tasklet(drm_device_t *dev, void (*func)(drm_device_t*)) void drm_locked_tasklet(struct drm_device *dev, void (*func)(struct drm_device *))
{ {
unsigned long irqflags; unsigned long irqflags;
static DECLARE_TASKLET(drm_tasklet, drm_locked_tasklet_func, 0); static DECLARE_TASKLET(drm_tasklet, drm_locked_tasklet_func, 0);
......
...@@ -51,8 +51,8 @@ static int drm_notifier(void *priv); ...@@ -51,8 +51,8 @@ static int drm_notifier(void *priv);
int drm_lock(struct inode *inode, struct file *filp, int drm_lock(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
DECLARE_WAITQUEUE(entry, current); DECLARE_WAITQUEUE(entry, current);
struct drm_lock lock; struct drm_lock lock;
int ret = 0; int ret = 0;
...@@ -152,8 +152,8 @@ int drm_lock(struct inode *inode, struct file *filp, ...@@ -152,8 +152,8 @@ int drm_lock(struct inode *inode, struct file *filp,
int drm_unlock(struct inode *inode, struct file *filp, int drm_unlock(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_lock lock; struct drm_lock lock;
unsigned long irqflags; unsigned long irqflags;
......
...@@ -80,7 +80,7 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area) ...@@ -80,7 +80,7 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area)
#if __OS_HAS_AGP #if __OS_HAS_AGP
static void *agp_remap(unsigned long offset, unsigned long size, static void *agp_remap(unsigned long offset, unsigned long size,
drm_device_t * dev) struct drm_device * dev)
{ {
unsigned long *phys_addr_map, i, num_pages = unsigned long *phys_addr_map, i, num_pages =
PAGE_ALIGN(size) / PAGE_SIZE; PAGE_ALIGN(size) / PAGE_SIZE;
...@@ -123,7 +123,7 @@ static void *agp_remap(unsigned long offset, unsigned long size, ...@@ -123,7 +123,7 @@ static void *agp_remap(unsigned long offset, unsigned long size,
} }
/** Wrapper around agp_allocate_memory() */ /** Wrapper around agp_allocate_memory() */
DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type) DRM_AGP_MEM *drm_alloc_agp(struct drm_device * dev, int pages, u32 type)
{ {
return drm_agp_allocate_memory(dev->agp->bridge, pages, type); return drm_agp_allocate_memory(dev->agp->bridge, pages, type);
} }
...@@ -148,7 +148,7 @@ int drm_unbind_agp(DRM_AGP_MEM * handle) ...@@ -148,7 +148,7 @@ int drm_unbind_agp(DRM_AGP_MEM * handle)
#else /* __OS_HAS_AGP */ #else /* __OS_HAS_AGP */
static inline void *agp_remap(unsigned long offset, unsigned long size, static inline void *agp_remap(unsigned long offset, unsigned long size,
drm_device_t * dev) struct drm_device * dev)
{ {
return NULL; return NULL;
} }
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
/** Read/write memory barrier */ /** Read/write memory barrier */
#define DRM_MEMORYBARRIER() mb() #define DRM_MEMORYBARRIER() mb()
/** DRM device local declaration */ /** DRM device local declaration */
#define DRM_DEVICE drm_file_t *priv = filp->private_data; \ #define DRM_DEVICE struct drm_file *priv = filp->private_data; \
drm_device_t *dev = priv->head->dev struct drm_device *dev = priv->head->dev
/** IRQ handler arguments and return type and values */ /** IRQ handler arguments and return type and values */
#define DRM_IRQ_ARGS int irq, void *arg #define DRM_IRQ_ARGS int irq, void *arg
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/** /**
* \brief Allocate a PCI consistent memory block, for DMA. * \brief Allocate a PCI consistent memory block, for DMA.
*/ */
drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, size_t align, drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t align,
dma_addr_t maxaddr) dma_addr_t maxaddr)
{ {
drm_dma_handle_t *dmah; drm_dma_handle_t *dmah;
...@@ -126,7 +126,7 @@ EXPORT_SYMBOL(drm_pci_alloc); ...@@ -126,7 +126,7 @@ EXPORT_SYMBOL(drm_pci_alloc);
* *
* This function is for internal use in the Linux-specific DRM core code. * This function is for internal use in the Linux-specific DRM core code.
*/ */
void __drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah) void __drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
{ {
#if 1 #if 1
unsigned long addr; unsigned long addr;
...@@ -172,7 +172,7 @@ void __drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah) ...@@ -172,7 +172,7 @@ void __drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah)
/** /**
* \brief Free a PCI consistent memory block * \brief Free a PCI consistent memory block
*/ */
void drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah) void drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
{ {
__drm_pci_free(dev, dmah); __drm_pci_free(dev, dmah);
kfree(dmah); kfree(dmah);
......
...@@ -87,7 +87,7 @@ static struct drm_proc_list { ...@@ -87,7 +87,7 @@ static struct drm_proc_list {
* "/proc/dri/%minor%/", and each entry in proc_list as * "/proc/dri/%minor%/", and each entry in proc_list as
* "/proc/dri/%minor%/%name%". * "/proc/dri/%minor%/%name%".
*/ */
int drm_proc_init(drm_device_t * dev, int minor, int drm_proc_init(struct drm_device * dev, int minor,
struct proc_dir_entry *root, struct proc_dir_entry **dev_root) struct proc_dir_entry *root, struct proc_dir_entry **dev_root)
{ {
struct proc_dir_entry *ent; struct proc_dir_entry *ent;
...@@ -163,7 +163,7 @@ int drm_proc_cleanup(int minor, struct proc_dir_entry *root, ...@@ -163,7 +163,7 @@ int drm_proc_cleanup(int minor, struct proc_dir_entry *root,
static int drm_name_info(char *buf, char **start, off_t offset, int request, static int drm_name_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int len = 0; int len = 0;
if (offset > DRM_PROC_LIMIT) { if (offset > DRM_PROC_LIMIT) {
...@@ -205,7 +205,7 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request, ...@@ -205,7 +205,7 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request,
static int drm__vm_info(char *buf, char **start, off_t offset, int request, static int drm__vm_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) 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; drm_map_list_t *r_list;
...@@ -261,7 +261,7 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request, ...@@ -261,7 +261,7 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request,
static int drm_vm_info(char *buf, char **start, off_t offset, int request, static int drm_vm_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int ret; int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
...@@ -284,7 +284,7 @@ static int drm_vm_info(char *buf, char **start, off_t offset, int request, ...@@ -284,7 +284,7 @@ static int drm_vm_info(char *buf, char **start, off_t offset, int request,
static int drm__queues_info(char *buf, char **start, off_t offset, static int drm__queues_info(char *buf, char **start, off_t offset,
int request, int *eof, void *data) int request, int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int len = 0; int len = 0;
int i; int i;
drm_queue_t *q; drm_queue_t *q;
...@@ -334,7 +334,7 @@ static int drm__queues_info(char *buf, char **start, off_t offset, ...@@ -334,7 +334,7 @@ static int drm__queues_info(char *buf, char **start, off_t offset,
static int drm_queues_info(char *buf, char **start, off_t offset, int request, static int drm_queues_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int ret; int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
...@@ -357,7 +357,7 @@ static int drm_queues_info(char *buf, char **start, off_t offset, int request, ...@@ -357,7 +357,7 @@ static int drm_queues_info(char *buf, char **start, off_t offset, int request,
static int drm__bufs_info(char *buf, char **start, off_t offset, int request, static int drm__bufs_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int len = 0; int len = 0;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
int i; int i;
...@@ -406,7 +406,7 @@ static int drm__bufs_info(char *buf, char **start, off_t offset, int request, ...@@ -406,7 +406,7 @@ static int drm__bufs_info(char *buf, char **start, off_t offset, int request,
static int drm_bufs_info(char *buf, char **start, off_t offset, int request, static int drm_bufs_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int ret; int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
...@@ -429,9 +429,9 @@ static int drm_bufs_info(char *buf, char **start, off_t offset, int request, ...@@ -429,9 +429,9 @@ static int drm_bufs_info(char *buf, char **start, off_t offset, int request,
static int drm__clients_info(char *buf, char **start, off_t offset, static int drm__clients_info(char *buf, char **start, off_t offset,
int request, int *eof, void *data) int request, int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int len = 0; int len = 0;
drm_file_t *priv; struct drm_file *priv;
if (offset > DRM_PROC_LIMIT) { if (offset > DRM_PROC_LIMIT) {
*eof = 1; *eof = 1;
...@@ -462,7 +462,7 @@ static int drm__clients_info(char *buf, char **start, off_t offset, ...@@ -462,7 +462,7 @@ static int drm__clients_info(char *buf, char **start, off_t offset,
static int drm_clients_info(char *buf, char **start, off_t offset, static int drm_clients_info(char *buf, char **start, off_t offset,
int request, int *eof, void *data) int request, int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int ret; int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
...@@ -476,7 +476,7 @@ static int drm_clients_info(char *buf, char **start, off_t offset, ...@@ -476,7 +476,7 @@ static int drm_clients_info(char *buf, char **start, off_t offset,
static int drm__vma_info(char *buf, char **start, off_t offset, int request, static int drm__vma_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int len = 0; int len = 0;
drm_vma_entry_t *pt; drm_vma_entry_t *pt;
struct vm_area_struct *vma; struct vm_area_struct *vma;
...@@ -535,7 +535,7 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request, ...@@ -535,7 +535,7 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request,
static int drm_vma_info(char *buf, char **start, off_t offset, int request, static int drm_vma_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data) int *eof, void *data)
{ {
drm_device_t *dev = (drm_device_t *) data; struct drm_device *dev = (struct drm_device *) data;
int ret; int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
......
...@@ -65,8 +65,8 @@ void drm_sg_cleanup(drm_sg_mem_t * entry) ...@@ -65,8 +65,8 @@ void drm_sg_cleanup(drm_sg_mem_t * entry)
int drm_sg_alloc(struct inode *inode, struct file *filp, int drm_sg_alloc(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *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; drm_sg_mem_t *entry;
...@@ -201,8 +201,8 @@ int drm_sg_alloc(struct inode *inode, struct file *filp, ...@@ -201,8 +201,8 @@ int drm_sg_alloc(struct inode *inode, struct file *filp,
int drm_sg_free(struct inode *inode, struct file *filp, int drm_sg_free(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *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; drm_sg_mem_t *entry;
......
...@@ -49,11 +49,11 @@ MODULE_PARM_DESC(debug, "Enable debug output"); ...@@ -49,11 +49,11 @@ MODULE_PARM_DESC(debug, "Enable debug output");
module_param_named(cards_limit, drm_cards_limit, int, 0444); module_param_named(cards_limit, drm_cards_limit, int, 0444);
module_param_named(debug, drm_debug, int, 0600); module_param_named(debug, drm_debug, int, 0600);
drm_head_t **drm_heads; struct drm_head **drm_heads;
struct class *drm_class; struct class *drm_class;
struct proc_dir_entry *drm_proc_root; struct proc_dir_entry *drm_proc_root;
static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev,
const struct pci_device_id *ent, const struct pci_device_id *ent,
struct drm_driver *driver) struct drm_driver *driver)
{ {
...@@ -143,9 +143,9 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, ...@@ -143,9 +143,9 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
* create the proc init entry via proc_init(). This routines assigns * create the proc init entry via proc_init(). This routines assigns
* minor numbers to secondary heads of multi-headed cards * minor numbers to secondary heads of multi-headed cards
*/ */
static int drm_get_head(drm_device_t * dev, drm_head_t * head) static int drm_get_head(struct drm_device * dev, struct drm_head * head)
{ {
drm_head_t **heads = drm_heads; struct drm_head **heads = drm_heads;
int ret; int ret;
int minor; int minor;
...@@ -154,7 +154,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head) ...@@ -154,7 +154,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head)
for (minor = 0; minor < drm_cards_limit; minor++, heads++) { for (minor = 0; minor < drm_cards_limit; minor++, heads++) {
if (!*heads) { if (!*heads) {
*head = (drm_head_t) { *head = (struct drm_head) {
.dev = dev,.device = .dev = dev,.device =
MKDEV(DRM_MAJOR, minor),.minor = minor,}; MKDEV(DRM_MAJOR, minor),.minor = minor,};
...@@ -184,7 +184,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head) ...@@ -184,7 +184,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head)
err_g2: err_g2:
drm_proc_cleanup(minor, drm_proc_root, head->dev_root); drm_proc_cleanup(minor, drm_proc_root, head->dev_root);
err_g1: err_g1:
*head = (drm_head_t) { *head = (struct drm_head) {
.dev = NULL}; .dev = NULL};
return ret; return ret;
} }
...@@ -203,7 +203,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head) ...@@ -203,7 +203,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head)
int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
struct drm_driver *driver) struct drm_driver *driver)
{ {
drm_device_t *dev; struct drm_device *dev;
int ret; int ret;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
...@@ -246,7 +246,7 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, ...@@ -246,7 +246,7 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
* "drm" data, otherwise unregisters the "drm" data, frees the dev list and * "drm" data, otherwise unregisters the "drm" data, frees the dev list and
* unregisters the character device. * unregisters the character device.
*/ */
int drm_put_dev(drm_device_t * dev) int drm_put_dev(struct drm_device * dev)
{ {
DRM_DEBUG("release primary %s\n", dev->driver->pci_driver.name); DRM_DEBUG("release primary %s\n", dev->driver->pci_driver.name);
...@@ -274,7 +274,7 @@ int drm_put_dev(drm_device_t * dev) ...@@ -274,7 +274,7 @@ int drm_put_dev(drm_device_t * dev)
* last minor released. * last minor released.
* *
*/ */
int drm_put_head(drm_head_t * head) int drm_put_head(struct drm_head * head)
{ {
int minor = head->minor; int minor = head->minor;
...@@ -283,7 +283,7 @@ int drm_put_head(drm_head_t * head) ...@@ -283,7 +283,7 @@ int drm_put_head(drm_head_t * head)
drm_proc_cleanup(minor, drm_proc_root, head->dev_root); drm_proc_cleanup(minor, drm_proc_root, head->dev_root);
drm_sysfs_device_remove(head->dev_class); drm_sysfs_device_remove(head->dev_class);
*head = (drm_head_t) {.dev = NULL}; *head = (struct drm_head) {.dev = NULL};
drm_heads[minor] = NULL; drm_heads[minor] = NULL;
......
...@@ -80,7 +80,7 @@ void drm_sysfs_destroy(struct class *class) ...@@ -80,7 +80,7 @@ void drm_sysfs_destroy(struct class *class)
static ssize_t show_dri(struct class_device *class_device, char *buf) static ssize_t show_dri(struct class_device *class_device, char *buf)
{ {
drm_device_t * dev = ((drm_head_t *)class_get_devdata(class_device))->dev; struct drm_device * dev = ((struct drm_head *)class_get_devdata(class_device))->dev;
if (dev->driver->dri_library_name) if (dev->driver->dri_library_name)
return dev->driver->dri_library_name(dev, buf); return dev->driver->dri_library_name(dev, buf);
return snprintf(buf, PAGE_SIZE, "%s\n", dev->driver->pci_driver.name); return snprintf(buf, PAGE_SIZE, "%s\n", dev->driver->pci_driver.name);
...@@ -104,7 +104,7 @@ static struct class_device_attribute class_device_attrs[] = { ...@@ -104,7 +104,7 @@ static struct class_device_attribute class_device_attrs[] = {
* Note: the struct class passed to this function must have previously been * Note: the struct class passed to this function must have previously been
* created with a call to drm_sysfs_create(). * created with a call to drm_sysfs_create().
*/ */
struct class_device *drm_sysfs_device_add(struct class *cs, drm_head_t *head) struct class_device *drm_sysfs_device_add(struct class *cs, struct drm_head *head)
{ {
struct class_device *class_dev; struct class_device *class_dev;
int i, j, err; int i, j, err;
......
...@@ -79,8 +79,8 @@ static pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_struct *vma) ...@@ -79,8 +79,8 @@ static pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_struct *vma)
static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma, static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
unsigned long address) unsigned long address)
{ {
drm_file_t *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
drm_device_t *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; drm_map_list_t *r_list;
drm_hash_item_t *hash; drm_hash_item_t *hash;
...@@ -194,8 +194,8 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma, ...@@ -194,8 +194,8 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma,
*/ */
static void drm_vm_shm_close(struct vm_area_struct *vma) static void drm_vm_shm_close(struct vm_area_struct *vma)
{ {
drm_file_t *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_vma_entry_t *pt, *temp; drm_vma_entry_t *pt, *temp;
struct drm_map *map; struct drm_map *map;
drm_map_list_t *r_list; drm_map_list_t *r_list;
...@@ -274,8 +274,8 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) ...@@ -274,8 +274,8 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
static __inline__ struct page *drm_do_vm_dma_nopage(struct vm_area_struct *vma, static __inline__ struct page *drm_do_vm_dma_nopage(struct vm_area_struct *vma,
unsigned long address) unsigned long address)
{ {
drm_file_t *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
unsigned long offset; unsigned long offset;
unsigned long page_nr; unsigned long page_nr;
...@@ -311,8 +311,8 @@ static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *vma, ...@@ -311,8 +311,8 @@ static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *vma,
unsigned long address) unsigned long address)
{ {
struct drm_map *map = (struct drm_map *) vma->vm_private_data; struct drm_map *map = (struct drm_map *) vma->vm_private_data;
drm_file_t *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_sg_mem_t *entry = dev->sg; drm_sg_mem_t *entry = dev->sg;
unsigned long offset; unsigned long offset;
unsigned long map_offset; unsigned long map_offset;
...@@ -405,8 +405,8 @@ static struct vm_operations_struct drm_vm_sg_ops = { ...@@ -405,8 +405,8 @@ static struct vm_operations_struct drm_vm_sg_ops = {
*/ */
static void drm_vm_open_locked(struct vm_area_struct *vma) static void drm_vm_open_locked(struct vm_area_struct *vma)
{ {
drm_file_t *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_vma_entry_t *vma_entry; drm_vma_entry_t *vma_entry;
DRM_DEBUG("0x%08lx,0x%08lx\n", DRM_DEBUG("0x%08lx,0x%08lx\n",
...@@ -423,8 +423,8 @@ static void drm_vm_open_locked(struct vm_area_struct *vma) ...@@ -423,8 +423,8 @@ static void drm_vm_open_locked(struct vm_area_struct *vma)
static void drm_vm_open(struct vm_area_struct *vma) static void drm_vm_open(struct vm_area_struct *vma)
{ {
drm_file_t *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
drm_vm_open_locked(vma); drm_vm_open_locked(vma);
...@@ -441,8 +441,8 @@ static void drm_vm_open(struct vm_area_struct *vma) ...@@ -441,8 +441,8 @@ static void drm_vm_open(struct vm_area_struct *vma)
*/ */
static void drm_vm_close(struct vm_area_struct *vma) static void drm_vm_close(struct vm_area_struct *vma)
{ {
drm_file_t *priv = vma->vm_file->private_data; struct drm_file *priv = vma->vm_file->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
drm_vma_entry_t *pt, *temp; drm_vma_entry_t *pt, *temp;
DRM_DEBUG("0x%08lx,0x%08lx\n", DRM_DEBUG("0x%08lx,0x%08lx\n",
...@@ -472,8 +472,8 @@ static void drm_vm_close(struct vm_area_struct *vma) ...@@ -472,8 +472,8 @@ static void drm_vm_close(struct vm_area_struct *vma)
*/ */
static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev; struct drm_device *dev;
drm_device_dma_t *dma; drm_device_dma_t *dma;
unsigned long length = vma->vm_end - vma->vm_start; unsigned long length = vma->vm_end - vma->vm_start;
...@@ -545,8 +545,8 @@ EXPORT_SYMBOL(drm_core_get_reg_ofs); ...@@ -545,8 +545,8 @@ EXPORT_SYMBOL(drm_core_get_reg_ofs);
*/ */
static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
struct drm_map *map = NULL; struct drm_map *map = NULL;
unsigned long offset = 0; unsigned long offset = 0;
drm_hash_item_t *hash; drm_hash_item_t *hash;
...@@ -663,8 +663,8 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) ...@@ -663,8 +663,8 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
int drm_mmap(struct file *filp, struct vm_area_struct *vma) int drm_mmap(struct file *filp, struct vm_area_struct *vma)
{ {
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
drm_device_t *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
int ret; int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
* the head pointer changes, so that EBUSY only happens if the ring * the head pointer changes, so that EBUSY only happens if the ring
* actually stalls for (eg) 3 seconds. * actually stalls for (eg) 3 seconds.
*/ */
int i915_wait_ring(drm_device_t * dev, int n, const char *caller) int i915_wait_ring(struct drm_device * dev, int n, const char *caller)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
drm_i915_ring_buffer_t *ring = &(dev_priv->ring); drm_i915_ring_buffer_t *ring = &(dev_priv->ring);
...@@ -73,7 +73,7 @@ int i915_wait_ring(drm_device_t * dev, int n, const char *caller) ...@@ -73,7 +73,7 @@ int i915_wait_ring(drm_device_t * dev, int n, const char *caller)
return DRM_ERR(EBUSY); return DRM_ERR(EBUSY);
} }
void i915_kernel_lost_context(drm_device_t * dev) void i915_kernel_lost_context(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
drm_i915_ring_buffer_t *ring = &(dev_priv->ring); drm_i915_ring_buffer_t *ring = &(dev_priv->ring);
...@@ -88,7 +88,7 @@ void i915_kernel_lost_context(drm_device_t * dev) ...@@ -88,7 +88,7 @@ void i915_kernel_lost_context(drm_device_t * dev)
dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY; dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY;
} }
static int i915_dma_cleanup(drm_device_t * dev) static int i915_dma_cleanup(struct drm_device * dev)
{ {
/* Make sure interrupts are disabled here because the uninstall ioctl /* Make sure interrupts are disabled here because the uninstall ioctl
* may not have been called from userspace and after dev_private * may not have been called from userspace and after dev_private
...@@ -126,7 +126,7 @@ static int i915_dma_cleanup(drm_device_t * dev) ...@@ -126,7 +126,7 @@ static int i915_dma_cleanup(drm_device_t * dev)
return 0; return 0;
} }
static int i915_initialize(drm_device_t * dev, static int i915_initialize(struct drm_device * dev,
drm_i915_private_t * dev_priv, drm_i915_private_t * dev_priv,
drm_i915_init_t * init) drm_i915_init_t * init)
{ {
...@@ -211,7 +211,7 @@ static int i915_initialize(drm_device_t * dev, ...@@ -211,7 +211,7 @@ static int i915_initialize(drm_device_t * dev,
return 0; return 0;
} }
static int i915_dma_resume(drm_device_t * dev) static int i915_dma_resume(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
...@@ -357,7 +357,7 @@ static int validate_cmd(int cmd) ...@@ -357,7 +357,7 @@ static int validate_cmd(int cmd)
return ret; return ret;
} }
static int i915_emit_cmds(drm_device_t * dev, int __user * buffer, int dwords) static int i915_emit_cmds(struct drm_device * dev, int __user * buffer, int dwords)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
int i; int i;
...@@ -396,7 +396,7 @@ static int i915_emit_cmds(drm_device_t * dev, int __user * buffer, int dwords) ...@@ -396,7 +396,7 @@ static int i915_emit_cmds(drm_device_t * dev, int __user * buffer, int dwords)
return 0; return 0;
} }
static int i915_emit_box(drm_device_t * dev, static int i915_emit_box(struct drm_device * dev,
struct drm_clip_rect __user * boxes, struct drm_clip_rect __user * boxes,
int i, int DR1, int DR4) int i, int DR1, int DR4)
{ {
...@@ -439,7 +439,7 @@ static int i915_emit_box(drm_device_t * dev, ...@@ -439,7 +439,7 @@ static int i915_emit_box(drm_device_t * dev,
* emit. For now, do it in both places: * emit. For now, do it in both places:
*/ */
static void i915_emit_breadcrumb(drm_device_t *dev) static void i915_emit_breadcrumb(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
...@@ -457,7 +457,7 @@ static void i915_emit_breadcrumb(drm_device_t *dev) ...@@ -457,7 +457,7 @@ static void i915_emit_breadcrumb(drm_device_t *dev)
ADVANCE_LP_RING(); ADVANCE_LP_RING();
} }
static int i915_dispatch_cmdbuffer(drm_device_t * dev, static int i915_dispatch_cmdbuffer(struct drm_device * dev,
drm_i915_cmdbuffer_t * cmd) drm_i915_cmdbuffer_t * cmd)
{ {
int nbox = cmd->num_cliprects; int nbox = cmd->num_cliprects;
...@@ -489,7 +489,7 @@ static int i915_dispatch_cmdbuffer(drm_device_t * dev, ...@@ -489,7 +489,7 @@ static int i915_dispatch_cmdbuffer(drm_device_t * dev,
return 0; return 0;
} }
static int i915_dispatch_batchbuffer(drm_device_t * dev, static int i915_dispatch_batchbuffer(struct drm_device * dev,
drm_i915_batchbuffer_t * batch) drm_i915_batchbuffer_t * batch)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
...@@ -535,7 +535,7 @@ static int i915_dispatch_batchbuffer(drm_device_t * dev, ...@@ -535,7 +535,7 @@ static int i915_dispatch_batchbuffer(drm_device_t * dev,
return 0; return 0;
} }
static int i915_dispatch_flip(drm_device_t * dev) static int i915_dispatch_flip(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
...@@ -583,7 +583,7 @@ static int i915_dispatch_flip(drm_device_t * dev) ...@@ -583,7 +583,7 @@ static int i915_dispatch_flip(drm_device_t * dev)
return 0; return 0;
} }
static int i915_quiescent(drm_device_t * dev) static int i915_quiescent(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
...@@ -792,7 +792,7 @@ static int i915_set_status_page(DRM_IOCTL_ARGS) ...@@ -792,7 +792,7 @@ static int i915_set_status_page(DRM_IOCTL_ARGS)
return 0; return 0;
} }
int i915_driver_load(drm_device_t *dev, unsigned long flags) int i915_driver_load(struct drm_device *dev, unsigned long flags)
{ {
/* i915 has 4 more counters */ /* i915 has 4 more counters */
dev->counters += 4; dev->counters += 4;
...@@ -804,7 +804,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags) ...@@ -804,7 +804,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
return 0; return 0;
} }
void i915_driver_lastclose(drm_device_t * dev) void i915_driver_lastclose(struct drm_device * dev)
{ {
if (dev->dev_private) { if (dev->dev_private) {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
...@@ -813,7 +813,7 @@ void i915_driver_lastclose(drm_device_t * dev) ...@@ -813,7 +813,7 @@ void i915_driver_lastclose(drm_device_t * dev)
i915_dma_cleanup(dev); i915_dma_cleanup(dev);
} }
void i915_driver_preclose(drm_device_t * dev, DRMFILE filp) void i915_driver_preclose(struct drm_device * dev, DRMFILE filp)
{ {
if (dev->dev_private) { if (dev->dev_private) {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
...@@ -854,7 +854,7 @@ int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); ...@@ -854,7 +854,7 @@ int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
* \returns * \returns
* A value of 1 is always retured to indictate every i9x5 is AGP. * A value of 1 is always retured to indictate every i9x5 is AGP.
*/ */
int i915_driver_device_is_agp(drm_device_t * dev) int i915_driver_device_is_agp(struct drm_device * dev)
{ {
return 1; return 1;
} }
...@@ -120,11 +120,11 @@ extern drm_ioctl_desc_t i915_ioctls[]; ...@@ -120,11 +120,11 @@ extern drm_ioctl_desc_t i915_ioctls[];
extern int i915_max_ioctl; extern int i915_max_ioctl;
/* i915_dma.c */ /* i915_dma.c */
extern void i915_kernel_lost_context(drm_device_t * dev); extern void i915_kernel_lost_context(struct drm_device * dev);
extern int i915_driver_load(struct drm_device *, unsigned long flags); extern int i915_driver_load(struct drm_device *, unsigned long flags);
extern void i915_driver_lastclose(drm_device_t * dev); extern void i915_driver_lastclose(struct drm_device * dev);
extern void i915_driver_preclose(drm_device_t * dev, DRMFILE filp); extern void i915_driver_preclose(struct drm_device * dev, DRMFILE filp);
extern int i915_driver_device_is_agp(drm_device_t * dev); extern int i915_driver_device_is_agp(struct drm_device * dev);
extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg); unsigned long arg);
...@@ -132,12 +132,12 @@ extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, ...@@ -132,12 +132,12 @@ extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
extern int i915_irq_emit(DRM_IOCTL_ARGS); extern int i915_irq_emit(DRM_IOCTL_ARGS);
extern int i915_irq_wait(DRM_IOCTL_ARGS); extern int i915_irq_wait(DRM_IOCTL_ARGS);
extern int i915_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence); extern int i915_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence);
extern int i915_driver_vblank_wait2(drm_device_t *dev, unsigned int *sequence); extern int i915_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence);
extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS);
extern void i915_driver_irq_preinstall(drm_device_t * dev); extern void i915_driver_irq_preinstall(struct drm_device * dev);
extern void i915_driver_irq_postinstall(drm_device_t * dev); extern void i915_driver_irq_postinstall(struct drm_device * dev);
extern void i915_driver_irq_uninstall(drm_device_t * dev); extern void i915_driver_irq_uninstall(struct drm_device * dev);
extern int i915_vblank_pipe_set(DRM_IOCTL_ARGS); extern int i915_vblank_pipe_set(DRM_IOCTL_ARGS);
extern int i915_vblank_pipe_get(DRM_IOCTL_ARGS); extern int i915_vblank_pipe_get(DRM_IOCTL_ARGS);
extern int i915_vblank_swap(DRM_IOCTL_ARGS); extern int i915_vblank_swap(DRM_IOCTL_ARGS);
...@@ -148,7 +148,7 @@ extern int i915_mem_free(DRM_IOCTL_ARGS); ...@@ -148,7 +148,7 @@ extern int i915_mem_free(DRM_IOCTL_ARGS);
extern int i915_mem_init_heap(DRM_IOCTL_ARGS); extern int i915_mem_init_heap(DRM_IOCTL_ARGS);
extern int i915_mem_destroy_heap(DRM_IOCTL_ARGS); extern int i915_mem_destroy_heap(DRM_IOCTL_ARGS);
extern void i915_mem_takedown(struct mem_block **heap); extern void i915_mem_takedown(struct mem_block **heap);
extern void i915_mem_release(drm_device_t * dev, extern void i915_mem_release(struct drm_device * dev,
DRMFILE filp, struct mem_block *heap); DRMFILE filp, struct mem_block *heap);
#define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, (reg)) #define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, (reg))
...@@ -188,7 +188,7 @@ extern void i915_mem_release(drm_device_t * dev, ...@@ -188,7 +188,7 @@ extern void i915_mem_release(drm_device_t * dev,
I915_WRITE(LP_RING + RING_TAIL, outring); \ I915_WRITE(LP_RING + RING_TAIL, outring); \
} while(0) } while(0)
extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23)) #define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23))
#define GFX_OP_BREAKPOINT_INTERRUPT ((0<<29)|(1<<23)) #define GFX_OP_BREAKPOINT_INTERRUPT ((0<<29)|(1<<23))
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
* *
* This function will be called with the HW lock held. * This function will be called with the HW lock held.
*/ */
static void i915_vblank_tasklet(drm_device_t *dev) static void i915_vblank_tasklet(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
...@@ -211,7 +211,7 @@ static void i915_vblank_tasklet(drm_device_t *dev) ...@@ -211,7 +211,7 @@ static void i915_vblank_tasklet(drm_device_t *dev)
irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
{ {
drm_device_t *dev = (drm_device_t *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
u16 temp; u16 temp;
...@@ -257,7 +257,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) ...@@ -257,7 +257,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int i915_emit_irq(drm_device_t * dev) static int i915_emit_irq(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
...@@ -283,7 +283,7 @@ static int i915_emit_irq(drm_device_t * dev) ...@@ -283,7 +283,7 @@ static int i915_emit_irq(drm_device_t * dev)
return dev_priv->counter; return dev_priv->counter;
} }
static int i915_wait_irq(drm_device_t * dev, int irq_nr) static int i915_wait_irq(struct drm_device * dev, int irq_nr)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
int ret = 0; int ret = 0;
...@@ -309,7 +309,7 @@ static int i915_wait_irq(drm_device_t * dev, int irq_nr) ...@@ -309,7 +309,7 @@ static int i915_wait_irq(drm_device_t * dev, int irq_nr)
return ret; return ret;
} }
static int i915_driver_vblank_do_wait(drm_device_t *dev, unsigned int *sequence, static int i915_driver_vblank_do_wait(struct drm_device *dev, unsigned int *sequence,
atomic_t *counter) atomic_t *counter)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
...@@ -331,12 +331,12 @@ static int i915_driver_vblank_do_wait(drm_device_t *dev, unsigned int *sequence, ...@@ -331,12 +331,12 @@ static int i915_driver_vblank_do_wait(drm_device_t *dev, unsigned int *sequence,
} }
int i915_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence) int i915_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence)
{ {
return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received); return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received);
} }
int i915_driver_vblank_wait2(drm_device_t *dev, unsigned int *sequence) int i915_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence)
{ {
return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received2); return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received2);
} }
...@@ -389,7 +389,7 @@ int i915_irq_wait(DRM_IOCTL_ARGS) ...@@ -389,7 +389,7 @@ int i915_irq_wait(DRM_IOCTL_ARGS)
return i915_wait_irq(dev, irqwait.irq_seq); return i915_wait_irq(dev, irqwait.irq_seq);
} }
static void i915_enable_interrupt (drm_device_t *dev) static void i915_enable_interrupt (struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
u16 flag; u16 flag;
...@@ -569,7 +569,7 @@ int i915_vblank_swap(DRM_IOCTL_ARGS) ...@@ -569,7 +569,7 @@ int i915_vblank_swap(DRM_IOCTL_ARGS)
/* drm_dma.h hooks /* drm_dma.h hooks
*/ */
void i915_driver_irq_preinstall(drm_device_t * dev) void i915_driver_irq_preinstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
...@@ -578,7 +578,7 @@ void i915_driver_irq_preinstall(drm_device_t * dev) ...@@ -578,7 +578,7 @@ void i915_driver_irq_preinstall(drm_device_t * dev)
I915_WRITE16(I915REG_INT_ENABLE_R, 0x0); I915_WRITE16(I915REG_INT_ENABLE_R, 0x0);
} }
void i915_driver_irq_postinstall(drm_device_t * dev) void i915_driver_irq_postinstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
...@@ -592,7 +592,7 @@ void i915_driver_irq_postinstall(drm_device_t * dev) ...@@ -592,7 +592,7 @@ void i915_driver_irq_postinstall(drm_device_t * dev)
DRM_INIT_WAITQUEUE(&dev_priv->irq_queue); DRM_INIT_WAITQUEUE(&dev_priv->irq_queue);
} }
void i915_driver_irq_uninstall(drm_device_t * dev) void i915_driver_irq_uninstall(struct drm_device * dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
u16 temp; u16 temp;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
* block to allocate, and the ring is drained prior to allocations -- * block to allocate, and the ring is drained prior to allocations --
* in other words allocation is expensive. * in other words allocation is expensive.
*/ */
static void mark_block(drm_device_t * dev, struct mem_block *p, int in_use) static void mark_block(struct drm_device * dev, struct mem_block *p, int in_use)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
drm_i915_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_i915_sarea_t *sarea_priv = dev_priv->sarea_priv;
...@@ -208,7 +208,7 @@ static int init_heap(struct mem_block **heap, int start, int size) ...@@ -208,7 +208,7 @@ static int init_heap(struct mem_block **heap, int start, int size)
/* Free all blocks associated with the releasing file. /* Free all blocks associated with the releasing file.
*/ */
void i915_mem_release(drm_device_t * dev, DRMFILE filp, struct mem_block *heap) void i915_mem_release(struct drm_device * dev, DRMFILE filp, struct mem_block *heap)
{ {
struct mem_block *p; struct mem_block *p;
......
...@@ -706,7 +706,7 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv) ...@@ -706,7 +706,7 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv)
* The actual age emit is done by r300_do_cp_cmdbuf, which is why you must * The actual age emit is done by r300_do_cp_cmdbuf, which is why you must
* be careful about how this function is called. * be careful about how this function is called.
*/ */
static void r300_discard_buffer(drm_device_t * dev, drm_buf_t * buf) static void r300_discard_buffer(struct drm_device * dev, drm_buf_t * buf)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_buf_priv_t *buf_priv = buf->dev_private; drm_radeon_buf_priv_t *buf_priv = buf->dev_private;
...@@ -779,9 +779,9 @@ static int r300_scratch(drm_radeon_private_t *dev_priv, ...@@ -779,9 +779,9 @@ static int r300_scratch(drm_radeon_private_t *dev_priv,
* commands on the DMA ring buffer. * commands on the DMA ring buffer.
* Called by the ioctl handler function radeon_cp_cmdbuf. * Called by the ioctl handler function radeon_cp_cmdbuf.
*/ */
int r300_do_cp_cmdbuf(drm_device_t *dev, int r300_do_cp_cmdbuf(struct drm_device *dev,
DRMFILE filp, DRMFILE filp,
drm_file_t *filp_priv, struct drm_file *filp_priv,
drm_radeon_kcmd_buffer_t *cmdbuf) drm_radeon_kcmd_buffer_t *cmdbuf)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define RADEON_FIFO_DEBUG 0 #define RADEON_FIFO_DEBUG 0
static int radeon_do_cleanup_cp(drm_device_t * dev); static int radeon_do_cleanup_cp(struct drm_device * dev);
/* CP microcode (from ATI) */ /* CP microcode (from ATI) */
static const u32 R200_cp_microcode[][2] = { static const u32 R200_cp_microcode[][2] = {
...@@ -816,7 +816,7 @@ static const u32 R300_cp_microcode[][2] = { ...@@ -816,7 +816,7 @@ static const u32 R300_cp_microcode[][2] = {
{0000000000, 0000000000}, {0000000000, 0000000000},
}; };
static int RADEON_READ_PLL(drm_device_t * dev, int addr) static int RADEON_READ_PLL(struct drm_device * dev, int addr)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -1066,7 +1066,7 @@ static void radeon_do_cp_stop(drm_radeon_private_t * dev_priv) ...@@ -1066,7 +1066,7 @@ static void radeon_do_cp_stop(drm_radeon_private_t * dev_priv)
/* Reset the engine. This will stop the CP if it is running. /* Reset the engine. This will stop the CP if it is running.
*/ */
static int radeon_do_engine_reset(drm_device_t * dev) static int radeon_do_engine_reset(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
u32 clock_cntl_index, mclk_cntl, rbbm_soft_reset; u32 clock_cntl_index, mclk_cntl, rbbm_soft_reset;
...@@ -1122,7 +1122,7 @@ static int radeon_do_engine_reset(drm_device_t * dev) ...@@ -1122,7 +1122,7 @@ static int radeon_do_engine_reset(drm_device_t * dev)
return 0; return 0;
} }
static void radeon_cp_init_ring_buffer(drm_device_t * dev, static void radeon_cp_init_ring_buffer(struct drm_device * dev,
drm_radeon_private_t * dev_priv) drm_radeon_private_t * dev_priv)
{ {
u32 ring_start, cur_read_ptr; u32 ring_start, cur_read_ptr;
...@@ -1384,7 +1384,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on) ...@@ -1384,7 +1384,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)
} }
} }
static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -1735,7 +1735,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) ...@@ -1735,7 +1735,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
return 0; return 0;
} }
static int radeon_do_cleanup_cp(drm_device_t * dev) static int radeon_do_cleanup_cp(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
...@@ -1791,7 +1791,7 @@ static int radeon_do_cleanup_cp(drm_device_t * dev) ...@@ -1791,7 +1791,7 @@ static int radeon_do_cleanup_cp(drm_device_t * dev)
* *
* Charl P. Botha <http://cpbotha.net> * Charl P. Botha <http://cpbotha.net>
*/ */
static int radeon_do_resume_cp(drm_device_t * dev) static int radeon_do_resume_cp(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -1918,7 +1918,7 @@ int radeon_cp_stop(DRM_IOCTL_ARGS) ...@@ -1918,7 +1918,7 @@ int radeon_cp_stop(DRM_IOCTL_ARGS)
return 0; return 0;
} }
void radeon_do_release(drm_device_t * dev) void radeon_do_release(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
int i, ret; int i, ret;
...@@ -2046,7 +2046,7 @@ int radeon_fullscreen(DRM_IOCTL_ARGS) ...@@ -2046,7 +2046,7 @@ int radeon_fullscreen(DRM_IOCTL_ARGS)
* they can't get the lock. * they can't get the lock.
*/ */
drm_buf_t *radeon_freelist_get(drm_device_t * dev) drm_buf_t *radeon_freelist_get(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -2086,7 +2086,7 @@ drm_buf_t *radeon_freelist_get(drm_device_t * dev) ...@@ -2086,7 +2086,7 @@ drm_buf_t *radeon_freelist_get(drm_device_t * dev)
} }
#if 0 #if 0
drm_buf_t *radeon_freelist_get(drm_device_t * dev) drm_buf_t *radeon_freelist_get(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -2120,7 +2120,7 @@ drm_buf_t *radeon_freelist_get(drm_device_t * dev) ...@@ -2120,7 +2120,7 @@ drm_buf_t *radeon_freelist_get(drm_device_t * dev)
} }
#endif #endif
void radeon_freelist_reset(drm_device_t * dev) void radeon_freelist_reset(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -2170,7 +2170,7 @@ int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n) ...@@ -2170,7 +2170,7 @@ int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n)
return DRM_ERR(EBUSY); return DRM_ERR(EBUSY);
} }
static int radeon_cp_get_buffers(DRMFILE filp, drm_device_t * dev, static int radeon_cp_get_buffers(DRMFILE filp, struct drm_device * dev,
struct drm_dma * d) struct drm_dma * d)
{ {
int i; int i;
......
...@@ -336,8 +336,8 @@ extern int radeon_engine_reset(DRM_IOCTL_ARGS); ...@@ -336,8 +336,8 @@ extern int radeon_engine_reset(DRM_IOCTL_ARGS);
extern int radeon_fullscreen(DRM_IOCTL_ARGS); extern int radeon_fullscreen(DRM_IOCTL_ARGS);
extern int radeon_cp_buffers(DRM_IOCTL_ARGS); extern int radeon_cp_buffers(DRM_IOCTL_ARGS);
extern void radeon_freelist_reset(drm_device_t * dev); extern void radeon_freelist_reset(struct drm_device * dev);
extern drm_buf_t *radeon_freelist_get(drm_device_t * dev); extern drm_buf_t *radeon_freelist_get(struct drm_device * dev);
extern int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n); extern int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n);
...@@ -357,33 +357,33 @@ extern void radeon_mem_release(DRMFILE filp, struct mem_block *heap); ...@@ -357,33 +357,33 @@ extern void radeon_mem_release(DRMFILE filp, struct mem_block *heap);
extern int radeon_irq_emit(DRM_IOCTL_ARGS); extern int radeon_irq_emit(DRM_IOCTL_ARGS);
extern int radeon_irq_wait(DRM_IOCTL_ARGS); extern int radeon_irq_wait(DRM_IOCTL_ARGS);
extern void radeon_do_release(drm_device_t * dev); extern void radeon_do_release(struct drm_device * dev);
extern int radeon_driver_vblank_wait(drm_device_t * dev, extern int radeon_driver_vblank_wait(struct drm_device * dev,
unsigned int *sequence); unsigned int *sequence);
extern int radeon_driver_vblank_wait2(drm_device_t * dev, extern int radeon_driver_vblank_wait2(struct drm_device * dev,
unsigned int *sequence); unsigned int *sequence);
extern irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS); extern irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS);
extern void radeon_driver_irq_preinstall(drm_device_t * dev); extern void radeon_driver_irq_preinstall(struct drm_device * dev);
extern void radeon_driver_irq_postinstall(drm_device_t * dev); extern void radeon_driver_irq_postinstall(struct drm_device * dev);
extern void radeon_driver_irq_uninstall(drm_device_t * dev); extern void radeon_driver_irq_uninstall(struct drm_device * dev);
extern int radeon_vblank_crtc_get(drm_device_t *dev); extern int radeon_vblank_crtc_get(struct drm_device *dev);
extern int radeon_vblank_crtc_set(drm_device_t *dev, int64_t value); extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value);
extern int radeon_driver_load(struct drm_device *dev, unsigned long flags); extern int radeon_driver_load(struct drm_device *dev, unsigned long flags);
extern int radeon_driver_unload(struct drm_device *dev); extern int radeon_driver_unload(struct drm_device *dev);
extern int radeon_driver_firstopen(struct drm_device *dev); extern int radeon_driver_firstopen(struct drm_device *dev);
extern void radeon_driver_preclose(drm_device_t * dev, DRMFILE filp); extern void radeon_driver_preclose(struct drm_device * dev, DRMFILE filp);
extern void radeon_driver_postclose(drm_device_t * dev, drm_file_t * filp); extern void radeon_driver_postclose(struct drm_device * dev, struct drm_file * filp);
extern void radeon_driver_lastclose(drm_device_t * dev); extern void radeon_driver_lastclose(struct drm_device * dev);
extern int radeon_driver_open(drm_device_t * dev, drm_file_t * filp_priv); extern int radeon_driver_open(struct drm_device * dev, struct drm_file * filp_priv);
extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg); unsigned long arg);
/* r300_cmdbuf.c */ /* r300_cmdbuf.c */
extern void r300_init_reg_flags(void); extern void r300_init_reg_flags(void);
extern int r300_do_cp_cmdbuf(drm_device_t * dev, DRMFILE filp, extern int r300_do_cp_cmdbuf(struct drm_device * dev, DRMFILE filp,
drm_file_t * filp_priv, struct drm_file * filp_priv,
drm_radeon_kcmd_buffer_t * cmdbuf); drm_radeon_kcmd_buffer_t * cmdbuf);
/* Flags for stats.boxes /* Flags for stats.boxes
......
...@@ -64,7 +64,7 @@ static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t * dev_priv, ...@@ -64,7 +64,7 @@ static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t * dev_priv,
irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS) irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS)
{ {
drm_device_t *dev = (drm_device_t *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_radeon_private_t *dev_priv = drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private; (drm_radeon_private_t *) dev->dev_private;
u32 stat; u32 stat;
...@@ -109,7 +109,7 @@ irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS) ...@@ -109,7 +109,7 @@ irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int radeon_emit_irq(drm_device_t * dev) static int radeon_emit_irq(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
unsigned int ret; unsigned int ret;
...@@ -127,7 +127,7 @@ static int radeon_emit_irq(drm_device_t * dev) ...@@ -127,7 +127,7 @@ static int radeon_emit_irq(drm_device_t * dev)
return ret; return ret;
} }
static int radeon_wait_irq(drm_device_t * dev, int swi_nr) static int radeon_wait_irq(struct drm_device * dev, int swi_nr)
{ {
drm_radeon_private_t *dev_priv = drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private; (drm_radeon_private_t *) dev->dev_private;
...@@ -144,7 +144,7 @@ static int radeon_wait_irq(drm_device_t * dev, int swi_nr) ...@@ -144,7 +144,7 @@ static int radeon_wait_irq(drm_device_t * dev, int swi_nr)
return ret; return ret;
} }
int radeon_driver_vblank_do_wait(drm_device_t * dev, unsigned int *sequence, int radeon_driver_vblank_do_wait(struct drm_device * dev, unsigned int *sequence,
int crtc) int crtc)
{ {
drm_radeon_private_t *dev_priv = drm_radeon_private_t *dev_priv =
...@@ -184,12 +184,12 @@ int radeon_driver_vblank_do_wait(drm_device_t * dev, unsigned int *sequence, ...@@ -184,12 +184,12 @@ int radeon_driver_vblank_do_wait(drm_device_t * dev, unsigned int *sequence,
return ret; return ret;
} }
int radeon_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence) int radeon_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence)
{ {
return radeon_driver_vblank_do_wait(dev, sequence, DRM_RADEON_VBLANK_CRTC1); return radeon_driver_vblank_do_wait(dev, sequence, DRM_RADEON_VBLANK_CRTC1);
} }
int radeon_driver_vblank_wait2(drm_device_t *dev, unsigned int *sequence) int radeon_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence)
{ {
return radeon_driver_vblank_do_wait(dev, sequence, DRM_RADEON_VBLANK_CRTC2); return radeon_driver_vblank_do_wait(dev, sequence, DRM_RADEON_VBLANK_CRTC2);
} }
...@@ -242,7 +242,7 @@ int radeon_irq_wait(DRM_IOCTL_ARGS) ...@@ -242,7 +242,7 @@ int radeon_irq_wait(DRM_IOCTL_ARGS)
return radeon_wait_irq(dev, irqwait.irq_seq); return radeon_wait_irq(dev, irqwait.irq_seq);
} }
static void radeon_enable_interrupt(drm_device_t *dev) static void radeon_enable_interrupt(struct drm_device *dev)
{ {
drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;
...@@ -259,7 +259,7 @@ static void radeon_enable_interrupt(drm_device_t *dev) ...@@ -259,7 +259,7 @@ static void radeon_enable_interrupt(drm_device_t *dev)
/* drm_dma.h hooks /* drm_dma.h hooks
*/ */
void radeon_driver_irq_preinstall(drm_device_t * dev) void radeon_driver_irq_preinstall(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private; (drm_radeon_private_t *) dev->dev_private;
...@@ -273,7 +273,7 @@ void radeon_driver_irq_preinstall(drm_device_t * dev) ...@@ -273,7 +273,7 @@ void radeon_driver_irq_preinstall(drm_device_t * dev)
RADEON_CRTC2_VBLANK_STAT)); RADEON_CRTC2_VBLANK_STAT));
} }
void radeon_driver_irq_postinstall(drm_device_t * dev) void radeon_driver_irq_postinstall(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private; (drm_radeon_private_t *) dev->dev_private;
...@@ -284,7 +284,7 @@ void radeon_driver_irq_postinstall(drm_device_t * dev) ...@@ -284,7 +284,7 @@ void radeon_driver_irq_postinstall(drm_device_t * dev)
radeon_enable_interrupt(dev); radeon_enable_interrupt(dev);
} }
void radeon_driver_irq_uninstall(drm_device_t * dev) void radeon_driver_irq_uninstall(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private; (drm_radeon_private_t *) dev->dev_private;
...@@ -298,7 +298,7 @@ void radeon_driver_irq_uninstall(drm_device_t * dev) ...@@ -298,7 +298,7 @@ void radeon_driver_irq_uninstall(drm_device_t * dev)
} }
int radeon_vblank_crtc_get(drm_device_t *dev) int radeon_vblank_crtc_get(struct drm_device *dev)
{ {
drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;
u32 flag; u32 flag;
...@@ -315,7 +315,7 @@ int radeon_vblank_crtc_get(drm_device_t *dev) ...@@ -315,7 +315,7 @@ int radeon_vblank_crtc_get(drm_device_t *dev)
return value; return value;
} }
int radeon_vblank_crtc_set(drm_device_t *dev, int64_t value) int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value)
{ {
drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;
if (value & ~(DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2)) { if (value & ~(DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2)) {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t * static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t *
dev_priv, dev_priv,
drm_file_t * filp_priv, struct drm_file * filp_priv,
u32 *offset) u32 *offset)
{ {
u64 off = *offset; u64 off = *offset;
...@@ -90,7 +90,7 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t * ...@@ -90,7 +90,7 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t *
static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t *
dev_priv, dev_priv,
drm_file_t * filp_priv, struct drm_file * filp_priv,
int id, u32 *data) int id, u32 *data)
{ {
switch (id) { switch (id) {
...@@ -264,7 +264,7 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * ...@@ -264,7 +264,7 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t *
static __inline__ int radeon_check_and_fixup_packet3(drm_radeon_private_t * static __inline__ int radeon_check_and_fixup_packet3(drm_radeon_private_t *
dev_priv, dev_priv,
drm_file_t *filp_priv, struct drm_file *filp_priv,
drm_radeon_kcmd_buffer_t * drm_radeon_kcmd_buffer_t *
cmdbuf, cmdbuf,
unsigned int *cmdsz) unsigned int *cmdsz)
...@@ -439,7 +439,7 @@ static __inline__ void radeon_emit_clip_rect(drm_radeon_private_t * dev_priv, ...@@ -439,7 +439,7 @@ static __inline__ void radeon_emit_clip_rect(drm_radeon_private_t * dev_priv,
/* Emit 1.1 state /* Emit 1.1 state
*/ */
static int radeon_emit_state(drm_radeon_private_t * dev_priv, static int radeon_emit_state(drm_radeon_private_t * dev_priv,
drm_file_t * filp_priv, struct drm_file * filp_priv,
drm_radeon_context_regs_t * ctx, drm_radeon_context_regs_t * ctx,
drm_radeon_texture_regs_t * tex, drm_radeon_texture_regs_t * tex,
unsigned int dirty) unsigned int dirty)
...@@ -608,7 +608,7 @@ static int radeon_emit_state(drm_radeon_private_t * dev_priv, ...@@ -608,7 +608,7 @@ static int radeon_emit_state(drm_radeon_private_t * dev_priv,
/* Emit 1.2 state /* Emit 1.2 state
*/ */
static int radeon_emit_state2(drm_radeon_private_t * dev_priv, static int radeon_emit_state2(drm_radeon_private_t * dev_priv,
drm_file_t * filp_priv, struct drm_file * filp_priv,
drm_radeon_state_t * state) drm_radeon_state_t * state)
{ {
RING_LOCALS; RING_LOCALS;
...@@ -844,7 +844,7 @@ static void radeon_cp_performance_boxes(drm_radeon_private_t * dev_priv) ...@@ -844,7 +844,7 @@ static void radeon_cp_performance_boxes(drm_radeon_private_t * dev_priv)
* CP command dispatch functions * CP command dispatch functions
*/ */
static void radeon_cp_dispatch_clear(drm_device_t * dev, static void radeon_cp_dispatch_clear(struct drm_device * dev,
drm_radeon_clear_t * clear, drm_radeon_clear_t * clear,
drm_radeon_clear_rect_t * depth_boxes) drm_radeon_clear_rect_t * depth_boxes)
{ {
...@@ -1335,7 +1335,7 @@ static void radeon_cp_dispatch_clear(drm_device_t * dev, ...@@ -1335,7 +1335,7 @@ static void radeon_cp_dispatch_clear(drm_device_t * dev,
ADVANCE_RING(); ADVANCE_RING();
} }
static void radeon_cp_dispatch_swap(drm_device_t * dev) static void radeon_cp_dispatch_swap(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
...@@ -1412,7 +1412,7 @@ static void radeon_cp_dispatch_swap(drm_device_t * dev) ...@@ -1412,7 +1412,7 @@ static void radeon_cp_dispatch_swap(drm_device_t * dev)
ADVANCE_RING(); ADVANCE_RING();
} }
static void radeon_cp_dispatch_flip(drm_device_t * dev) static void radeon_cp_dispatch_flip(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_sarea_t *sarea = (drm_sarea_t *) dev_priv->sarea->handle; drm_sarea_t *sarea = (drm_sarea_t *) dev_priv->sarea->handle;
...@@ -1491,7 +1491,7 @@ typedef struct { ...@@ -1491,7 +1491,7 @@ typedef struct {
unsigned int vc_format; unsigned int vc_format;
} drm_radeon_tcl_prim_t; } drm_radeon_tcl_prim_t;
static void radeon_cp_dispatch_vertex(drm_device_t * dev, static void radeon_cp_dispatch_vertex(struct drm_device * dev,
drm_buf_t * buf, drm_buf_t * buf,
drm_radeon_tcl_prim_t * prim) drm_radeon_tcl_prim_t * prim)
{ {
...@@ -1537,7 +1537,7 @@ static void radeon_cp_dispatch_vertex(drm_device_t * dev, ...@@ -1537,7 +1537,7 @@ static void radeon_cp_dispatch_vertex(drm_device_t * dev,
} while (i < nbox); } while (i < nbox);
} }
static void radeon_cp_discard_buffer(drm_device_t * dev, drm_buf_t * buf) static void radeon_cp_discard_buffer(struct drm_device * dev, drm_buf_t * buf)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_buf_priv_t *buf_priv = buf->dev_private; drm_radeon_buf_priv_t *buf_priv = buf->dev_private;
...@@ -1554,7 +1554,7 @@ static void radeon_cp_discard_buffer(drm_device_t * dev, drm_buf_t * buf) ...@@ -1554,7 +1554,7 @@ static void radeon_cp_discard_buffer(drm_device_t * dev, drm_buf_t * buf)
buf->used = 0; buf->used = 0;
} }
static void radeon_cp_dispatch_indirect(drm_device_t * dev, static void radeon_cp_dispatch_indirect(struct drm_device * dev,
drm_buf_t * buf, int start, int end) drm_buf_t * buf, int start, int end)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -1588,7 +1588,7 @@ static void radeon_cp_dispatch_indirect(drm_device_t * dev, ...@@ -1588,7 +1588,7 @@ static void radeon_cp_dispatch_indirect(drm_device_t * dev,
} }
} }
static void radeon_cp_dispatch_indices(drm_device_t * dev, static void radeon_cp_dispatch_indices(struct drm_device * dev,
drm_buf_t * elt_buf, drm_buf_t * elt_buf,
drm_radeon_tcl_prim_t * prim) drm_radeon_tcl_prim_t * prim)
{ {
...@@ -1647,12 +1647,12 @@ static void radeon_cp_dispatch_indices(drm_device_t * dev, ...@@ -1647,12 +1647,12 @@ static void radeon_cp_dispatch_indices(drm_device_t * dev,
#define RADEON_MAX_TEXTURE_SIZE RADEON_BUFFER_SIZE #define RADEON_MAX_TEXTURE_SIZE RADEON_BUFFER_SIZE
static int radeon_cp_dispatch_texture(DRMFILE filp, static int radeon_cp_dispatch_texture(DRMFILE filp,
drm_device_t * dev, struct drm_device * dev,
drm_radeon_texture_t * tex, drm_radeon_texture_t * tex,
drm_radeon_tex_image_t * image) drm_radeon_tex_image_t * image)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_file_t *filp_priv; struct drm_file *filp_priv;
drm_buf_t *buf; drm_buf_t *buf;
u32 format; u32 format;
u32 *buffer; u32 *buffer;
...@@ -1881,7 +1881,7 @@ static int radeon_cp_dispatch_texture(DRMFILE filp, ...@@ -1881,7 +1881,7 @@ static int radeon_cp_dispatch_texture(DRMFILE filp,
return 0; return 0;
} }
static void radeon_cp_dispatch_stipple(drm_device_t * dev, u32 * stipple) static void radeon_cp_dispatch_stipple(struct drm_device * dev, u32 * stipple)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
int i; int i;
...@@ -2134,7 +2134,7 @@ static int radeon_cp_clear(DRM_IOCTL_ARGS) ...@@ -2134,7 +2134,7 @@ static int radeon_cp_clear(DRM_IOCTL_ARGS)
/* Not sure why this isn't set all the time: /* Not sure why this isn't set all the time:
*/ */
static int radeon_do_init_pageflip(drm_device_t * dev) static int radeon_do_init_pageflip(struct drm_device * dev)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
...@@ -2206,7 +2206,7 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS) ...@@ -2206,7 +2206,7 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS)
{ {
DRM_DEVICE; DRM_DEVICE;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_file_t *filp_priv; struct drm_file *filp_priv;
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; drm_buf_t *buf;
...@@ -2289,7 +2289,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS) ...@@ -2289,7 +2289,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS)
{ {
DRM_DEVICE; DRM_DEVICE;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_file_t *filp_priv; struct drm_file *filp_priv;
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; drm_buf_t *buf;
...@@ -2507,7 +2507,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS) ...@@ -2507,7 +2507,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
{ {
DRM_DEVICE; DRM_DEVICE;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_file_t *filp_priv; struct drm_file *filp_priv;
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; drm_buf_t *buf;
...@@ -2603,7 +2603,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS) ...@@ -2603,7 +2603,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
} }
static int radeon_emit_packets(drm_radeon_private_t * dev_priv, static int radeon_emit_packets(drm_radeon_private_t * dev_priv,
drm_file_t * filp_priv, struct drm_file * filp_priv,
drm_radeon_cmd_header_t header, drm_radeon_cmd_header_t header,
drm_radeon_kcmd_buffer_t *cmdbuf) drm_radeon_kcmd_buffer_t *cmdbuf)
{ {
...@@ -2728,8 +2728,8 @@ static __inline__ int radeon_emit_veclinear(drm_radeon_private_t *dev_priv, ...@@ -2728,8 +2728,8 @@ static __inline__ int radeon_emit_veclinear(drm_radeon_private_t *dev_priv,
return 0; return 0;
} }
static int radeon_emit_packet3(drm_device_t * dev, static int radeon_emit_packet3(struct drm_device * dev,
drm_file_t * filp_priv, struct drm_file * filp_priv,
drm_radeon_kcmd_buffer_t *cmdbuf) drm_radeon_kcmd_buffer_t *cmdbuf)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -2754,8 +2754,8 @@ static int radeon_emit_packet3(drm_device_t * dev, ...@@ -2754,8 +2754,8 @@ static int radeon_emit_packet3(drm_device_t * dev,
return 0; return 0;
} }
static int radeon_emit_packet3_cliprect(drm_device_t *dev, static int radeon_emit_packet3_cliprect(struct drm_device *dev,
drm_file_t *filp_priv, struct drm_file *filp_priv,
drm_radeon_kcmd_buffer_t *cmdbuf, drm_radeon_kcmd_buffer_t *cmdbuf,
int orig_nbox) int orig_nbox)
{ {
...@@ -2816,7 +2816,7 @@ static int radeon_emit_packet3_cliprect(drm_device_t *dev, ...@@ -2816,7 +2816,7 @@ static int radeon_emit_packet3_cliprect(drm_device_t *dev,
return 0; return 0;
} }
static int radeon_emit_wait(drm_device_t * dev, int flags) static int radeon_emit_wait(struct drm_device * dev, int flags)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
...@@ -2849,7 +2849,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS) ...@@ -2849,7 +2849,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS)
{ {
DRM_DEVICE; DRM_DEVICE;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_file_t *filp_priv; struct drm_file *filp_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf = NULL; drm_buf_t *buf = NULL;
int idx; int idx;
...@@ -3105,7 +3105,7 @@ static int radeon_cp_setparam(DRM_IOCTL_ARGS) ...@@ -3105,7 +3105,7 @@ static int radeon_cp_setparam(DRM_IOCTL_ARGS)
{ {
DRM_DEVICE; DRM_DEVICE;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_file_t *filp_priv; struct drm_file *filp_priv;
drm_radeon_setparam_t sp; drm_radeon_setparam_t sp;
struct drm_radeon_driver_file_fields *radeon_priv; struct drm_radeon_driver_file_fields *radeon_priv;
...@@ -3162,7 +3162,7 @@ static int radeon_cp_setparam(DRM_IOCTL_ARGS) ...@@ -3162,7 +3162,7 @@ static int radeon_cp_setparam(DRM_IOCTL_ARGS)
* *
* DRM infrastructure takes care of reclaiming dma buffers. * DRM infrastructure takes care of reclaiming dma buffers.
*/ */
void radeon_driver_preclose(drm_device_t * dev, DRMFILE filp) void radeon_driver_preclose(struct drm_device *dev, DRMFILE filp)
{ {
if (dev->dev_private) { if (dev->dev_private) {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -3173,7 +3173,7 @@ void radeon_driver_preclose(drm_device_t * dev, DRMFILE filp) ...@@ -3173,7 +3173,7 @@ void radeon_driver_preclose(drm_device_t * dev, DRMFILE filp)
} }
} }
void radeon_driver_lastclose(drm_device_t * dev) void radeon_driver_lastclose(struct drm_device *dev)
{ {
if (dev->dev_private) { if (dev->dev_private) {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -3186,7 +3186,7 @@ void radeon_driver_lastclose(drm_device_t * dev) ...@@ -3186,7 +3186,7 @@ void radeon_driver_lastclose(drm_device_t * dev)
radeon_do_release(dev); radeon_do_release(dev);
} }
int radeon_driver_open(drm_device_t * dev, drm_file_t * filp_priv) int radeon_driver_open(struct drm_device *dev, struct drm_file *filp_priv)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
struct drm_radeon_driver_file_fields *radeon_priv; struct drm_radeon_driver_file_fields *radeon_priv;
...@@ -3208,7 +3208,7 @@ int radeon_driver_open(drm_device_t * dev, drm_file_t * filp_priv) ...@@ -3208,7 +3208,7 @@ int radeon_driver_open(drm_device_t * dev, drm_file_t * filp_priv)
return 0; return 0;
} }
void radeon_driver_postclose(drm_device_t * dev, drm_file_t * filp_priv) void radeon_driver_postclose(struct drm_device *dev, struct drm_file *filp_priv)
{ {
struct drm_radeon_driver_file_fields *radeon_priv = struct drm_radeon_driver_file_fields *radeon_priv =
filp_priv->driver_priv; filp_priv->driver_priv;
......
...@@ -35,7 +35,7 @@ static struct pci_device_id pciidlist[] = { ...@@ -35,7 +35,7 @@ static struct pci_device_id pciidlist[] = {
sisdrv_PCI_IDS sisdrv_PCI_IDS
}; };
static int sis_driver_load(drm_device_t *dev, unsigned long chipset) static int sis_driver_load(struct drm_device *dev, unsigned long chipset)
{ {
drm_sis_private_t *dev_priv; drm_sis_private_t *dev_priv;
int ret; int ret;
...@@ -54,7 +54,7 @@ static int sis_driver_load(drm_device_t *dev, unsigned long chipset) ...@@ -54,7 +54,7 @@ static int sis_driver_load(drm_device_t *dev, unsigned long chipset)
return ret; return ret;
} }
static int sis_driver_unload(drm_device_t *dev) static int sis_driver_unload(struct drm_device *dev)
{ {
drm_sis_private_t *dev_priv = dev->dev_private; drm_sis_private_t *dev_priv = dev->dev_private;
......
...@@ -61,9 +61,9 @@ typedef struct drm_sis_private { ...@@ -61,9 +61,9 @@ typedef struct drm_sis_private {
unsigned long agp_offset; unsigned long agp_offset;
} drm_sis_private_t; } drm_sis_private_t;
extern int sis_idle(drm_device_t *dev); extern int sis_idle(struct drm_device *dev);
extern void sis_reclaim_buffers_locked(drm_device_t *dev, struct file *filp); extern void sis_reclaim_buffers_locked(struct drm_device *dev, struct file *filp);
extern void sis_lastclose(drm_device_t *dev); extern void sis_lastclose(struct drm_device *dev);
extern drm_ioctl_desc_t sis_ioctls[]; extern drm_ioctl_desc_t sis_ioctls[];
extern int sis_max_ioctl; extern int sis_max_ioctl;
......
...@@ -123,7 +123,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS) ...@@ -123,7 +123,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS)
return 0; return 0;
} }
static int sis_drm_alloc(drm_device_t * dev, drm_file_t * priv, static int sis_drm_alloc(struct drm_device *dev, struct drm_file * priv,
unsigned long data, int pool) unsigned long data, int pool)
{ {
drm_sis_private_t *dev_priv = dev->dev_private; drm_sis_private_t *dev_priv = dev->dev_private;
...@@ -229,7 +229,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS) ...@@ -229,7 +229,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS)
return sis_drm_alloc(dev, priv, data, AGP_TYPE); return sis_drm_alloc(dev, priv, data, AGP_TYPE);
} }
static drm_local_map_t *sis_reg_init(drm_device_t *dev) static drm_local_map_t *sis_reg_init(struct drm_device *dev)
{ {
drm_map_list_t *entry; drm_map_list_t *entry;
drm_local_map_t *map; drm_local_map_t *map;
...@@ -245,7 +245,7 @@ static drm_local_map_t *sis_reg_init(drm_device_t *dev) ...@@ -245,7 +245,7 @@ static drm_local_map_t *sis_reg_init(drm_device_t *dev)
return NULL; return NULL;
} }
int sis_idle(drm_device_t *dev) int sis_idle(struct drm_device *dev)
{ {
drm_sis_private_t *dev_priv = dev->dev_private; drm_sis_private_t *dev_priv = dev->dev_private;
uint32_t idle_reg; uint32_t idle_reg;
...@@ -314,10 +314,10 @@ void sis_lastclose(struct drm_device *dev) ...@@ -314,10 +314,10 @@ void sis_lastclose(struct drm_device *dev)
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
} }
void sis_reclaim_buffers_locked(drm_device_t * dev, struct file *filp) void sis_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
{ {
drm_sis_private_t *dev_priv = dev->dev_private; drm_sis_private_t *dev_priv = dev->dev_private;
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)priv)) { if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)priv)) {
......
...@@ -151,7 +151,7 @@ static inline uint32_t *via_check_dma(drm_via_private_t * dev_priv, ...@@ -151,7 +151,7 @@ static inline uint32_t *via_check_dma(drm_via_private_t * dev_priv,
return (uint32_t *) (dev_priv->dma_ptr + dev_priv->dma_low); return (uint32_t *) (dev_priv->dma_ptr + dev_priv->dma_low);
} }
int via_dma_cleanup(drm_device_t * dev) int via_dma_cleanup(struct drm_device * dev)
{ {
if (dev->dev_private) { if (dev->dev_private) {
drm_via_private_t *dev_priv = drm_via_private_t *dev_priv =
...@@ -169,7 +169,7 @@ int via_dma_cleanup(drm_device_t * dev) ...@@ -169,7 +169,7 @@ int via_dma_cleanup(drm_device_t * dev)
return 0; return 0;
} }
static int via_initialize(drm_device_t * dev, static int via_initialize(struct drm_device * dev,
drm_via_private_t * dev_priv, drm_via_private_t * dev_priv,
drm_via_dma_init_t * init) drm_via_dma_init_t * init)
{ {
...@@ -262,7 +262,7 @@ static int via_dma_init(DRM_IOCTL_ARGS) ...@@ -262,7 +262,7 @@ static int via_dma_init(DRM_IOCTL_ARGS)
return retcode; return retcode;
} }
static int via_dispatch_cmdbuffer(drm_device_t * dev, drm_via_cmdbuffer_t * cmd) static int via_dispatch_cmdbuffer(struct drm_device * dev, drm_via_cmdbuffer_t * cmd)
{ {
drm_via_private_t *dev_priv; drm_via_private_t *dev_priv;
uint32_t *vb; uint32_t *vb;
...@@ -316,7 +316,7 @@ static int via_dispatch_cmdbuffer(drm_device_t * dev, drm_via_cmdbuffer_t * cmd) ...@@ -316,7 +316,7 @@ static int via_dispatch_cmdbuffer(drm_device_t * dev, drm_via_cmdbuffer_t * cmd)
return 0; return 0;
} }
int via_driver_dma_quiescent(drm_device_t * dev) int via_driver_dma_quiescent(struct drm_device * dev)
{ {
drm_via_private_t *dev_priv = dev->dev_private; drm_via_private_t *dev_priv = dev->dev_private;
...@@ -356,7 +356,7 @@ static int via_cmdbuffer(DRM_IOCTL_ARGS) ...@@ -356,7 +356,7 @@ static int via_cmdbuffer(DRM_IOCTL_ARGS)
return 0; return 0;
} }
static int via_dispatch_pci_cmdbuffer(drm_device_t * dev, static int via_dispatch_pci_cmdbuffer(struct drm_device * dev,
drm_via_cmdbuffer_t * cmd) drm_via_cmdbuffer_t * cmd)
{ {
drm_via_private_t *dev_priv = dev->dev_private; drm_via_private_t *dev_priv = dev->dev_private;
......
...@@ -207,7 +207,7 @@ via_free_sg_info(struct pci_dev *pdev, drm_via_sg_info_t *vsg) ...@@ -207,7 +207,7 @@ via_free_sg_info(struct pci_dev *pdev, drm_via_sg_info_t *vsg)
*/ */
static void static void
via_fire_dmablit(drm_device_t *dev, drm_via_sg_info_t *vsg, int engine) via_fire_dmablit(struct drm_device *dev, drm_via_sg_info_t *vsg, int engine)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private;
...@@ -289,7 +289,7 @@ via_alloc_desc_pages(drm_via_sg_info_t *vsg) ...@@ -289,7 +289,7 @@ via_alloc_desc_pages(drm_via_sg_info_t *vsg)
} }
static void static void
via_abort_dmablit(drm_device_t *dev, int engine) via_abort_dmablit(struct drm_device *dev, int engine)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private;
...@@ -297,7 +297,7 @@ via_abort_dmablit(drm_device_t *dev, int engine) ...@@ -297,7 +297,7 @@ via_abort_dmablit(drm_device_t *dev, int engine)
} }
static void static void
via_dmablit_engine_off(drm_device_t *dev, int engine) via_dmablit_engine_off(struct drm_device *dev, int engine)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private;
...@@ -314,7 +314,7 @@ via_dmablit_engine_off(drm_device_t *dev, int engine) ...@@ -314,7 +314,7 @@ via_dmablit_engine_off(drm_device_t *dev, int engine)
*/ */
void void
via_dmablit_handler(drm_device_t *dev, int engine, int from_irq) via_dmablit_handler(struct drm_device *dev, int engine, int from_irq)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private;
drm_via_blitq_t *blitq = dev_priv->blit_queues + engine; drm_via_blitq_t *blitq = dev_priv->blit_queues + engine;
...@@ -433,7 +433,7 @@ via_dmablit_active(drm_via_blitq_t *blitq, int engine, uint32_t handle, wait_que ...@@ -433,7 +433,7 @@ via_dmablit_active(drm_via_blitq_t *blitq, int engine, uint32_t handle, wait_que
*/ */
static int static int
via_dmablit_sync(drm_device_t *dev, uint32_t handle, int engine) via_dmablit_sync(struct drm_device *dev, uint32_t handle, int engine)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private;
...@@ -466,7 +466,7 @@ static void ...@@ -466,7 +466,7 @@ static void
via_dmablit_timer(unsigned long data) via_dmablit_timer(unsigned long data)
{ {
drm_via_blitq_t *blitq = (drm_via_blitq_t *) data; drm_via_blitq_t *blitq = (drm_via_blitq_t *) data;
drm_device_t *dev = blitq->dev; struct drm_device *dev = blitq->dev;
int engine = (int) int engine = (int)
(blitq - ((drm_via_private_t *)dev->dev_private)->blit_queues); (blitq - ((drm_via_private_t *)dev->dev_private)->blit_queues);
...@@ -502,7 +502,7 @@ static void ...@@ -502,7 +502,7 @@ static void
via_dmablit_workqueue(struct work_struct *work) via_dmablit_workqueue(struct work_struct *work)
{ {
drm_via_blitq_t *blitq = container_of(work, drm_via_blitq_t, wq); drm_via_blitq_t *blitq = container_of(work, drm_via_blitq_t, wq);
drm_device_t *dev = blitq->dev; struct drm_device *dev = blitq->dev;
unsigned long irqsave; unsigned long irqsave;
drm_via_sg_info_t *cur_sg; drm_via_sg_info_t *cur_sg;
int cur_released; int cur_released;
...@@ -545,7 +545,7 @@ via_dmablit_workqueue(struct work_struct *work) ...@@ -545,7 +545,7 @@ via_dmablit_workqueue(struct work_struct *work)
void void
via_init_dmablit(drm_device_t *dev) via_init_dmablit(struct drm_device *dev)
{ {
int i,j; int i,j;
drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private;
...@@ -582,7 +582,7 @@ via_init_dmablit(drm_device_t *dev) ...@@ -582,7 +582,7 @@ via_init_dmablit(drm_device_t *dev)
static int static int
via_build_sg_info(drm_device_t *dev, drm_via_sg_info_t *vsg, drm_via_dmablit_t *xfer) via_build_sg_info(struct drm_device *dev, drm_via_sg_info_t *vsg, drm_via_dmablit_t *xfer)
{ {
int draw = xfer->to_fb; int draw = xfer->to_fb;
int ret = 0; int ret = 0;
...@@ -730,7 +730,7 @@ via_dmablit_release_slot(drm_via_blitq_t *blitq) ...@@ -730,7 +730,7 @@ via_dmablit_release_slot(drm_via_blitq_t *blitq)
static int static int
via_dmablit(drm_device_t *dev, drm_via_dmablit_t *xfer) via_dmablit(struct drm_device *dev, drm_via_dmablit_t *xfer)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private;
drm_via_sg_info_t *vsg; drm_via_sg_info_t *vsg;
......
...@@ -59,7 +59,7 @@ typedef struct _drm_via_sg_info { ...@@ -59,7 +59,7 @@ typedef struct _drm_via_sg_info {
} drm_via_sg_info_t; } drm_via_sg_info_t;
typedef struct _drm_via_blitq { typedef struct _drm_via_blitq {
drm_device_t *dev; struct drm_device *dev;
uint32_t cur_blit_handle; uint32_t cur_blit_handle;
uint32_t done_blit_handle; uint32_t done_blit_handle;
unsigned serviced; unsigned serviced;
......
...@@ -123,31 +123,31 @@ extern int via_wait_irq(DRM_IOCTL_ARGS); ...@@ -123,31 +123,31 @@ extern int via_wait_irq(DRM_IOCTL_ARGS);
extern int via_dma_blit_sync( DRM_IOCTL_ARGS ); extern int via_dma_blit_sync( DRM_IOCTL_ARGS );
extern int via_dma_blit( DRM_IOCTL_ARGS ); extern int via_dma_blit( DRM_IOCTL_ARGS );
extern int via_driver_load(drm_device_t *dev, unsigned long chipset); extern int via_driver_load(struct drm_device *dev, unsigned long chipset);
extern int via_driver_unload(drm_device_t *dev); extern int via_driver_unload(struct drm_device *dev);
extern int via_init_context(drm_device_t * dev, int context); extern int via_init_context(struct drm_device * dev, int context);
extern int via_final_context(drm_device_t * dev, int context); extern int via_final_context(struct drm_device * dev, int context);
extern int via_do_cleanup_map(drm_device_t * dev); extern int via_do_cleanup_map(struct drm_device * dev);
extern int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence); extern int via_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence);
extern irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS); extern irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS);
extern void via_driver_irq_preinstall(drm_device_t * dev); extern void via_driver_irq_preinstall(struct drm_device * dev);
extern void via_driver_irq_postinstall(drm_device_t * dev); extern void via_driver_irq_postinstall(struct drm_device * dev);
extern void via_driver_irq_uninstall(drm_device_t * dev); extern void via_driver_irq_uninstall(struct drm_device * dev);
extern int via_dma_cleanup(drm_device_t * dev); extern int via_dma_cleanup(struct drm_device * dev);
extern void via_init_command_verifier(void); extern void via_init_command_verifier(void);
extern int via_driver_dma_quiescent(drm_device_t * dev); extern int via_driver_dma_quiescent(struct drm_device * dev);
extern void via_init_futex(drm_via_private_t * dev_priv); extern void via_init_futex(drm_via_private_t * dev_priv);
extern void via_cleanup_futex(drm_via_private_t * dev_priv); extern void via_cleanup_futex(drm_via_private_t * dev_priv);
extern void via_release_futex(drm_via_private_t * dev_priv, int context); extern void via_release_futex(drm_via_private_t * dev_priv, int context);
extern void via_reclaim_buffers_locked(drm_device_t *dev, struct file *filp); extern void via_reclaim_buffers_locked(struct drm_device *dev, struct file *filp);
extern void via_lastclose(drm_device_t *dev); extern void via_lastclose(struct drm_device *dev);
extern void via_dmablit_handler(drm_device_t *dev, int engine, int from_irq); extern void via_dmablit_handler(struct drm_device *dev, int engine, int from_irq);
extern void via_init_dmablit(drm_device_t *dev); extern void via_init_dmablit(struct drm_device *dev);
#endif #endif
...@@ -98,7 +98,7 @@ static unsigned time_diff(struct timeval *now, struct timeval *then) ...@@ -98,7 +98,7 @@ static unsigned time_diff(struct timeval *now, struct timeval *then)
irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS) irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS)
{ {
drm_device_t *dev = (drm_device_t *) arg; struct drm_device *dev = (struct drm_device *) arg;
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
u32 status; u32 status;
int handled = 0; int handled = 0;
...@@ -163,7 +163,7 @@ static __inline__ void viadrv_acknowledge_irqs(drm_via_private_t * dev_priv) ...@@ -163,7 +163,7 @@ static __inline__ void viadrv_acknowledge_irqs(drm_via_private_t * dev_priv)
} }
} }
int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence) int via_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
unsigned int cur_vblank; unsigned int cur_vblank;
...@@ -191,7 +191,7 @@ int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence) ...@@ -191,7 +191,7 @@ int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence)
} }
static int static int
via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence, via_driver_irq_wait(struct drm_device * dev, unsigned int irq, int force_sequence,
unsigned int *sequence) unsigned int *sequence)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
...@@ -244,7 +244,7 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence, ...@@ -244,7 +244,7 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence,
* drm_dma.h hooks * drm_dma.h hooks
*/ */
void via_driver_irq_preinstall(drm_device_t * dev) void via_driver_irq_preinstall(struct drm_device * dev)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
u32 status; u32 status;
...@@ -293,7 +293,7 @@ void via_driver_irq_preinstall(drm_device_t * dev) ...@@ -293,7 +293,7 @@ void via_driver_irq_preinstall(drm_device_t * dev)
} }
} }
void via_driver_irq_postinstall(drm_device_t * dev) void via_driver_irq_postinstall(struct drm_device * dev)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
u32 status; u32 status;
...@@ -312,7 +312,7 @@ void via_driver_irq_postinstall(drm_device_t * dev) ...@@ -312,7 +312,7 @@ void via_driver_irq_postinstall(drm_device_t * dev)
} }
} }
void via_driver_irq_uninstall(drm_device_t * dev) void via_driver_irq_uninstall(struct drm_device * dev)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
u32 status; u32 status;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "via_drm.h" #include "via_drm.h"
#include "via_drv.h" #include "via_drv.h"
static int via_do_init_map(drm_device_t * dev, drm_via_init_t * init) static int via_do_init_map(struct drm_device * dev, drm_via_init_t * init)
{ {
drm_via_private_t *dev_priv = dev->dev_private; drm_via_private_t *dev_priv = dev->dev_private;
...@@ -68,7 +68,7 @@ static int via_do_init_map(drm_device_t * dev, drm_via_init_t * init) ...@@ -68,7 +68,7 @@ static int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
return 0; return 0;
} }
int via_do_cleanup_map(drm_device_t * dev) int via_do_cleanup_map(struct drm_device * dev)
{ {
via_dma_cleanup(dev); via_dma_cleanup(dev);
...@@ -95,7 +95,7 @@ int via_map_init(DRM_IOCTL_ARGS) ...@@ -95,7 +95,7 @@ int via_map_init(DRM_IOCTL_ARGS)
return -EINVAL; return -EINVAL;
} }
int via_driver_load(drm_device_t *dev, unsigned long chipset) int via_driver_load(struct drm_device *dev, unsigned long chipset)
{ {
drm_via_private_t *dev_priv; drm_via_private_t *dev_priv;
int ret = 0; int ret = 0;
...@@ -115,7 +115,7 @@ int via_driver_load(drm_device_t *dev, unsigned long chipset) ...@@ -115,7 +115,7 @@ int via_driver_load(drm_device_t *dev, unsigned long chipset)
return ret; return ret;
} }
int via_driver_unload(drm_device_t *dev) int via_driver_unload(struct drm_device *dev)
{ {
drm_via_private_t *dev_priv = dev->dev_private; drm_via_private_t *dev_priv = dev->dev_private;
......
...@@ -188,10 +188,10 @@ int via_mem_free(DRM_IOCTL_ARGS) ...@@ -188,10 +188,10 @@ int via_mem_free(DRM_IOCTL_ARGS)
} }
void via_reclaim_buffers_locked(drm_device_t * dev, struct file *filp) void via_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
{ {
drm_via_private_t *dev_priv = dev->dev_private; drm_via_private_t *dev_priv = dev->dev_private;
drm_file_t *priv = filp->private_data; struct drm_file *priv = filp->private_data;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)priv)) { if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)priv)) {
......
...@@ -252,7 +252,7 @@ eat_words(const uint32_t ** buf, const uint32_t * buf_end, unsigned num_words) ...@@ -252,7 +252,7 @@ eat_words(const uint32_t ** buf, const uint32_t * buf_end, unsigned num_words)
static __inline__ drm_local_map_t *via_drm_lookup_agp_map(drm_via_state_t *seq, static __inline__ drm_local_map_t *via_drm_lookup_agp_map(drm_via_state_t *seq,
unsigned long offset, unsigned long offset,
unsigned long size, unsigned long size,
drm_device_t * dev) struct drm_device * dev)
{ {
drm_map_list_t *r_list; drm_map_list_t *r_list;
drm_local_map_t *map = seq->map_cache; drm_local_map_t *map = seq->map_cache;
...@@ -962,7 +962,7 @@ via_parse_vheader6(drm_via_private_t * dev_priv, uint32_t const **buffer, ...@@ -962,7 +962,7 @@ via_parse_vheader6(drm_via_private_t * dev_priv, uint32_t const **buffer,
int int
via_verify_command_stream(const uint32_t * buf, unsigned int size, via_verify_command_stream(const uint32_t * buf, unsigned int size,
drm_device_t * dev, int agp) struct drm_device * dev, int agp)
{ {
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
...@@ -1037,7 +1037,7 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size, ...@@ -1037,7 +1037,7 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size,
} }
int int
via_parse_command_stream(drm_device_t * dev, const uint32_t * buf, via_parse_command_stream(struct drm_device * dev, const uint32_t * buf,
unsigned int size) unsigned int size)
{ {
......
...@@ -47,7 +47,7 @@ typedef struct { ...@@ -47,7 +47,7 @@ typedef struct {
drm_via_sequence_t unfinished; drm_via_sequence_t unfinished;
int agp_texture; int agp_texture;
int multitex; int multitex;
drm_device_t *dev; struct drm_device *dev;
drm_local_map_t *map_cache; drm_local_map_t *map_cache;
uint32_t vertex_count; uint32_t vertex_count;
int agp; int agp;
...@@ -55,8 +55,8 @@ typedef struct { ...@@ -55,8 +55,8 @@ typedef struct {
} drm_via_state_t; } drm_via_state_t;
extern int via_verify_command_stream(const uint32_t * buf, unsigned int size, extern int via_verify_command_stream(const uint32_t * buf, unsigned int size,
drm_device_t * dev, int agp); struct drm_device * dev, int agp);
extern int via_parse_command_stream(drm_device_t *dev, const uint32_t *buf, extern int via_parse_command_stream(struct drm_device *dev, const uint32_t *buf,
unsigned int size); unsigned int size);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment