diff options
Diffstat (limited to 'sys/dev/pci')
26 files changed, 381 insertions, 370 deletions
diff --git a/sys/dev/pci/drm/ati_pcigart.c b/sys/dev/pci/drm/ati_pcigart.c index ddcb1a7126c..1f3e461aa24 100644 --- a/sys/dev/pci/drm/ati_pcigart.c +++ b/sys/dev/pci/drm/ati_pcigart.c @@ -35,7 +35,8 @@ #define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */ -int drm_ati_pcigart_init(drm_device_t *dev, struct drm_ati_pcigart_info *gart_info) +int drm_ati_pcigart_init(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) { unsigned long pages; u32 *pci_gart = NULL, page_base; @@ -98,7 +99,8 @@ int drm_ati_pcigart_init(drm_device_t *dev, struct drm_ati_pcigart_info *gart_in return 1; } -int drm_ati_pcigart_cleanup(drm_device_t *dev, struct drm_ati_pcigart_info *gart_info) +int drm_ati_pcigart_cleanup(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) { if (dev->sg == NULL) { DRM_ERROR( "no scatter/gather memory!\n" ); diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 45c05e46c9d..31d73c0403c 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -36,8 +36,6 @@ #if defined(_KERNEL) || defined(__KERNEL__) -typedef struct drm_device drm_device_t; -typedef struct drm_file drm_file_t; #include <sys/param.h> #include <sys/queue.h> @@ -148,7 +146,7 @@ typedef struct drm_file drm_file_t; #define DRM_CURRENTPID DRM_PID(curproc) #define DRM_UID(p) (p)->p_pid #define DRM_MAXUNITS 8 -extern drm_device_t *drm_units[]; +extern struct drm_device *drm_units[]; /* Deal with netbsd code where only the print statements differ */ #define printk printf @@ -316,12 +314,14 @@ typedef struct drm_pci_id_list char *name; } drm_pci_id_list_t; +struct drm_file; + #define DRM_AUTH 0x1 #define DRM_MASTER 0x2 #define DRM_ROOT_ONLY 0x4 typedef struct drm_ioctl_desc { unsigned long cmd; - int (*func)(drm_device_t *dev, void *data, struct drm_file *file_priv); + int (*func)(struct drm_device *, void *, struct drm_file *); int flags; } drm_ioctl_desc_t; /** @@ -413,12 +413,12 @@ typedef struct drm_lock_data { unsigned long lock_time; /* Time of last lock in jiffies */ } drm_lock_data_t; -/* This structure, in the drm_device_t, is always initialized while the device - * is open. dev->dma_lock protects the incrementing of dev->buf_use, which - * when set marks that no further bufs may be allocated until device teardown - * occurs (when the last open of the device has closed). The high/low - * watermarks of bufs are only touched by the X Server, and thus not - * concurrently accessed, so no locking is needed. +/* This structure, in the struct drm_device, is always initialized while + * the device is open. dev->dma_lock protects the incrementing of + * dev->buf_use, which when set marks that no further bufs may be allocated + * until device teardown occurs (when the last open of the device has closed). + * The high/low watermarks of bufs are only touched by the X Server, and thus + * not concurrently accessed, so no locking is needed. */ typedef struct drm_device_dma { drm_buf_entry_t bufs[DRM_MAX_ORDER+1]; @@ -543,30 +543,29 @@ struct drm_ati_pcigart_info { }; struct drm_driver_info { - int (*load)(struct drm_device *, unsigned long flags); + int (*load)(struct drm_device *, unsigned long); int (*firstopen)(struct drm_device *); - int (*open)(struct drm_device *, drm_file_t *); - void (*preclose)(struct drm_device *, struct drm_file *file_priv); - void (*postclose)(struct drm_device *, drm_file_t *); + int (*open)(struct drm_device *, struct drm_file *); + void (*preclose)(struct drm_device *, struct drm_file *); + void (*postclose)(struct drm_device *, struct drm_file *); void (*lastclose)(struct drm_device *); int (*unload)(struct drm_device *); void (*reclaim_buffers_locked)(struct drm_device *, - struct drm_file *file_priv); - int (*dma_ioctl)(drm_device_t *dev, void *data, struct drm_file *file_priv); + struct drm_file *); + int (*dma_ioctl)(struct drm_device *, void *, struct drm_file *); void (*dma_ready)(struct drm_device *); int (*dma_quiescent)(struct drm_device *); - int (*dma_flush_block_and_flush)(struct drm_device *, int context, - drm_lock_flags_t flags); - int (*dma_flush_unblock)(struct drm_device *, int context, - drm_lock_flags_t flags); - int (*context_ctor)(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 new); - int (*kernel_context_switch_unlock)(struct drm_device *dev); - void (*irq_preinstall)(drm_device_t *dev); - int (*irq_postinstall)(drm_device_t *dev); - void (*irq_uninstall)(drm_device_t *dev); + int (*dma_flush_block_and_flush)(struct drm_device *, int, + drm_lock_flags_t); + int (*dma_flush_unblock)(struct drm_device *, int, + drm_lock_flags_t); + int (*context_ctor)(struct drm_device *, int); + int (*context_dtor)(struct drm_device *, int); + int (*kernel_context_switch)(struct drm_device *, int, int); + int (*kernel_context_switch_unlock)(struct drm_device *); + void (*irq_preinstall)(struct drm_device *); + int (*irq_postinstall)(struct drm_device *); + void (*irq_uninstall)(struct drm_device *); irqreturn_t (*irq_handler)(DRM_IRQ_ARGS); u_int32_t (*get_vblank_counter)(struct drm_device *, int); int (*enable_vblank)(struct drm_device *, int); @@ -714,7 +713,7 @@ struct drm_device { /* RB tree of drawable infos */ RB_HEAD(drawable_tree, bsd_drm_drawable_info) drw_head; - void (*locked_task_call)(drm_device_t *dev); + void (*locked_task_call)(struct drm_device *); }; extern int drm_debug_flag; @@ -731,182 +730,179 @@ dev_type_close(drmclose); dev_type_read(drmread); dev_type_poll(drmpoll); dev_type_mmap(drmmmap); -extern drm_local_map_t *drm_getsarea(drm_device_t *); +extern drm_local_map_t *drm_getsarea(struct drm_device *); /* File operations helpers (drm_fops.c) */ int drm_open_helper(DRM_CDEV, int, int, - DRM_STRUCTPROC *, drm_device_t *); -drm_file_t *drm_find_file_by_minor(drm_device_t *, int); + DRM_STRUCTPROC *, struct drm_device *); +struct drm_file *drm_find_file_by_minor(struct drm_device *, int); /* Memory management support (drm_memory.c) */ void drm_mem_init(void); void drm_mem_uninit(void); -void *drm_alloc(size_t size, int area); -void *drm_calloc(size_t nmemb, size_t size, int area); -void *drm_realloc(void *oldpt, size_t oldsize, size_t size, - int area); -void drm_free(void *pt, size_t size, int area); -void *drm_ioremap(drm_device_t *dev, drm_local_map_t *map); -void drm_ioremapfree(drm_local_map_t *map); -int drm_mtrr_add(unsigned long offset, size_t size, int flags); -int drm_mtrr_del(int handle, unsigned long offset, size_t size, int flags); - -int drm_context_switch(drm_device_t *dev, int old, int new); -int drm_context_switch_complete(drm_device_t *dev, int new); - -int drm_ctxbitmap_init(drm_device_t *dev); -void drm_ctxbitmap_cleanup(drm_device_t *dev); -void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle); -int drm_ctxbitmap_next(drm_device_t *dev); +void *drm_alloc(size_t, int); +void *drm_calloc(size_t, size_t, int); +void *drm_realloc(void *, size_t, size_t, int); +void drm_free(void *, size_t, int); +void *drm_ioremap(struct drm_device *, drm_local_map_t *); +void drm_ioremapfree(drm_local_map_t *); +int drm_mtrr_add(unsigned long, size_t, int); +int drm_mtrr_del(int, unsigned long, size_t, int); + +int drm_context_switch(struct drm_device *, int, int); +int drm_context_switch_complete(struct drm_device *, int); + +int drm_ctxbitmap_init(struct drm_device *); +void drm_ctxbitmap_cleanup(struct drm_device *); +void drm_ctxbitmap_free(struct drm_device *, int); +int drm_ctxbitmap_next(struct drm_device *); /* Locking IOCTL support (drm_lock.c) */ -int drm_lock_take(__volatile__ unsigned int *lock, - unsigned int context); -int drm_lock_transfer(drm_device_t *dev, - __volatile__ unsigned int *lock, - unsigned int context); -int drm_lock_free(drm_device_t *dev, - __volatile__ unsigned int *lock, - unsigned int context); +int drm_lock_take(__volatile__ unsigned int *, unsigned int); +int drm_lock_transfer(struct drm_device *, __volatile__ unsigned int *, + unsigned int); +int drm_lock_free(struct drm_device *, __volatile__ unsigned int *, + unsigned int); /* Buffer management support (drm_bufs.c) */ -unsigned long drm_get_resource_start(drm_device_t *dev, unsigned int resource); -unsigned long drm_get_resource_len(drm_device_t *dev, unsigned int resource); -void drm_rmmap(drm_device_t *dev, drm_local_map_t *map); -int drm_order(unsigned long size); +unsigned long drm_get_resource_start(struct drm_device *, unsigned int); +unsigned long drm_get_resource_len(struct drm_device *, unsigned int); +void drm_rmmap(struct drm_device *, drm_local_map_t *); +int drm_order(unsigned long); drm_local_map_t *drm_find_matching_map(struct drm_device *, drm_local_map_t *); -int drm_addmap(drm_device_t * dev, unsigned long offset, unsigned long size, - drm_map_type_t type, drm_map_flags_t flags, - drm_local_map_t **map_ptr); -int drm_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request); -int drm_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request); -int drm_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request); +int drm_addmap(struct drm_device *, unsigned long, unsigned long, + drm_map_type_t, drm_map_flags_t, drm_local_map_t **); +int drm_addbufs_pci(struct drm_device *, drm_buf_desc_t *); +int drm_addbufs_sg(struct drm_device *, drm_buf_desc_t *); +int drm_addbufs_agp(struct drm_device *, drm_buf_desc_t *); /* DMA support (drm_dma.c) */ -int drm_dma_setup(drm_device_t *dev); -void drm_dma_takedown(drm_device_t *dev); -void drm_free_buffer(drm_device_t *dev, drm_buf_t *buf); -void drm_reclaim_buffers(drm_device_t *dev, struct drm_file *file_priv); +int drm_dma_setup(struct drm_device *); +void drm_dma_takedown(struct drm_device *); +void drm_free_buffer(struct drm_device *, drm_buf_t *); +void drm_reclaim_buffers(struct drm_device *, struct drm_file *); #define drm_core_reclaim_buffers drm_reclaim_buffers /* IRQ support (drm_irq.c) */ -int drm_irq_install(drm_device_t *dev); -int drm_irq_uninstall(drm_device_t *dev); +int drm_irq_install(struct drm_device *); +int drm_irq_uninstall(struct drm_device *); irqreturn_t drm_irq_handler(DRM_IRQ_ARGS); -void drm_driver_irq_preinstall(drm_device_t *dev); -void drm_driver_irq_postinstall(drm_device_t *dev); -void drm_driver_irq_uninstall(drm_device_t *dev); -void drm_vbl_send_signals(drm_device_t *dev, int crtc); +void drm_driver_irq_preinstall(struct drm_device *); +void drm_driver_irq_postinstall(struct drm_device *); +void drm_driver_irq_uninstall(struct drm_device *); +void drm_vbl_send_signals(struct drm_device *, int); void drm_vblank_cleanup(struct drm_device *); int drm_vblank_init(struct drm_device *, int); u_int32_t drm_vblank_count(struct drm_device *, int); void drm_update_vblank_count(struct drm_device *, int); int drm_vblank_get(struct drm_device *, int); void drm_vblank_put(struct drm_device *, int); -int drm_modeset_ctl(struct drm_device *dev, void *, struct drm_file *); +int drm_modeset_ctl(struct drm_device *, void *, struct drm_file *); void drm_handle_vblank(struct drm_device *, int); /* AGP/PCI Express/GART support (drm_agpsupport.c) */ -int drm_device_is_agp(drm_device_t *dev); -int drm_device_is_pcie(drm_device_t *dev); +int drm_device_is_agp(struct drm_device *); +int drm_device_is_pcie(struct drm_device *); drm_agp_head_t *drm_agp_init(void); -int drm_agp_acquire(drm_device_t *dev); -int drm_agp_release(drm_device_t *dev); -int drm_agp_info(drm_device_t * dev, drm_agp_info_t *info); -int drm_agp_enable(drm_device_t *dev, drm_agp_mode_t mode); -void *drm_agp_allocate_memory(size_t pages, u32 type); -int drm_agp_free_memory(void *handle); -int drm_agp_bind_memory(void *handle, off_t start); -int drm_agp_unbind_memory(void *handle); -int drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request); -int drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request); -int drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request); -int drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request); +int drm_agp_acquire(struct drm_device *); +int drm_agp_release(struct drm_device *); +int drm_agp_info(struct drm_device *, drm_agp_info_t *); +int drm_agp_enable(struct drm_device *, drm_agp_mode_t); +void *drm_agp_allocate_memory(size_t, u32); +int drm_agp_free_memory(void *); +int drm_agp_bind_memory(void *, off_t); +int drm_agp_unbind_memory(void *); +int drm_agp_alloc(struct drm_device *, drm_agp_buffer_t *); +int drm_agp_free(struct drm_device *, drm_agp_buffer_t *); +int drm_agp_bind(struct drm_device *, drm_agp_binding_t *); +int drm_agp_unbind(struct drm_device *, drm_agp_binding_t *); /* Scatter Gather Support (drm_scatter.c) */ -void drm_sg_cleanup(drm_sg_mem_t *entry); -int drm_sg_alloc(drm_device_t * dev, drm_scatter_gather_t * request); +void drm_sg_cleanup(drm_sg_mem_t *); +int drm_sg_alloc(struct drm_device *, drm_scatter_gather_t *); /* ATI PCIGART support (ati_pcigart.c) */ -int drm_ati_pcigart_init(drm_device_t *, struct drm_ati_pcigart_info *); -int drm_ati_pcigart_cleanup(drm_device_t *, struct drm_ati_pcigart_info *); +int drm_ati_pcigart_init(struct drm_device *, + struct drm_ati_pcigart_info *); +int drm_ati_pcigart_cleanup(struct drm_device *, + struct drm_ati_pcigart_info *); /* Locking IOCTL support (drm_drv.c) */ -int drm_lock(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_unlock(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_version(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_setversion(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_lock(struct drm_device *, void *, struct drm_file *); +int drm_unlock(struct drm_device *, void *, struct drm_file *); +int drm_version(struct drm_device *, void *, struct drm_file *); +int drm_setversion(struct drm_device *, void *, struct drm_file *); /* Misc. IOCTL support (drm_ioctl.c) */ -int drm_irq_by_busid(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_getunique(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_setunique(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_getmap(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_getclient(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_getstats(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_noop(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_irq_by_busid(struct drm_device *, void *, struct drm_file *); +int drm_getunique(struct drm_device *, void *, struct drm_file *); +int drm_setunique(struct drm_device *, void *, struct drm_file *); +int drm_getmap(struct drm_device *, void *, struct drm_file *); +int drm_getclient(struct drm_device *, void *, struct drm_file *); +int drm_getstats(struct drm_device *, void *, struct drm_file *); +int drm_noop(struct drm_device *, void *, struct drm_file *); /* Context IOCTL support (drm_context.c) */ -int drm_resctx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_addctx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_modctx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_getctx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_switchctx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_newctx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_rmctx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_setsareactx(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_getsareactx(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_resctx(struct drm_device *, void *, struct drm_file *); +int drm_addctx(struct drm_device *, void *, struct drm_file *); +int drm_modctx(struct drm_device *, void *, struct drm_file *); +int drm_getctx(struct drm_device *, void *, struct drm_file *); +int drm_switchctx(struct drm_device *, void *, struct drm_file *); +int drm_newctx(struct drm_device *, void *, struct drm_file *); +int drm_rmctx(struct drm_device *, void *, struct drm_file *); +int drm_setsareactx(struct drm_device *, void *, struct drm_file *); +int drm_getsareactx(struct drm_device *, void *, struct drm_file *); /* Drawable IOCTL support (drm_drawable.c) */ -int drm_adddraw(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_rmdraw(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_update_draw(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_adddraw(struct drm_device *, void *, struct drm_file *); +int drm_rmdraw(struct drm_device *, void *, struct drm_file *); +int drm_update_draw(struct drm_device *, void *, struct drm_file *); void drm_drawable_free_all(struct drm_device *); -struct drm_drawable_info *drm_get_drawable_info(drm_device_t *dev, - unsigned int handle); +struct drm_drawable_info *drm_get_drawable_info(struct drm_device *, + unsigned int); /* Authentication IOCTL support (drm_auth.c) */ -int drm_getmagic(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_authmagic(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_getmagic(struct drm_device *, void *, struct drm_file *); +int drm_authmagic(struct drm_device *, void *, struct drm_file *); int drm_magic_cmp(struct drm_magic_entry *, struct drm_magic_entry *); SPLAY_PROTOTYPE(drm_magic_tree, drm_magic_entry, node, drm_magic_cmp); /* Buffer management support (drm_bufs.c) */ -int drm_addmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_rmmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_addbufs_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_infobufs(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_markbufs(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_freebufs(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_mapbufs(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_addmap_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_rmmap_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_addbufs_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_infobufs(struct drm_device *, void *, struct drm_file *); +int drm_markbufs(struct drm_device *, void *, struct drm_file *); +int drm_freebufs(struct drm_device *, void *, struct drm_file *); +int drm_mapbufs(struct drm_device *, void *, struct drm_file *); /* DMA support (drm_dma.c) */ -int drm_dma(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_dma(struct drm_device *, void *, struct drm_file *); /* IRQ support (drm_irq.c) */ -int drm_control(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_wait_vblank(drm_device_t *dev, void *data, struct drm_file *file_priv); -void drm_locked_tasklet(drm_device_t *dev, void (*tasklet)(drm_device_t *dev)); +int drm_control(struct drm_device *, void *, struct drm_file *); +int drm_wait_vblank(struct drm_device *, void *, struct drm_file *); +void drm_locked_tasklet(struct drm_device *, void (*)(struct drm_device *)); /* AGP/GART support (drm_agpsupport.c) */ -int drm_agp_acquire_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_agp_release_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_agp_enable_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_agp_info_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_agp_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_agp_free_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_agp_unbind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_agp_bind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_agp_acquire_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_agp_release_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_agp_enable_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_agp_info_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_agp_alloc_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_agp_free_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_agp_unbind_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_agp_bind_ioctl(struct drm_device *, void *, struct drm_file *); /* Scatter Gather Support (drm_scatter.c) */ -int drm_sg_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv); -int drm_sg_free(drm_device_t *dev, void *data, struct drm_file *file_priv); +int drm_sg_alloc_ioctl(struct drm_device *, void *, struct drm_file *); +int drm_sg_free(struct drm_device *, void *, struct drm_file *); /* consistent PCI memory functions (drm_pci.c) */ -drm_dma_handle_t *drm_pci_alloc(drm_device_t *dev, size_t size, size_t align, - dma_addr_t maxaddr); -void drm_pci_free(drm_device_t *dev, drm_dma_handle_t *dmah); +drm_dma_handle_t *drm_pci_alloc(struct drm_device *, size_t, size_t, + dma_addr_t); +void drm_pci_free(struct drm_device *, drm_dma_handle_t *); /* Memrange functions for managing aperture space */ struct drm_memrange_node diff --git a/sys/dev/pci/drm/drm_agpsupport.c b/sys/dev/pci/drm/drm_agpsupport.c index 556da947d24..fe5273651cc 100644 --- a/sys/dev/pci/drm/drm_agpsupport.c +++ b/sys/dev/pci/drm/drm_agpsupport.c @@ -35,19 +35,19 @@ #include "drmP.h" -int drm_device_find_capability(drm_device_t *, int); -struct drm_agp_mem *drm_agp_lookup_entry(drm_device_t *, void *); +int drm_device_find_capability(struct drm_device *, int); +struct drm_agp_mem *drm_agp_lookup_entry(struct drm_device *, void *); /* Returns 1 if AGP or 0 if not. */ int -drm_device_find_capability(drm_device_t *dev, int cap) +drm_device_find_capability(struct drm_device *dev, int cap) { return pci_get_capability(dev->pa.pa_pc, dev->pa.pa_tag, cap, NULL, NULL); } int -drm_device_is_agp(drm_device_t *dev) +drm_device_is_agp(struct drm_device *dev) { if (dev->driver.device_is_agp != NULL) { int ret; @@ -64,13 +64,13 @@ drm_device_is_agp(drm_device_t *dev) } int -drm_device_is_pcie(drm_device_t *dev) +drm_device_is_pcie(struct drm_device *dev) { return (drm_device_find_capability(dev, PCIY_EXPRESS)); } int -drm_agp_info(drm_device_t * dev, drm_agp_info_t *info) +drm_agp_info(struct drm_device * dev, drm_agp_info_t *info) { struct agp_info *kern; @@ -95,7 +95,8 @@ drm_agp_info(drm_device_t * dev, drm_agp_info_t *info) } int -drm_agp_info_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_info_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { int err; drm_agp_info_t info; @@ -109,13 +110,14 @@ drm_agp_info_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_agp_acquire_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_acquire_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { return drm_agp_acquire(dev); } int -drm_agp_acquire(drm_device_t *dev) +drm_agp_acquire(struct drm_device *dev) { #ifndef DRM_NO_AGP int retcode; @@ -133,13 +135,14 @@ drm_agp_acquire(drm_device_t *dev) } int -drm_agp_release_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_release_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { return drm_agp_release(dev); } int -drm_agp_release(drm_device_t * dev) +drm_agp_release(struct drm_device * dev) { #ifndef DRM_NO_AGP if (!dev->agp || !dev->agp->acquired) @@ -151,7 +154,7 @@ drm_agp_release(drm_device_t * dev) } int -drm_agp_enable(drm_device_t *dev, drm_agp_mode_t mode) +drm_agp_enable(struct drm_device *dev, drm_agp_mode_t mode) { #ifndef DRM_NO_AGP @@ -166,7 +169,8 @@ drm_agp_enable(drm_device_t *dev, drm_agp_mode_t mode) } int -drm_agp_enable_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_enable_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_agp_mode_t mode; @@ -176,7 +180,7 @@ drm_agp_enable_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request) +drm_agp_alloc(struct drm_device *dev, drm_agp_buffer_t *request) { #ifndef DRM_NO_AGP struct drm_agp_mem *entry; @@ -218,7 +222,8 @@ drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request) } int -drm_agp_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_alloc_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_agp_buffer_t request; int retcode; @@ -235,7 +240,7 @@ drm_agp_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } struct drm_agp_mem * -drm_agp_lookup_entry(drm_device_t *dev, void *handle) +drm_agp_lookup_entry(struct drm_device *dev, void *handle) { struct drm_agp_mem *entry; @@ -246,7 +251,7 @@ drm_agp_lookup_entry(drm_device_t *dev, void *handle) } int -drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request) +drm_agp_unbind(struct drm_device *dev, drm_agp_binding_t *request) { struct drm_agp_mem *entry; int retcode; @@ -269,7 +274,8 @@ drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request) } int -drm_agp_unbind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_unbind_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_agp_binding_t request; int retcode; @@ -284,7 +290,7 @@ drm_agp_unbind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request) +drm_agp_bind(struct drm_device *dev, drm_agp_binding_t *request) { struct drm_agp_mem *entry; int retcode; @@ -311,7 +317,8 @@ drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request) } int -drm_agp_bind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_bind_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_agp_binding_t request; int retcode; @@ -326,7 +333,7 @@ drm_agp_bind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request) +drm_agp_free(struct drm_device *dev, drm_agp_buffer_t *request) { struct drm_agp_mem *entry; @@ -352,7 +359,8 @@ drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request) } int -drm_agp_free_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_agp_free_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_agp_buffer_t request; int retcode; diff --git a/sys/dev/pci/drm/drm_auth.c b/sys/dev/pci/drm/drm_auth.c index 97466c17fad..cbe4fd88cd0 100644 --- a/sys/dev/pci/drm/drm_auth.c +++ b/sys/dev/pci/drm/drm_auth.c @@ -35,15 +35,16 @@ #include "drmP.h" -drm_file_t *drm_find_file(drm_device_t *, drm_magic_t); -int drm_add_magic(drm_device_t *, drm_file_t *, drm_magic_t); -int drm_remove_magic(drm_device_t *, drm_magic_t); +struct drm_file *drm_find_file(struct drm_device *, drm_magic_t); +int drm_add_magic(struct drm_device *, struct drm_file *, + drm_magic_t); +int drm_remove_magic(struct drm_device *, drm_magic_t); /** * Returns the file private associated with the given magic number. */ -drm_file_t * -drm_find_file(drm_device_t *dev, drm_magic_t magic) +struct drm_file * +drm_find_file(struct drm_device *dev, drm_magic_t magic) { struct drm_magic_entry *pt; struct drm_magic_entry key; @@ -61,7 +62,7 @@ drm_find_file(drm_device_t *dev, drm_magic_t magic) * lists. */ int -drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic) +drm_add_magic(struct drm_device *dev, struct drm_file *priv, drm_magic_t magic) { struct drm_magic_entry *entry; @@ -83,7 +84,7 @@ drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic) * lists. */ int -drm_remove_magic(drm_device_t *dev, drm_magic_t magic) +drm_remove_magic(struct drm_device *dev, drm_magic_t magic) { struct drm_magic_entry *pt; struct drm_magic_entry key; @@ -109,7 +110,7 @@ drm_remove_magic(drm_device_t *dev, drm_magic_t magic) * should be authenticated. */ int -drm_getmagic(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv) { static drm_magic_t sequence = 0; drm_auth_t *auth = data; @@ -142,10 +143,10 @@ drm_getmagic(drm_device_t *dev, void *data, struct drm_file *file_priv) * Marks the client associated with the given magic number as authenticated. */ int -drm_authmagic(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_authmagic(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_auth_t *auth = data; - drm_file_t *priv; + struct drm_file *priv; DRM_DEBUG("%u\n", auth->magic); diff --git a/sys/dev/pci/drm/drm_bufs.c b/sys/dev/pci/drm/drm_bufs.c index efecd388f1b..93b0548850b 100644 --- a/sys/dev/pci/drm/drm_bufs.c +++ b/sys/dev/pci/drm/drm_bufs.c @@ -37,11 +37,11 @@ #include "drmP.h" -int drm_alloc_resource(drm_device_t *, int); -void drm_cleanup_buf_error(drm_device_t *, drm_buf_entry_t *); -int drm_do_addbufs_agp(drm_device_t *, drm_buf_desc_t *); -int drm_do_addbufs_pci(drm_device_t *, drm_buf_desc_t *); -int drm_do_addbufs_sg(drm_device_t *, drm_buf_desc_t *); +int drm_alloc_resource(struct drm_device *, int); +void drm_cleanup_buf_error(struct drm_device *, drm_buf_entry_t *); +int drm_do_addbufs_agp(struct drm_device *, drm_buf_desc_t *); +int drm_do_addbufs_pci(struct drm_device *, drm_buf_desc_t *); +int drm_do_addbufs_sg(struct drm_device *, drm_buf_desc_t *); /* * Compute order. Can be made faster. @@ -65,7 +65,7 @@ drm_order(unsigned long size) * address for accessing them. Cleaned up at unload. */ int -drm_alloc_resource(drm_device_t *dev, int resource) +drm_alloc_resource(struct drm_device *dev, int resource) { if (resource >= DRM_MAX_PCI_RESOURCE) { DRM_ERROR("Resource %d too large\n", resource); @@ -90,7 +90,7 @@ drm_alloc_resource(drm_device_t *dev, int resource) unsigned long -drm_get_resource_start(drm_device_t *dev, unsigned int resource) +drm_get_resource_start(struct drm_device *dev, unsigned int resource) { if (drm_alloc_resource(dev, resource) != 0) return 0; @@ -99,7 +99,7 @@ drm_get_resource_start(drm_device_t *dev, unsigned int resource) } unsigned long -drm_get_resource_len(drm_device_t *dev, unsigned int resource) +drm_get_resource_len(struct drm_device *dev, unsigned int resource) { if (drm_alloc_resource(dev, resource) != 0) return 0; @@ -108,7 +108,7 @@ drm_get_resource_len(drm_device_t *dev, unsigned int resource) } int -drm_addmap(drm_device_t * dev, unsigned long offset, unsigned long size, +drm_addmap(struct drm_device * dev, unsigned long offset, unsigned long size, drm_map_type_t type, drm_map_flags_t flags, drm_local_map_t **map_ptr) { drm_local_map_t *map; @@ -305,7 +305,7 @@ done: } int -drm_addmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_addmap_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_map_t *request = data; drm_local_map_t *map; @@ -334,7 +334,7 @@ drm_addmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } void -drm_rmmap(drm_device_t *dev, drm_local_map_t *map) +drm_rmmap(struct drm_device *dev, drm_local_map_t *map) { DRM_SPINLOCK_ASSERT(&dev->dev_lock); @@ -377,7 +377,7 @@ drm_rmmap(drm_device_t *dev, drm_local_map_t *map) */ int -drm_rmmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_rmmap_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_local_map_t *map; drm_map_t *request = data; @@ -404,7 +404,7 @@ drm_rmmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) void -drm_cleanup_buf_error(drm_device_t *dev, drm_buf_entry_t *entry) +drm_cleanup_buf_error(struct drm_device *dev, drm_buf_entry_t *entry) { int i; @@ -428,7 +428,7 @@ drm_cleanup_buf_error(drm_device_t *dev, drm_buf_entry_t *entry) } int -drm_do_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request) +drm_do_addbufs_agp(struct drm_device *dev, drm_buf_desc_t *request) { drm_device_dma_t *dma = dev->dma; drm_buf_entry_t *entry; @@ -538,7 +538,7 @@ drm_do_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request) /* OpenBSD lacks realloc in kernel */ temp_buflist = drm_realloc(dma->buflist, dma->buf_count * sizeof(*dma->buflist), - (dma->buf_count + entry->buf_count) * sizeof(*dma->buflist), M_DRM ); + (dma->buf_count + entry->buf_count) * sizeof(*dma->buflist), M_DRM); if (temp_buflist == NULL) { /* Free the entry because it isn't valid */ drm_cleanup_buf_error(dev, entry); @@ -565,7 +565,7 @@ drm_do_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request) } int -drm_do_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request) +drm_do_addbufs_pci(struct drm_device *dev, drm_buf_desc_t *request) { drm_device_dma_t *dma = dev->dma; int count; @@ -717,7 +717,7 @@ drm_do_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request) } int -drm_do_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request) +drm_do_addbufs_sg(struct drm_device *dev, drm_buf_desc_t *request) { drm_device_dma_t *dma = dev->dma; drm_buf_entry_t *entry; @@ -829,7 +829,7 @@ drm_do_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request) } int -drm_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request) +drm_addbufs_agp(struct drm_device *dev, drm_buf_desc_t *request) { int order, ret; @@ -862,7 +862,7 @@ drm_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request) } int -drm_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request) +drm_addbufs_sg(struct drm_device *dev, drm_buf_desc_t *request) { int order, ret; @@ -895,7 +895,7 @@ drm_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request) } int -drm_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request) +drm_addbufs_pci(struct drm_device *dev, drm_buf_desc_t *request) { int order, ret; @@ -927,7 +927,8 @@ drm_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request) } int -drm_addbufs_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_addbufs_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_buf_desc_t *request = data; int err; @@ -943,7 +944,7 @@ drm_addbufs_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_infobufs(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_infobufs(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_device_dma_t *dma = dev->dma; drm_buf_info_t *request = data; @@ -993,7 +994,7 @@ drm_infobufs(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_markbufs(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_markbufs(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_device_dma_t *dma = dev->dma; drm_buf_desc_t *request = data; @@ -1024,7 +1025,7 @@ drm_markbufs(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_freebufs(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_freebufs(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_device_dma_t *dma = dev->dma; drm_buf_free_t *request = data; @@ -1062,7 +1063,7 @@ drm_freebufs(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_mapbufs(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_mapbufs(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_device_dma_t *dma = dev->dma; struct vmspace *vms; diff --git a/sys/dev/pci/drm/drm_context.c b/sys/dev/pci/drm/drm_context.c index 0813bf1907f..85ea2417626 100644 --- a/sys/dev/pci/drm/drm_context.c +++ b/sys/dev/pci/drm/drm_context.c @@ -39,7 +39,7 @@ */ void -drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle) +drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle) { if (ctx_handle < 0 || ctx_handle >= DRM_MAX_CTXBITMAP || dev->ctx_bitmap == NULL) { @@ -56,7 +56,7 @@ drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle) } int -drm_ctxbitmap_next(drm_device_t *dev) +drm_ctxbitmap_next(struct drm_device *dev) { int bit; @@ -105,7 +105,7 @@ drm_ctxbitmap_next(drm_device_t *dev) } int -drm_ctxbitmap_init(drm_device_t *dev) +drm_ctxbitmap_init(struct drm_device *dev) { int i; int temp; @@ -129,7 +129,7 @@ drm_ctxbitmap_init(drm_device_t *dev) } void -drm_ctxbitmap_cleanup(drm_device_t *dev) +drm_ctxbitmap_cleanup(struct drm_device *dev) { DRM_LOCK(); if (dev->context_sareas != NULL) @@ -143,7 +143,8 @@ drm_ctxbitmap_cleanup(drm_device_t *dev) */ int -drm_getsareactx( drm_device_t *dev, void *data, struct drm_file *file_priv ) +drm_getsareactx(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_ctx_priv_map_t *request = data; drm_local_map_t *map; @@ -164,7 +165,7 @@ drm_getsareactx( drm_device_t *dev, void *data, struct drm_file *file_priv ) } int -drm_setsareactx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_setsareactx(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_ctx_priv_map_t *request = data; drm_local_map_t *map = NULL; @@ -192,7 +193,7 @@ bad: */ int -drm_context_switch(drm_device_t *dev, int old, int new) +drm_context_switch(struct drm_device *dev, int old, int new) { if ( test_and_set_bit( 0, &dev->context_flag ) ) { DRM_ERROR( "Reentering -- FIXME\n" ); @@ -210,7 +211,7 @@ drm_context_switch(drm_device_t *dev, int old, int new) } int -drm_context_switch_complete(drm_device_t *dev, int new) +drm_context_switch_complete(struct drm_device *dev, int new) { dev->last_context = new; /* PRE/POST: This is the _only_ writer. */ @@ -227,7 +228,7 @@ drm_context_switch_complete(drm_device_t *dev, int new) } int -drm_resctx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_resctx(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_ctx_res_t *res = data; drm_ctx_t ctx; @@ -248,7 +249,7 @@ drm_resctx(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_addctx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_addctx(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_ctx_t *ctx = data; @@ -274,14 +275,14 @@ drm_addctx(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_modctx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_modctx(struct drm_device *dev, void *data, struct drm_file *file_priv) { /* This does nothing */ return 0; } int -drm_getctx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_getctx(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_ctx_t *ctx = data; @@ -292,7 +293,7 @@ drm_getctx(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_switchctx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_switchctx(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_ctx_t *ctx = data; @@ -301,7 +302,7 @@ drm_switchctx(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_newctx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_newctx(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_ctx_t *ctx = data; @@ -312,7 +313,7 @@ drm_newctx(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_rmctx(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_rmctx(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_ctx_t *ctx = data; diff --git a/sys/dev/pci/drm/drm_dma.c b/sys/dev/pci/drm/drm_dma.c index 46774b0855e..5bb024285b4 100644 --- a/sys/dev/pci/drm/drm_dma.c +++ b/sys/dev/pci/drm/drm_dma.c @@ -39,7 +39,7 @@ #include "drmP.h" int -drm_dma_setup(drm_device_t *dev) +drm_dma_setup(struct drm_device *dev) { dev->dma = malloc(sizeof(*dev->dma), M_DRM, M_NOWAIT | M_ZERO); @@ -52,7 +52,7 @@ drm_dma_setup(drm_device_t *dev) } void -drm_dma_takedown(drm_device_t *dev) +drm_dma_takedown(struct drm_device *dev) { drm_device_dma_t *dma = dev->dma; int i, j; @@ -97,7 +97,7 @@ drm_dma_takedown(drm_device_t *dev) void -drm_free_buffer(drm_device_t *dev, drm_buf_t *buf) +drm_free_buffer(struct drm_device *dev, drm_buf_t *buf) { if (!buf) return; @@ -107,7 +107,7 @@ drm_free_buffer(drm_device_t *dev, drm_buf_t *buf) } void -drm_reclaim_buffers(drm_device_t *dev, struct drm_file *file_priv) +drm_reclaim_buffers(struct drm_device *dev, struct drm_file *file_priv) { drm_device_dma_t *dma = dev->dma; int i; @@ -132,7 +132,7 @@ drm_reclaim_buffers(drm_device_t *dev, struct drm_file *file_priv) /* Call into the driver-specific DMA handler */ int -drm_dma(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_dma(struct drm_device *dev, void *data, struct drm_file *file_priv) { if (dev->driver.dma_ioctl) { diff --git a/sys/dev/pci/drm/drm_drawable.c b/sys/dev/pci/drm/drm_drawable.c index 5b8a42b7a3a..2a63b0e5219 100644 --- a/sys/dev/pci/drm/drm_drawable.c +++ b/sys/dev/pci/drm/drm_drawable.c @@ -77,7 +77,7 @@ drm_get_drawable(struct drm_device *dev, unsigned int handle) } struct drm_drawable_info * -drm_get_drawable_info(drm_device_t *dev, unsigned int handle) +drm_get_drawable_info(struct drm_device *dev, unsigned int handle) { struct bsd_drm_drawable_info *result = NULL; @@ -88,7 +88,7 @@ drm_get_drawable_info(drm_device_t *dev, unsigned int handle) } int -drm_adddraw(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_adddraw(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_draw_t *draw = data; struct bsd_drm_drawable_info *info; @@ -110,7 +110,7 @@ drm_adddraw(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_rmdraw(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_draw_t *draw = (drm_draw_t *)data; struct bsd_drm_drawable_info *info; @@ -128,7 +128,7 @@ drm_rmdraw(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_update_draw(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_update_draw(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_drawable_info *info; struct drm_update_draw *update = (struct drm_update_draw *)data; diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 98b24ffd423..3175dacaf9d 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -45,12 +45,12 @@ int drm_debug_flag = 1; int drm_debug_flag = 0; #endif -int drm_load(drm_device_t *); -void drm_unload(drm_device_t *); +int drm_load(struct drm_device *); +void drm_unload(struct drm_device *); drm_pci_id_list_t *drm_find_description(int , int , drm_pci_id_list_t *); -int drm_firstopen(drm_device_t *); -int drm_lastclose(drm_device_t *); +int drm_firstopen(struct drm_device *); +int drm_lastclose(struct drm_device *); static drm_ioctl_desc_t drm_ioctls[256] = { DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, 0), @@ -114,7 +114,7 @@ static drm_ioctl_desc_t drm_ioctls[256] = { DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_update_draw, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), }; -drm_device_t *drm_units[DRM_MAXUNITS]; +struct drm_device *drm_units[DRM_MAXUNITS]; static int init_units = 1; @@ -143,7 +143,7 @@ drm_attach(struct device *parent, struct device *kdev, struct pci_attach_args *pa, drm_pci_id_list_t *idlist) { int unit; - drm_device_t *dev; + struct drm_device *dev; drm_pci_id_list_t *id_entry; if(init_units) { @@ -157,7 +157,7 @@ drm_attach(struct device *parent, struct device *kdev, if(drm_units[unit] == NULL) break; if(unit == DRM_MAXUNITS) return; - dev = drm_units[unit] = (drm_device_t*)kdev; + dev = drm_units[unit] = (struct drm_device*)kdev; dev->unit = unit; /* needed for pci_mapreg_* */ @@ -184,7 +184,7 @@ drm_attach(struct device *parent, struct device *kdev, int drm_detach(struct device *self, int flags) { - drm_unload((drm_device_t *)self); + drm_unload((struct drm_device *)self); return 0; } @@ -218,7 +218,7 @@ drm_find_description(int vendor, int device, drm_pci_id_list_t *idlist) } int -drm_firstopen(drm_device_t *dev) +drm_firstopen(struct drm_device *dev) { drm_local_map_t *map; int i; @@ -269,7 +269,7 @@ drm_firstopen(drm_device_t *dev) } int -drm_lastclose(drm_device_t *dev) +drm_lastclose(struct drm_device *dev) { struct drm_magic_entry *pt; drm_local_map_t *map, *mapsave; @@ -341,7 +341,7 @@ drm_lastclose(drm_device_t *dev) } int -drm_load(drm_device_t *dev) +drm_load(struct drm_device *dev) { int retcode; @@ -422,7 +422,7 @@ error: } void -drm_unload(drm_device_t *dev) +drm_unload(struct drm_device *dev) { DRM_DEBUG( "\n" ); @@ -459,7 +459,7 @@ drm_unload(drm_device_t *dev) int -drm_version(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_version(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_version_t *version = data; int len; @@ -487,7 +487,7 @@ drm_version(drm_device_t *dev, void *data, struct drm_file *file_priv) int drmopen(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) { - drm_device_t *dev = NULL; + struct drm_device *dev = NULL; int retcode = 0; dev = drm_get_device_from_kdev(kdev); @@ -514,8 +514,8 @@ drmopen(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) int drmclose(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p) { - drm_device_t *dev = drm_get_device_from_kdev(kdev); - drm_file_t *file_priv; + struct drm_device *dev = drm_get_device_from_kdev(kdev); + struct drm_file *file_priv; int retcode = 0; DRM_DEBUG( "open_count = %d\n", dev->open_count ); @@ -618,13 +618,13 @@ int drmioctl(DRM_CDEV kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p) { - drm_device_t *dev = drm_get_device_from_kdev(kdev); + struct drm_device *dev = drm_get_device_from_kdev(kdev); int retcode = 0; drm_ioctl_desc_t *ioctl; - int (*func)(drm_device_t *dev, void *data, struct drm_file *file_priv); + int (*func)(struct drm_device *, void *, struct drm_file *); int nr = DRM_IOCTL_NR(cmd); int is_driver_ioctl = 0; - drm_file_t *file_priv; + struct drm_file *file_priv; if (dev == NULL) return ENODEV; @@ -707,7 +707,7 @@ drmioctl(DRM_CDEV kdev, u_long cmd, caddr_t data, int flags, } drm_local_map_t * -drm_getsarea(drm_device_t *dev) +drm_getsarea(struct drm_device *dev) { drm_local_map_t *map; diff --git a/sys/dev/pci/drm/drm_fops.c b/sys/dev/pci/drm/drm_fops.c index c83a0bf5620..4684f7a330d 100644 --- a/sys/dev/pci/drm/drm_fops.c +++ b/sys/dev/pci/drm/drm_fops.c @@ -36,10 +36,10 @@ #include "drmP.h" -drm_file_t * +struct drm_file * drm_find_file_by_minor(struct drm_device *dev, int minor) { - drm_file_t *priv; + struct drm_file *priv; DRM_SPINLOCK_ASSERT(&dev->dev_lock); @@ -52,9 +52,9 @@ drm_find_file_by_minor(struct drm_device *dev, int minor) /* drm_open_helper is called whenever a process opens /dev/drm. */ int drm_open_helper(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTPROC *p, - drm_device_t *dev) + struct drm_device *dev) { - drm_file_t *priv; + struct drm_file *priv; int m, retcode; m = minor(kdev); diff --git a/sys/dev/pci/drm/drm_ioctl.c b/sys/dev/pci/drm/drm_ioctl.c index 2750517eb08..7f6b719154d 100644 --- a/sys/dev/pci/drm/drm_ioctl.c +++ b/sys/dev/pci/drm/drm_ioctl.c @@ -35,7 +35,7 @@ #include "drmP.h" -int drm_set_busid(drm_device_t *); +int drm_set_busid(struct drm_device *); /* * Beginning in revision 1.1 of the DRM interface, getunique will return @@ -44,7 +44,7 @@ int drm_set_busid(drm_device_t *); * the unique is not defined for any other bus. */ int -drm_getunique(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_getunique(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_unique_t *u = data; @@ -61,7 +61,7 @@ drm_getunique(drm_device_t *dev, void *data, struct drm_file *file_priv) * requested version 1.1 or greater. */ int -drm_setunique(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_setunique(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_unique_t *u = data; int domain, bus, slot, func, ret; @@ -122,7 +122,7 @@ drm_setunique(drm_device_t *dev, void *data, struct drm_file *file_priv) int -drm_set_busid(drm_device_t *dev) +drm_set_busid(struct drm_device *dev) { DRM_LOCK(); @@ -148,7 +148,7 @@ drm_set_busid(drm_device_t *dev) } int -drm_getmap(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_getmap(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_map_t *map = data; drm_local_map_t *mapinlist; @@ -185,12 +185,12 @@ drm_getmap(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_getclient(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_getclient(struct drm_device *dev, void *data, struct drm_file *file_priv) { - drm_client_t *client = data; - drm_file_t *pt; - int idx; - int i = 0; + drm_client_t *client = data; + struct drm_file *pt; + int idx; + int i = 0; idx = client->idx; DRM_LOCK(); @@ -213,7 +213,7 @@ drm_getclient(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_getstats(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_getstats(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_stats_t *stats = data; int i; @@ -243,7 +243,7 @@ drm_getstats(drm_device_t *dev, void *data, struct drm_file *file_priv) #define DRM_IF_MINOR 2 int -drm_setversion(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_setversion(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_set_version_t *sv = data; drm_set_version_t ver; @@ -288,7 +288,7 @@ drm_setversion(drm_device_t *dev, void *data, struct drm_file *file_priv) int -drm_noop(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_noop(struct drm_device *dev, void *data, struct drm_file *file_priv) { DRM_DEBUG("\n"); return 0; diff --git a/sys/dev/pci/drm/drm_irq.c b/sys/dev/pci/drm/drm_irq.c index 721a44893d6..76477a1a8ff 100644 --- a/sys/dev/pci/drm/drm_irq.c +++ b/sys/dev/pci/drm/drm_irq.c @@ -40,7 +40,7 @@ void vblank_disable(void *); void drm_locked_task(void *context, void *pending); int -drm_irq_by_busid(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_irq_by_busid(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_irq_busid_t *irq = data; @@ -62,7 +62,7 @@ irqreturn_t drm_irq_handler_wrap(DRM_IRQ_ARGS) { irqreturn_t ret; - drm_device_t *dev = (drm_device_t *)arg; + struct drm_device *dev = (struct drm_device *)arg; DRM_SPINLOCK(&dev->irq_lock); ret = dev->driver.irq_handler(arg); @@ -72,7 +72,7 @@ drm_irq_handler_wrap(DRM_IRQ_ARGS) } int -drm_irq_install(drm_device_t *dev) +drm_irq_install(struct drm_device *dev) { int retcode; pci_intr_handle_t ih; @@ -128,7 +128,7 @@ err: } int -drm_irq_uninstall(drm_device_t *dev) +drm_irq_uninstall(struct drm_device *dev) { if (!dev->irq_enabled) @@ -149,7 +149,7 @@ drm_irq_uninstall(drm_device_t *dev) } int -drm_control(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_control(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_control_t *ctl = data; int err; @@ -391,7 +391,7 @@ out: } int -drm_wait_vblank(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_wait_vblank_t *vblwait = data; int ret, flags, crtc, seq; @@ -477,13 +477,13 @@ drm_wait_vblank(drm_device_t *dev, void *data, struct drm_file *file_priv) } void -drm_vbl_send_signals(drm_device_t *dev, int crtc) +drm_vbl_send_signals(struct drm_device *dev, int crtc) { } #if 0 /* disabled */ void -drm_vbl_send_signals(drm_device_t *dev, int crtc) +drm_vbl_send_signals(struct drm_device *dev, int crtc) { drm_vbl_sig_t *vbl_sig; unsigned int vbl_seq = atomic_read( &dev->vbl_received ); @@ -517,7 +517,7 @@ drm_handle_vblank(struct drm_device *dev, int crtc) void drm_locked_task(void *context, void *pending) { - drm_device_t *dev = context; + struct drm_device *dev = context; DRM_LOCK(); for (;;) { @@ -548,7 +548,7 @@ drm_locked_task(void *context, void *pending) } void -drm_locked_tasklet(drm_device_t *dev, void (*tasklet)(drm_device_t *dev)) +drm_locked_tasklet(struct drm_device *dev, void (*tasklet)(struct drm_device *)) { dev->locked_task_call = tasklet; if (workq_add_task(NULL, 0, drm_locked_task, dev, NULL) == ENOMEM) diff --git a/sys/dev/pci/drm/drm_lock.c b/sys/dev/pci/drm/drm_lock.c index 798d813b0d5..69a832387b1 100644 --- a/sys/dev/pci/drm/drm_lock.c +++ b/sys/dev/pci/drm/drm_lock.c @@ -79,7 +79,7 @@ drm_lock_take(__volatile__ unsigned int *lock, unsigned int context) /* This takes a lock forcibly and hands it to context. Should ONLY be used inside *_unlock to give lock to kernel before calling *_dma_schedule. */ int -drm_lock_transfer(drm_device_t *dev, __volatile__ unsigned int *lock, +drm_lock_transfer(struct drm_device *dev, __volatile__ unsigned int *lock, unsigned int context) { unsigned int old, new; @@ -94,7 +94,7 @@ drm_lock_transfer(drm_device_t *dev, __volatile__ unsigned int *lock, } int -drm_lock_free(drm_device_t *dev, __volatile__ unsigned int *lock, +drm_lock_free(struct drm_device *dev, __volatile__ unsigned int *lock, unsigned int context) { unsigned int old, new; @@ -115,7 +115,7 @@ drm_lock_free(drm_device_t *dev, __volatile__ unsigned int *lock, } int -drm_lock(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_lock_t *lock = data; int ret = 0; @@ -164,7 +164,7 @@ drm_lock(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_unlock(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_lock_t *lock = data; diff --git a/sys/dev/pci/drm/drm_memory.c b/sys/dev/pci/drm/drm_memory.c index 8562b83068e..c727da1202b 100644 --- a/sys/dev/pci/drm/drm_memory.c +++ b/sys/dev/pci/drm/drm_memory.c @@ -83,7 +83,7 @@ drm_free(void *pt, size_t size, int area) } void * -drm_ioremap(drm_device_t *dev, drm_local_map_t *map) +drm_ioremap(struct drm_device *dev, drm_local_map_t *map) { struct vga_pci_bar *bar = NULL; int i; diff --git a/sys/dev/pci/drm/drm_pci.c b/sys/dev/pci/drm/drm_pci.c index c988c7917e8..61b53edf3dc 100644 --- a/sys/dev/pci/drm/drm_pci.c +++ b/sys/dev/pci/drm/drm_pci.c @@ -39,7 +39,8 @@ * memory block. */ drm_dma_handle_t * -drm_pci_alloc(drm_device_t *dev, size_t size, size_t align, dma_addr_t maxaddr) +drm_pci_alloc(struct drm_device *dev, size_t size, size_t align, + dma_addr_t maxaddr) { drm_dma_handle_t *dmah; int ret, nsegs; @@ -104,7 +105,7 @@ dmahfree: * \brief Free a DMA-accessible consistent memory block. */ void -drm_pci_free(drm_device_t *dev, drm_dma_handle_t *dmah) +drm_pci_free(struct drm_device *dev, drm_dma_handle_t *dmah) { if (dmah == NULL) return; diff --git a/sys/dev/pci/drm/drm_scatter.c b/sys/dev/pci/drm/drm_scatter.c index fd594c9c3b7..6a6c81095ac 100644 --- a/sys/dev/pci/drm/drm_scatter.c +++ b/sys/dev/pci/drm/drm_scatter.c @@ -35,7 +35,7 @@ */ #include "drmP.h" -struct drm_sg_dmamem *drm_sg_dmamem_alloc(drm_device_t *, size_t); +struct drm_sg_dmamem *drm_sg_dmamem_alloc(struct drm_device *, size_t); void drm_sg_dmamem_free(struct drm_sg_dmamem *); void @@ -53,7 +53,7 @@ drm_sg_cleanup(drm_sg_mem_t *entry) } int -drm_sg_alloc(drm_device_t * dev, drm_scatter_gather_t * request) +drm_sg_alloc(struct drm_device * dev, drm_scatter_gather_t * request) { drm_sg_mem_t *entry; unsigned long pages; @@ -106,7 +106,8 @@ drm_sg_alloc(drm_device_t * dev, drm_scatter_gather_t * request) } int -drm_sg_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_sg_alloc_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_scatter_gather_t *request = data; int ret; @@ -118,7 +119,7 @@ drm_sg_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv) } int -drm_sg_free(drm_device_t *dev, void *data, struct drm_file *file_priv) +drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_scatter_gather_t *request = data; drm_sg_mem_t *entry; @@ -143,7 +144,7 @@ drm_sg_free(drm_device_t *dev, void *data, struct drm_file *file_priv) * scatter/gather */ struct drm_sg_dmamem* -drm_sg_dmamem_alloc(drm_device_t *dev, size_t pages) +drm_sg_dmamem_alloc(struct drm_device *dev, size_t pages) { struct drm_sg_dmamem *dsd = NULL; bus_size_t size = pages << PAGE_SHIFT; diff --git a/sys/dev/pci/drm/drm_vm.c b/sys/dev/pci/drm/drm_vm.c index dae0b059307..b24d8db1a80 100644 --- a/sys/dev/pci/drm/drm_vm.c +++ b/sys/dev/pci/drm/drm_vm.c @@ -31,9 +31,9 @@ paddr_t drmmmap(dev_t kdev, off_t offset, int prot) { - drm_device_t *dev = drm_get_device_from_kdev(kdev); + struct drm_device *dev = drm_get_device_from_kdev(kdev); drm_local_map_t *map; - drm_file_t *priv; + struct drm_file *priv; drm_map_type_t type; paddr_t phys; diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 2943a860e6d..191f3105124 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -35,7 +35,7 @@ #include "i915_drv.h" #include "drm_pciids.h" -void i915_configure(drm_device_t *); +void i915_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t i915_pciidlist[] = { @@ -43,7 +43,7 @@ static drm_pci_id_list_t i915_pciidlist[] = { }; void -i915_configure(drm_device_t *dev) +i915_configure(struct drm_device *dev) { dev->driver.buf_priv_size = 1; /* No dev_priv */ dev->driver.load = i915_driver_load; @@ -85,9 +85,9 @@ i915_probe(device_t dev) static int i915_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); i915_configure(dev); return drm_attach(nbdev, i915_pciidlist); } @@ -108,7 +108,7 @@ static driver_t i915_driver = { "drmsub", #endif i915_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -138,7 +138,7 @@ void i915drm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; i915_configure(dev); @@ -147,7 +147,7 @@ i915drm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach inteldrm_ca = { - sizeof(drm_device_t), i915drm_probe, i915drm_attach, + sizeof(struct drm_device), i915drm_probe, i915drm_attach, drm_detach, drm_activate }; @@ -159,7 +159,7 @@ struct cfdriver inteldrm_cd = { #ifdef _LKM CFDRIVER_DECL(i915drm, DV_TTY, NULL); #else -CFATTACH_DECL(i915drm, sizeof(drm_device_t), i915drm_probe, i915drm_attach, +CFATTACH_DECL(i915drm, sizeof(struct drm_device), i915drm_probe, i915drm_attach, drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/mach64_drv.c b/sys/dev/pci/drm/mach64_drv.c index ef2ed7a21ef..085a0de16bc 100644 --- a/sys/dev/pci/drm/mach64_drv.c +++ b/sys/dev/pci/drm/mach64_drv.c @@ -39,7 +39,7 @@ #include "mach64_drv.h" #include "drm_pciids.h" -void mach64_configure(drm_device_t *); +void mach64_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t mach64_pciidlist[] = { @@ -47,7 +47,7 @@ static drm_pci_id_list_t mach64_pciidlist[] = { }; void -mach64_configure(drm_device_t *dev) +mach64_configure(struct drm_device *dev) { dev->driver.buf_priv_size = 1; /* No dev_priv */ dev->driver.lastclose = mach64_driver_lastclose; @@ -88,9 +88,9 @@ mach64_probe(device_t dev) static int mach64_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); mach64_configure(dev); return drm_attach(nbdev, mach64_pciidlist); } @@ -107,7 +107,7 @@ static device_method_t mach64_methods[] = { static driver_t mach64_driver = { "drm", mach64_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -137,7 +137,7 @@ void mach64drm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; mach64_configure(dev); return drm_attach(parent, self, pa, mach64_pciidlist); @@ -145,7 +145,7 @@ mach64drm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach machdrm_ca = { - sizeof(drm_device_t), mach64drm_probe, mach64drm_attach, + sizeof(struct drm_device), mach64drm_probe, mach64drm_attach, drm_detach, drm_activate }; @@ -156,8 +156,8 @@ struct cfdriver machdrm_cd = { #ifdef _LKM CFDRIVER_DECL(mach64drm, DV_TTY, NULL); #else -CFATTACH_DECL(mach64drm, sizeof(drm_device_t), mach64drm_probe, mach64drm_attach, - drm_detach, drm_activate); +CFATTACH_DECL(mach64drm, sizeof(struct drm_device), mach64drm_probe, + mach64drm_attach, drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/mga_drv.c b/sys/dev/pci/drm/mga_drv.c index c3029c1ea19..c1de2ae714b 100644 --- a/sys/dev/pci/drm/mga_drv.c +++ b/sys/dev/pci/drm/mga_drv.c @@ -37,8 +37,8 @@ #include "mga_drv.h" #include "drm_pciids.h" -int mga_driver_device_is_agp(drm_device_t * ); -void mga_configure(drm_device_t *); +int mga_driver_device_is_agp(struct drm_device * ); +void mga_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t mga_pciidlist[] = { @@ -63,7 +63,7 @@ static drm_pci_id_list_t mga_pciidlist[] = { * linux-core/mga_drv.c shows what needs to be done. */ int -mga_driver_device_is_agp(drm_device_t * dev) +mga_driver_device_is_agp(struct drm_device * dev) { #ifdef __FreeBSD__ device_t bus; @@ -92,7 +92,7 @@ mga_driver_device_is_agp(drm_device_t * dev) } void -mga_configure(drm_device_t *dev) +mga_configure(struct drm_device *dev) { dev->driver.buf_priv_size = sizeof(drm_mga_buf_priv_t); dev->driver.load = mga_driver_load; @@ -139,9 +139,9 @@ mga_probe(device_t dev) static int mga_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); mga_configure(dev); return drm_attach(nbdev, mga_pciidlist); } @@ -158,7 +158,7 @@ static device_method_t mga_methods[] = { static driver_t mga_driver = { "drm", mga_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -187,7 +187,7 @@ void mgadrm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; mga_configure(dev); return drm_attach(parent, self, pa, mga_pciidlist); @@ -195,7 +195,7 @@ mgadrm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach mgadrm_ca = { - sizeof(drm_device_t), mgadrm_probe, mgadrm_attach, + sizeof(struct drm_device), mgadrm_probe, mgadrm_attach, drm_detach, drm_activate }; @@ -206,8 +206,8 @@ struct cfdriver mgadrm_cd = { #ifdef _LKM CFDRIVER_DECL(mgadrm, DV_TTY, NULL); #else -CFATTACH_DECL(mgadrm, sizeof(drm_device_t), mgadrm_probe, mgadrm_attach, drm_detach, - drm_activate); +CFATTACH_DECL(mgadrm, sizeof(struct drm_device), mgadrm_probe, mgadrm_attach, + drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/r128_drv.c b/sys/dev/pci/drm/r128_drv.c index 6f431f2a4c0..2942e8ad5c2 100644 --- a/sys/dev/pci/drm/r128_drv.c +++ b/sys/dev/pci/drm/r128_drv.c @@ -37,7 +37,7 @@ #include "r128_drv.h" #include "drm_pciids.h" -void r128_configure(drm_device_t *); +void r128_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t r128_pciidlist[] = { @@ -45,7 +45,7 @@ static drm_pci_id_list_t r128_pciidlist[] = { }; void -r128_configure(drm_device_t *dev) +r128_configure(struct drm_device *dev) { dev->driver.buf_priv_size = sizeof(drm_r128_buf_priv_t); dev->driver.preclose = r128_driver_preclose; @@ -88,9 +88,9 @@ r128_probe(device_t dev) static int r128_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); r128_configure(dev); return drm_attach(nbdev, r128_pciidlist); } @@ -107,7 +107,7 @@ static device_method_t r128_methods[] = { static driver_t r128_driver = { "drm", r128_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -137,7 +137,7 @@ void r128drm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; r128_configure(dev); return drm_attach(parent, self, pa, r128_pciidlist); @@ -145,7 +145,7 @@ r128drm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach ragedrm_ca = { - sizeof(drm_device_t), r128drm_probe, r128drm_attach, + sizeof(struct drm_device), r128drm_probe, r128drm_attach, drm_detach, drm_activate }; @@ -156,7 +156,7 @@ struct cfdriver ragedrm_cd = { #ifdef _LKM CFDRIVER_DECL(r128drm, DV_TTY, NULL); #else -CFATTACH_DECL(r128drm, sizeof(drm_device_t), r128drm_probe, r128drm_attach, +CFATTACH_DECL(r128drm, sizeof(struct drm_device), r128drm_probe, r128drm_attach, drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/radeon_drv.c b/sys/dev/pci/drm/radeon_drv.c index 1f1819ca383..a98239cbac2 100644 --- a/sys/dev/pci/drm/radeon_drv.c +++ b/sys/dev/pci/drm/radeon_drv.c @@ -35,7 +35,7 @@ #include "radeon_drv.h" #include "drm_pciids.h" -void radeon_configure(drm_device_t *); +void radeon_configure(struct drm_device *); int radeon_no_wb; @@ -45,7 +45,7 @@ static drm_pci_id_list_t radeon_pciidlist[] = { }; void -radeon_configure(drm_device_t *dev) +radeon_configure(struct drm_device *dev) { dev->driver.buf_priv_size = sizeof(drm_radeon_buf_priv_t); dev->driver.load = radeon_driver_load; @@ -93,9 +93,9 @@ radeon_probe(device_t dev) static int radeon_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); radeon_configure(dev); return drm_attach(nbdev, radeon_pciidlist); } @@ -112,7 +112,7 @@ static device_method_t radeon_methods[] = { static driver_t radeon_driver = { "drm", radeon_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -142,7 +142,7 @@ void radeondrm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; radeon_configure(dev); return drm_attach(parent, self, pa, radeon_pciidlist); @@ -150,7 +150,7 @@ radeondrm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach radeondrm_ca = { - sizeof (drm_device_t), radeondrm_probe, radeondrm_attach, + sizeof (struct drm_device), radeondrm_probe, radeondrm_attach, drm_detach, drm_activate }; @@ -161,8 +161,8 @@ struct cfdriver radeondrm_cd = { #ifdef _LKM CFDRIVER_DECL(radeondrm, DV_TTY, NULL); #else -CFATTACH_DECL(radeondrm, sizeof(drm_device_t), radeondrm_probe, radeondrm_attach, - drm_detach, drm_activate); +CFATTACH_DECL(radeondrm, sizeof(struct drm_device), radeondrm_probe, + radeondrm_attach, drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/savage_drv.c b/sys/dev/pci/drm/savage_drv.c index 585fe9a9538..5beab274b57 100644 --- a/sys/dev/pci/drm/savage_drv.c +++ b/sys/dev/pci/drm/savage_drv.c @@ -32,7 +32,7 @@ #include "savage_drv.h" #include "drm_pciids.h" -void savage_configure(drm_device_t *); +void savage_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t savage_pciidlist[] = { @@ -40,7 +40,7 @@ static drm_pci_id_list_t savage_pciidlist[] = { }; void -savage_configure(drm_device_t *dev) +savage_configure(struct drm_device *dev) { dev->driver.buf_priv_size = sizeof(drm_savage_buf_priv_t); dev->driver.load = savage_driver_load; @@ -76,9 +76,9 @@ savage_probe(device_t dev) static int savage_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); savage_configure(dev); return drm_attach(nbdev, savage_pciidlist); } @@ -95,7 +95,7 @@ static device_method_t savage_methods[] = { static driver_t savage_driver = { "drm", savage_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -125,7 +125,7 @@ void savagedrm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; savage_configure(dev); return drm_attach(parent, self, pa, savage_pciidlist); @@ -133,7 +133,7 @@ savagedrm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach savagedrm_ca = { - sizeof(drm_device_t), savagedrm_probe, savagedrm_attach, + sizeof(struct drm_device), savagedrm_probe, savagedrm_attach, drm_detach, drm_activate }; @@ -144,8 +144,8 @@ struct cfdriver savagedrm_cd = { #ifdef _LKM CFDRIVER_DECL(savagedrm, DV_TTY, NULL); #else -CFATTACH_DECL(savagedrm, sizeof(drm_device_t), savagedrm_probe, savagedrm_attach, - drm_detach, drm_activate); +CFATTACH_DECL(savagedrm, sizeof(struct drm_device), savagedrm_probe, + savagedrm_attach, drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/sis_drv.c b/sys/dev/pci/drm/sis_drv.c index 072e1afdd0d..ccf9248d0aa 100644 --- a/sys/dev/pci/drm/sis_drv.c +++ b/sys/dev/pci/drm/sis_drv.c @@ -31,7 +31,7 @@ #include "sis_drv.h" #include "drm_pciids.h" -void sis_configure(drm_device_t *); +void sis_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t sis_pciidlist[] = { @@ -39,7 +39,7 @@ static drm_pci_id_list_t sis_pciidlist[] = { }; void -sis_configure(drm_device_t *dev) +sis_configure(struct drm_device *dev) { dev->driver.buf_priv_size = 1; /* No dev_priv */ dev->driver.context_ctor = sis_init_context; @@ -69,9 +69,9 @@ sis_probe(device_t dev) static int sis_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); sis_configure(dev); return drm_attach(nbdev, sis_pciidlist); } @@ -88,7 +88,7 @@ static device_method_t sis_methods[] = { static driver_t sis_driver = { "drm", sis_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -118,7 +118,7 @@ void sisdrm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; sis_configure(dev); return drm_attach(parent, self, pa, sis_pciidlist); @@ -126,7 +126,7 @@ sisdrm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach sisdrm_ca = { - sizeof(drm_device_t), sisdrm_probe, sisdrm_attach, + sizeof(struct drm_device), sisdrm_probe, sisdrm_attach, drm_detach, drm_activate }; @@ -137,7 +137,7 @@ struct cfdriver sisdrm_cd = { #ifdef _LKM CFDRIVER_DECL(sisdrm, DV_TTY, NULL); #else -CFATTACH_DECL(sisdrm, sizeof(drm_device_t), sisdrm_probe, sisdrm_attach, +CFATTACH_DECL(sisdrm, sizeof(struct drm_device), sisdrm_probe, sisdrm_attach, drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/tdfx_drv.c b/sys/dev/pci/drm/tdfx_drv.c index 37bf6075c16..0152b1898fd 100644 --- a/sys/dev/pci/drm/tdfx_drv.c +++ b/sys/dev/pci/drm/tdfx_drv.c @@ -36,7 +36,7 @@ #include "drmP.h" #include "drm_pciids.h" -void tdfx_configure(drm_device_t *); +void tdfx_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t tdfx_pciidlist[] = { @@ -44,7 +44,7 @@ static drm_pci_id_list_t tdfx_pciidlist[] = { }; void -tdfx_configure(drm_device_t *dev) +tdfx_configure(struct drm_device *dev) { dev->driver.buf_priv_size = 1; /* No dev_priv */ @@ -70,9 +70,9 @@ tdfx_probe(device_t dev) static int tdfx_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); tdfx_configure(dev); return drm_attach(nbdev, tdfx_pciidlist); } @@ -89,7 +89,7 @@ static device_method_t tdfx_methods[] = { static driver_t tdfx_driver = { "drm", tdfx_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -119,7 +119,7 @@ void tdfxdrm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; tdfx_configure(dev); return drm_attach(parent, self, pa, tdfx_pciidlist); @@ -127,7 +127,7 @@ tdfxdrm_attach(struct device *parent, struct device *self, void *aux) #if defined(__OpenBSD__) struct cfattach tdfxdrm_ca = { - sizeof(drm_device_t), tdfxdrm_probe, tdfxdrm_attach, + sizeof(struct drm_device), tdfxdrm_probe, tdfxdrm_attach, drm_detach, drm_activate }; @@ -138,8 +138,8 @@ struct cfdriver tdfxdrm_cd = { #ifdef _LKM CFDRIVER_DECL(tdfxdrm, DV_TTY, NULL); #else -CFATTACH_DECL(tdfxdrm, sizeof(drm_device_t), tdfxdrm_probe, tdfxdrm_attach, drm_detach, - drm_activate); +CFATTACH_DECL(tdfxdrm, sizeof(struct drm_device), tdfxdrm_probe, tdfxdrm_attach, + drm_detach, drm_activate); #endif #endif diff --git a/sys/dev/pci/drm/via_drv.c b/sys/dev/pci/drm/via_drv.c index 5f3a004c4f4..09b179013ce 100644 --- a/sys/dev/pci/drm/via_drv.c +++ b/sys/dev/pci/drm/via_drv.c @@ -34,7 +34,7 @@ #include "via_drv.h" #include "drm_pciids.h" -void via_configure(drm_device_t *); +void via_configure(struct drm_device *); /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t via_pciidlist[] = { @@ -42,7 +42,7 @@ static drm_pci_id_list_t via_pciidlist[] = { }; void -via_configure(drm_device_t *dev) +via_configure(struct drm_device *dev) { dev->driver.buf_priv_size = 1; dev->driver.load = via_driver_load; @@ -84,9 +84,9 @@ via_probe(device_t dev) static int via_attach(device_t nbdev) { - drm_device_t *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(nbdev); - bzero(dev, sizeof(drm_device_t)); + bzero(dev, sizeof(struct drm_device)); via_configure(dev); return drm_attach(nbdev, via_pciidlist); } @@ -103,7 +103,7 @@ static device_method_t via_methods[] = { static driver_t via_driver = { "drm", via_methods, - sizeof(drm_device_t) + sizeof(struct drm_device) }; extern devclass_t drm_devclass; @@ -129,7 +129,7 @@ void viadrm_attach(struct device *parent, struct device *self, void *opaque) { struct pci_attach_args *pa = opaque; - drm_device_t *dev = (drm_device_t *)self; + struct drm_device *dev = (struct drm_device *)self; viadrm_configure(dev); drm_attach(parent, self, pa, via_pciidlist); @@ -137,7 +137,7 @@ viadrm_attach(struct device *parent, struct device *self, void *opaque) #if defined(__OpenBSD__) struct cfattach viadrm_ca = { - sizeof(drm_device_t), viadrm_probe, viadrm_attach, + sizeof(struct drm_device), viadrm_probe, viadrm_attach, drm_detach, drm_activate }; @@ -148,7 +148,7 @@ struct cfdriver viadrm_cd = { #ifdef _LKM CFDRIVER_DECL(viadrm, DV_TTY, NULL); #else -CFATTACH_DECL(viadrm, sizeof(drm_device_t), viadrm_probe, viadrm_attach, +CFATTACH_DECL(viadrm, sizeof(struct drm_device), viadrm_probe, viadrm_attach, drm_detach, drm_activate); #endif #endif |