[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.
parent
49075b678f
commit
ad8eb0ed01
|
@ -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;
|
||||
|
@ -94,7 +95,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" );
|
||||
|
|
280
bsd-core/drmP.h
280
bsd-core/drmP.h
|
@ -36,7 +36,7 @@
|
|||
|
||||
#if defined(_KERNEL) || defined(__KERNEL__)
|
||||
|
||||
typedef struct drm_device drm_device_t;
|
||||
struct drm_device;
|
||||
typedef struct drm_file drm_file_t;
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -265,7 +265,7 @@ enum {
|
|||
#define DRM_MTRR_WC MTRR_TYPE_WC
|
||||
#define jiffies hardclock_ticks
|
||||
|
||||
typedef drm_device_t *device_t;
|
||||
typedef struct drm_device *device_t;
|
||||
extern struct cfdriver drm_cd;
|
||||
#endif /* !__FreeBSD__ */
|
||||
|
||||
|
@ -430,7 +430,8 @@ typedef struct drm_pci_id_list
|
|||
#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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int flags;
|
||||
} drm_ioctl_desc_t;
|
||||
/**
|
||||
|
@ -528,7 +529,8 @@ 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
|
||||
/* 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
|
||||
|
@ -633,7 +635,8 @@ struct drm_driver_info {
|
|||
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);
|
||||
int (*dma_ioctl)(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
void (*dma_ready)(struct drm_device *);
|
||||
int (*dma_quiescent)(struct drm_device *);
|
||||
int (*dma_flush_block_and_flush)(struct drm_device *, int context,
|
||||
|
@ -645,12 +648,12 @@ struct drm_driver_info {
|
|||
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);
|
||||
void (*irq_postinstall)(drm_device_t *dev);
|
||||
void (*irq_uninstall)(drm_device_t *dev);
|
||||
void (*irq_preinstall)(struct drm_device *dev);
|
||||
void (*irq_postinstall)(struct drm_device *dev);
|
||||
void (*irq_uninstall)(struct drm_device *dev);
|
||||
void (*irq_handler)(DRM_IRQ_ARGS);
|
||||
int (*vblank_wait)(drm_device_t *dev, unsigned int *sequence);
|
||||
int (*vblank_wait2)(drm_device_t *dev, unsigned int *sequence);
|
||||
int (*vblank_wait)(struct drm_device *dev, unsigned int *sequence);
|
||||
int (*vblank_wait2)(struct drm_device *dev, unsigned int *sequence);
|
||||
|
||||
drm_pci_id_list_t *id_entry; /* PCI ID, name, and chipset private */
|
||||
|
||||
|
@ -797,7 +800,7 @@ struct drm_device {
|
|||
RB_HEAD(drawable_tree, bsd_drm_drawable_info) drw_head;
|
||||
|
||||
struct task locked_task;
|
||||
void (*locked_task_call)(drm_device_t *dev);
|
||||
void (*locked_task_call)(struct drm_device *dev);
|
||||
};
|
||||
|
||||
extern int drm_debug_flag;
|
||||
|
@ -823,18 +826,20 @@ dev_type_read(drm_read);
|
|||
dev_type_poll(drm_poll);
|
||||
dev_type_mmap(drm_mmap);
|
||||
#endif
|
||||
extern drm_local_map_t *drm_getsarea(drm_device_t *dev);
|
||||
extern drm_local_map_t *drm_getsarea(struct drm_device *dev);
|
||||
|
||||
/* File operations helpers (drm_fops.c) */
|
||||
#ifdef __FreeBSD__
|
||||
extern int drm_open_helper(struct cdev *kdev, int flags, int fmt,
|
||||
DRM_STRUCTPROC *p, drm_device_t *dev);
|
||||
extern drm_file_t *drm_find_file_by_proc(drm_device_t *dev,
|
||||
DRM_STRUCTPROC *p,
|
||||
struct drm_device *dev);
|
||||
extern drm_file_t *drm_find_file_by_proc(struct drm_device *dev,
|
||||
DRM_STRUCTPROC *p);
|
||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
extern int drm_open_helper(dev_t kdev, int flags, int fmt,
|
||||
DRM_STRUCTPROC *p, drm_device_t *dev);
|
||||
extern drm_file_t *drm_find_file_by_proc(drm_device_t *dev,
|
||||
DRM_STRUCTPROC *p,
|
||||
struct drm_device *dev);
|
||||
extern drm_file_t *drm_find_file_by_proc(struct drm_device *dev,
|
||||
DRM_STRUCTPROC *p);
|
||||
#endif /* __NetBSD__ || __OpenBSD__ */
|
||||
|
||||
|
@ -846,176 +851,227 @@ 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_ioremap(struct drm_device *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_context_switch(struct drm_device *dev, int old, int new);
|
||||
int drm_context_switch_complete(struct drm_device *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);
|
||||
int drm_ctxbitmap_init(struct drm_device *dev);
|
||||
void drm_ctxbitmap_cleanup(struct drm_device *dev);
|
||||
void drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle);
|
||||
int drm_ctxbitmap_next(struct drm_device *dev);
|
||||
|
||||
/* 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,
|
||||
int drm_lock_transfer(struct drm_device *dev,
|
||||
__volatile__ unsigned int *lock,
|
||||
unsigned int context);
|
||||
int drm_lock_free(drm_device_t *dev,
|
||||
int drm_lock_free(struct drm_device *dev,
|
||||
__volatile__ unsigned int *lock,
|
||||
unsigned int context);
|
||||
|
||||
/* 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);
|
||||
unsigned long drm_get_resource_start(struct drm_device *dev,
|
||||
unsigned int resource);
|
||||
unsigned long drm_get_resource_len(struct drm_device *dev,
|
||||
unsigned int resource);
|
||||
void drm_rmmap(struct drm_device *dev, drm_local_map_t *map);
|
||||
int drm_order(unsigned long size);
|
||||
int drm_addmap(drm_device_t * dev, unsigned long offset, unsigned long size,
|
||||
int 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);
|
||||
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_addbufs_pci(struct drm_device *dev, drm_buf_desc_t *request);
|
||||
int drm_addbufs_sg(struct drm_device *dev, drm_buf_desc_t *request);
|
||||
int drm_addbufs_agp(struct drm_device *dev, drm_buf_desc_t *request);
|
||||
|
||||
/* 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 *dev);
|
||||
void drm_dma_takedown(struct drm_device *dev);
|
||||
void drm_free_buffer(struct drm_device *dev, drm_buf_t *buf);
|
||||
void drm_reclaim_buffers(struct drm_device *dev, struct drm_file *file_priv);
|
||||
#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 *dev);
|
||||
int drm_irq_uninstall(struct drm_device *dev);
|
||||
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);
|
||||
int drm_vblank_wait(drm_device_t *dev, unsigned int *vbl_seq);
|
||||
void drm_vbl_send_signals(drm_device_t *dev);
|
||||
void drm_driver_irq_preinstall(struct drm_device *dev);
|
||||
void drm_driver_irq_postinstall(struct drm_device *dev);
|
||||
void drm_driver_irq_uninstall(struct drm_device *dev);
|
||||
int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
|
||||
void drm_vbl_send_signals(struct drm_device *dev);
|
||||
|
||||
/* 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 *dev);
|
||||
int drm_device_is_pcie(struct drm_device *dev);
|
||||
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);
|
||||
int drm_agp_acquire(struct drm_device *dev);
|
||||
int drm_agp_release(struct drm_device *dev);
|
||||
int drm_agp_info(struct drm_device * dev, drm_agp_info_t *info);
|
||||
int drm_agp_enable(struct drm_device *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_alloc(struct drm_device *dev, drm_agp_buffer_t *request);
|
||||
int drm_agp_free(struct drm_device *dev, drm_agp_buffer_t *request);
|
||||
int drm_agp_bind(struct drm_device *dev, drm_agp_binding_t *request);
|
||||
int drm_agp_unbind(struct drm_device *dev, drm_agp_binding_t *request);
|
||||
|
||||
/* 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);
|
||||
int drm_sg_alloc(struct drm_device *dev, drm_scatter_gather_t * request);
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/* sysctl support (drm_sysctl.h) */
|
||||
extern int drm_sysctl_init(drm_device_t *dev);
|
||||
extern int drm_sysctl_cleanup(drm_device_t *dev);
|
||||
extern int drm_sysctl_init(struct drm_device *dev);
|
||||
extern int drm_sysctl_cleanup(struct drm_device *dev);
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
/* ATI PCIGART support (ati_pcigart.c) */
|
||||
int drm_ati_pcigart_init(drm_device_t *dev,
|
||||
int drm_ati_pcigart_init(struct drm_device *dev,
|
||||
struct drm_ati_pcigart_info *gart_info);
|
||||
int drm_ati_pcigart_cleanup(drm_device_t *dev,
|
||||
int drm_ati_pcigart_cleanup(struct drm_device *dev,
|
||||
struct drm_ati_pcigart_info *gart_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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_unlock(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_version(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_setversion(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* 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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_getunique(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_setunique(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_getmap(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_getclient(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_getstats(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_noop(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* 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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_addctx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_modctx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_getctx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_switchctx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_newctx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_rmctx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_setsareactx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_getsareactx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* 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);
|
||||
struct drm_drawable_info *drm_get_drawable_info(drm_device_t *dev, int handle);
|
||||
int drm_adddraw(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_rmdraw(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_update_draw(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev,
|
||||
int handle);
|
||||
|
||||
/* 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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_authmagic(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* 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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_rmmap_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_addbufs_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_infobufs(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_markbufs(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_freebufs(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_mapbufs(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* 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 *dev, void *data, struct drm_file *file_priv);
|
||||
|
||||
/* 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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_wait_vblank(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
void drm_locked_tasklet(struct drm_device *dev,
|
||||
void (*tasklet)(struct drm_device *dev));
|
||||
|
||||
/* 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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_agp_release_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_agp_enable_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_agp_info_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_agp_alloc_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_agp_free_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* 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 *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_sg_free(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
/* 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 *dev, size_t size,
|
||||
size_t align, dma_addr_t maxaddr);
|
||||
void drm_pci_free(struct drm_device *dev, drm_dma_handle_t *dmah);
|
||||
|
||||
/* Inline replacements for DRM_IOREMAP macros */
|
||||
static __inline__ void drm_core_ioremap(struct drm_local_map *map, struct drm_device *dev)
|
||||
static __inline__ void
|
||||
drm_core_ioremap(struct drm_local_map *map, struct drm_device *dev)
|
||||
{
|
||||
map->handle = drm_ioremap(dev, map);
|
||||
}
|
||||
static __inline__ void drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
|
||||
static __inline__ void
|
||||
drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
|
||||
{
|
||||
if ( map->handle && map->size )
|
||||
drm_ioremapfree(map);
|
||||
}
|
||||
|
||||
static __inline__ struct drm_local_map *drm_core_findmap(struct drm_device *dev, unsigned long offset)
|
||||
static __inline__ struct drm_local_map *
|
||||
drm_core_findmap(struct drm_device *dev, unsigned long offset)
|
||||
{
|
||||
drm_local_map_t *map;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/* Returns 1 if AGP or 0 if not. */
|
||||
static int
|
||||
drm_device_find_capability(drm_device_t *dev, int cap)
|
||||
drm_device_find_capability(struct drm_device *dev, int cap)
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
#if __FreeBSD_version >= 602102
|
||||
|
@ -88,7 +88,7 @@ drm_device_find_capability(drm_device_t *dev, int cap)
|
|||
#endif
|
||||
}
|
||||
|
||||
int drm_device_is_agp(drm_device_t *dev)
|
||||
int drm_device_is_agp(struct drm_device *dev)
|
||||
{
|
||||
if (dev->driver.device_is_agp != NULL) {
|
||||
int ret;
|
||||
|
@ -104,12 +104,12 @@ int drm_device_is_agp(drm_device_t *dev)
|
|||
return (drm_device_find_capability(dev, PCIY_AGP));
|
||||
}
|
||||
|
||||
int drm_device_is_pcie(drm_device_t *dev)
|
||||
int 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)
|
||||
int drm_agp_info(struct drm_device * dev, drm_agp_info_t *info)
|
||||
{
|
||||
struct agp_info *kern;
|
||||
|
||||
|
@ -131,7 +131,8 @@ int drm_agp_info(drm_device_t * dev, drm_agp_info_t *info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_agp_info_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_agp_info_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
int err;
|
||||
drm_agp_info_t info;
|
||||
|
@ -144,13 +145,14 @@ int drm_agp_info_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_agp_acquire_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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)
|
||||
int drm_agp_acquire(struct drm_device *dev)
|
||||
{
|
||||
int retcode;
|
||||
|
||||
|
@ -165,13 +167,14 @@ int drm_agp_acquire(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_agp_release_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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)
|
||||
int drm_agp_release(struct drm_device * dev)
|
||||
{
|
||||
if (!dev->agp || !dev->agp->acquired)
|
||||
return EINVAL;
|
||||
|
@ -180,7 +183,7 @@ int drm_agp_release(drm_device_t * dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_agp_enable(drm_device_t *dev, drm_agp_mode_t mode)
|
||||
int drm_agp_enable(struct drm_device *dev, drm_agp_mode_t mode)
|
||||
{
|
||||
|
||||
if (!dev->agp || !dev->agp->acquired)
|
||||
|
@ -192,7 +195,8 @@ int drm_agp_enable(drm_device_t *dev, drm_agp_mode_t mode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_agp_enable_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_agp_enable_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_agp_mode_t mode;
|
||||
|
||||
|
@ -201,7 +205,7 @@ int drm_agp_enable_ioctl(drm_device_t *dev, void *data, struct drm_file *file_pr
|
|||
return drm_agp_enable(dev, mode);
|
||||
}
|
||||
|
||||
int drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request)
|
||||
int drm_agp_alloc(struct drm_device *dev, drm_agp_buffer_t *request)
|
||||
{
|
||||
drm_agp_mem_t *entry;
|
||||
void *handle;
|
||||
|
@ -244,7 +248,8 @@ int drm_agp_alloc(drm_device_t *dev, drm_agp_buffer_t *request)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_agp_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_agp_alloc_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_agp_buffer_t request;
|
||||
int retcode;
|
||||
|
@ -260,7 +265,8 @@ int drm_agp_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_pri
|
|||
return retcode;
|
||||
}
|
||||
|
||||
static drm_agp_mem_t * drm_agp_lookup_entry(drm_device_t *dev, void *handle)
|
||||
static drm_agp_mem_t * drm_agp_lookup_entry(struct drm_device *dev,
|
||||
void *handle)
|
||||
{
|
||||
drm_agp_mem_t *entry;
|
||||
|
||||
|
@ -270,7 +276,7 @@ static drm_agp_mem_t * drm_agp_lookup_entry(drm_device_t *dev, void *handle)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request)
|
||||
int drm_agp_unbind(struct drm_device *dev, drm_agp_binding_t *request)
|
||||
{
|
||||
drm_agp_mem_t *entry;
|
||||
int retcode;
|
||||
|
@ -292,7 +298,8 @@ int drm_agp_unbind(drm_device_t *dev, drm_agp_binding_t *request)
|
|||
return retcode;
|
||||
}
|
||||
|
||||
int drm_agp_unbind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_agp_binding_t request;
|
||||
int retcode;
|
||||
|
@ -306,7 +313,7 @@ int drm_agp_unbind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_pr
|
|||
return retcode;
|
||||
}
|
||||
|
||||
int drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request)
|
||||
int drm_agp_bind(struct drm_device *dev, drm_agp_binding_t *request)
|
||||
{
|
||||
drm_agp_mem_t *entry;
|
||||
int retcode;
|
||||
|
@ -332,7 +339,8 @@ int drm_agp_bind(drm_device_t *dev, drm_agp_binding_t *request)
|
|||
return retcode;
|
||||
}
|
||||
|
||||
int drm_agp_bind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_agp_binding_t request;
|
||||
int retcode;
|
||||
|
@ -346,7 +354,7 @@ int drm_agp_bind_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv
|
|||
return retcode;
|
||||
}
|
||||
|
||||
int drm_agp_free(drm_device_t *dev, drm_agp_buffer_t *request)
|
||||
int drm_agp_free(struct drm_device *dev, drm_agp_buffer_t *request)
|
||||
{
|
||||
drm_agp_mem_t *entry;
|
||||
|
||||
|
@ -376,7 +384,8 @@ int 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)
|
||||
int drm_agp_free_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_agp_buffer_t request;
|
||||
int retcode;
|
||||
|
|
|
@ -43,7 +43,7 @@ static int drm_hash_magic(drm_magic_t magic)
|
|||
/**
|
||||
* Returns the file private associated with the given magic number.
|
||||
*/
|
||||
static drm_file_t *drm_find_file(drm_device_t *dev, drm_magic_t magic)
|
||||
static drm_file_t *drm_find_file(struct drm_device *dev, drm_magic_t magic)
|
||||
{
|
||||
drm_magic_entry_t *pt;
|
||||
int hash = drm_hash_magic(magic);
|
||||
|
@ -63,7 +63,8 @@ static drm_file_t *drm_find_file(drm_device_t *dev, drm_magic_t magic)
|
|||
* Inserts the given magic number into the hash table of used magic number
|
||||
* lists.
|
||||
*/
|
||||
static int drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
|
||||
static int drm_add_magic(struct drm_device *dev, drm_file_t *priv,
|
||||
drm_magic_t magic)
|
||||
{
|
||||
int hash;
|
||||
drm_magic_entry_t *entry;
|
||||
|
@ -96,7 +97,7 @@ static int drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
|
|||
* Removes the given magic number from the hash table of used magic number
|
||||
* lists.
|
||||
*/
|
||||
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 *prev = NULL;
|
||||
drm_magic_entry_t *pt;
|
||||
|
@ -134,7 +135,7 @@ static int drm_remove_magic(drm_device_t *dev, drm_magic_t magic)
|
|||
* connection that the magic is passed over) to determine if the magic number
|
||||
* should be authenticated.
|
||||
*/
|
||||
int drm_getmagic(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
static drm_magic_t sequence = 0;
|
||||
drm_auth_t *auth = data;
|
||||
|
@ -165,7 +166,8 @@ int 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)
|
||||
int drm_authmagic(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_auth_t *auth = data;
|
||||
drm_file_t *priv;
|
||||
|
|
|
@ -56,7 +56,7 @@ int drm_order(unsigned long size)
|
|||
* drm_get_resource_*. Note that they are not RF_ACTIVE, so there's no virtual
|
||||
* address for accessing them. Cleaned up at unload.
|
||||
*/
|
||||
static int drm_alloc_resource(drm_device_t *dev, int resource)
|
||||
static int drm_alloc_resource(struct drm_device *dev, int resource)
|
||||
{
|
||||
if (resource >= DRM_MAX_PCI_RESOURCE) {
|
||||
DRM_ERROR("Resource %d too large\n", resource);
|
||||
|
@ -82,7 +82,8 @@ static int drm_alloc_resource(drm_device_t *dev, int resource)
|
|||
return 0;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (drm_alloc_resource(dev, resource) != 0)
|
||||
return 0;
|
||||
|
@ -90,7 +91,8 @@ unsigned long drm_get_resource_start(drm_device_t *dev, unsigned int resource)
|
|||
return rman_get_start(dev->pcir[resource]);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if (drm_alloc_resource(dev, resource) != 0)
|
||||
return 0;
|
||||
|
@ -98,7 +100,8 @@ unsigned long drm_get_resource_len(drm_device_t *dev, unsigned int resource)
|
|||
return rman_get_size(dev->pcir[resource]);
|
||||
}
|
||||
|
||||
int drm_addmap(drm_device_t * dev, unsigned long offset, unsigned long size,
|
||||
int 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;
|
||||
|
@ -261,7 +264,8 @@ done:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_addmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_addmap_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_map_t *request = data;
|
||||
drm_local_map_t *map;
|
||||
|
@ -294,7 +298,7 @@ int drm_addmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void drm_rmmap(drm_device_t *dev, drm_local_map_t *map)
|
||||
void drm_rmmap(struct drm_device *dev, drm_local_map_t *map)
|
||||
{
|
||||
DRM_SPINLOCK_ASSERT(&dev->dev_lock);
|
||||
|
||||
|
@ -340,7 +344,8 @@ void drm_rmmap(drm_device_t *dev, drm_local_map_t *map)
|
|||
* isn't in use.
|
||||
*/
|
||||
|
||||
int drm_rmmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_rmmap_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_local_map_t *map;
|
||||
drm_map_t *request = data;
|
||||
|
@ -366,7 +371,8 @@ int drm_rmmap_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
@ -389,7 +395,7 @@ static void drm_cleanup_buf_error(drm_device_t *dev, drm_buf_entry_t *entry)
|
|||
}
|
||||
}
|
||||
|
||||
static int drm_do_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request)
|
||||
static int 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;
|
||||
|
@ -520,7 +526,7 @@ static int drm_do_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int drm_do_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request)
|
||||
static int drm_do_addbufs_pci(struct drm_device *dev, drm_buf_desc_t *request)
|
||||
{
|
||||
drm_device_dma_t *dma = dev->dma;
|
||||
int count;
|
||||
|
@ -667,7 +673,7 @@ static int drm_do_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request)
|
|||
|
||||
}
|
||||
|
||||
static int drm_do_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request)
|
||||
static int 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;
|
||||
|
@ -778,7 +784,7 @@ static int drm_do_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request)
|
||||
int drm_addbufs_agp(struct drm_device *dev, drm_buf_desc_t *request)
|
||||
{
|
||||
int order, ret;
|
||||
|
||||
|
@ -809,7 +815,7 @@ int drm_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int drm_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request)
|
||||
int drm_addbufs_sg(struct drm_device *dev, drm_buf_desc_t *request)
|
||||
{
|
||||
int order, ret;
|
||||
|
||||
|
@ -843,7 +849,7 @@ int drm_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int drm_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request)
|
||||
int drm_addbufs_pci(struct drm_device *dev, drm_buf_desc_t *request)
|
||||
{
|
||||
int order, ret;
|
||||
|
||||
|
@ -877,7 +883,8 @@ int drm_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int drm_addbufs_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_addbufs_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_buf_desc_t *request = data;
|
||||
int err;
|
||||
|
@ -892,7 +899,7 @@ int drm_addbufs_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return err;
|
||||
}
|
||||
|
||||
int drm_infobufs(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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;
|
||||
|
@ -941,7 +948,7 @@ int drm_infobufs(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return retcode;
|
||||
}
|
||||
|
||||
int drm_markbufs(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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;
|
||||
|
@ -970,7 +977,7 @@ int drm_markbufs(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_freebufs(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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;
|
||||
|
@ -1007,7 +1014,7 @@ int drm_freebufs(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return retcode;
|
||||
}
|
||||
|
||||
int drm_mapbufs(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_mapbufs(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_device_dma_t *dma = dev->dma;
|
||||
int retcode = 0;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* Context bitmap support
|
||||
*/
|
||||
|
||||
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 || ctx_handle >= DRM_MAX_CTXBITMAP ||
|
||||
dev->ctx_bitmap == NULL) {
|
||||
|
@ -54,7 +54,7 @@ void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle)
|
|||
return;
|
||||
}
|
||||
|
||||
int drm_ctxbitmap_next(drm_device_t *dev)
|
||||
int drm_ctxbitmap_next(struct drm_device *dev)
|
||||
{
|
||||
int bit;
|
||||
|
||||
|
@ -101,7 +101,7 @@ int drm_ctxbitmap_next(drm_device_t *dev)
|
|||
return bit;
|
||||
}
|
||||
|
||||
int drm_ctxbitmap_init(drm_device_t *dev)
|
||||
int drm_ctxbitmap_init(struct drm_device *dev)
|
||||
{
|
||||
int i;
|
||||
int temp;
|
||||
|
@ -124,7 +124,7 @@ int drm_ctxbitmap_init(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void drm_ctxbitmap_cleanup(drm_device_t *dev)
|
||||
void drm_ctxbitmap_cleanup(struct drm_device *dev)
|
||||
{
|
||||
DRM_LOCK();
|
||||
if (dev->context_sareas != NULL)
|
||||
|
@ -137,7 +137,8 @@ void drm_ctxbitmap_cleanup(drm_device_t *dev)
|
|||
* Per Context SAREA Support
|
||||
*/
|
||||
|
||||
int drm_getsareactx( drm_device_t *dev, void *data, struct drm_file *file_priv )
|
||||
int 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;
|
||||
|
@ -157,7 +158,8 @@ int drm_getsareactx( drm_device_t *dev, void *data, struct drm_file *file_priv )
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_setsareactx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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;
|
||||
|
@ -184,7 +186,7 @@ bad:
|
|||
* The actual DRM context handling routines
|
||||
*/
|
||||
|
||||
int drm_context_switch(drm_device_t *dev, int old, int new)
|
||||
int 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" );
|
||||
|
@ -201,7 +203,7 @@ int drm_context_switch(drm_device_t *dev, int old, int new)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_context_switch_complete(drm_device_t *dev, int new)
|
||||
int drm_context_switch_complete(struct drm_device *dev, int new)
|
||||
{
|
||||
dev->last_context = new; /* PRE/POST: This is the _only_ writer. */
|
||||
|
||||
|
@ -217,7 +219,7 @@ int drm_context_switch_complete(drm_device_t *dev, int new)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_resctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_resctx(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_ctx_res_t *res = data;
|
||||
drm_ctx_t ctx;
|
||||
|
@ -237,7 +239,7 @@ int drm_resctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_addctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_addctx(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_ctx_t *ctx = data;
|
||||
|
||||
|
@ -262,13 +264,13 @@ int drm_addctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_modctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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)
|
||||
int drm_getctx(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_ctx_t *ctx = data;
|
||||
|
||||
|
@ -278,7 +280,8 @@ int drm_getctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_switchctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_switchctx(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_ctx_t *ctx = data;
|
||||
|
||||
|
@ -286,7 +289,7 @@ int drm_switchctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return drm_context_switch(dev, dev->last_context, ctx->handle);
|
||||
}
|
||||
|
||||
int drm_newctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_newctx(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_ctx_t *ctx = data;
|
||||
|
||||
|
@ -296,7 +299,7 @@ int drm_newctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_rmctx(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_rmctx(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_ctx_t *ctx = data;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "drmP.h"
|
||||
|
||||
int drm_dma_setup(drm_device_t *dev)
|
||||
int drm_dma_setup(struct drm_device *dev)
|
||||
{
|
||||
|
||||
dev->dma = malloc(sizeof(*dev->dma), M_DRM, M_NOWAIT | M_ZERO);
|
||||
|
@ -50,7 +50,7 @@ int drm_dma_setup(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void drm_dma_takedown(drm_device_t *dev)
|
||||
void drm_dma_takedown(struct drm_device *dev)
|
||||
{
|
||||
drm_device_dma_t *dma = dev->dma;
|
||||
int i, j;
|
||||
|
@ -89,7 +89,7 @@ void drm_dma_takedown(drm_device_t *dev)
|
|||
}
|
||||
|
||||
|
||||
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) return;
|
||||
|
||||
|
@ -98,7 +98,7 @@ void drm_free_buffer(drm_device_t *dev, drm_buf_t *buf)
|
|||
buf->used = 0;
|
||||
}
|
||||
|
||||
void drm_reclaim_buffers(drm_device_t *dev, struct drm_file *file_priv)
|
||||
void drm_reclaim_buffers(struct drm_device *dev, struct drm_file *file_priv)
|
||||
{
|
||||
drm_device_dma_t *dma = dev->dma;
|
||||
int i;
|
||||
|
@ -122,7 +122,7 @@ void 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)
|
||||
int drm_dma(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
|
||||
if (dev->driver.dma_ioctl) {
|
||||
|
|
|
@ -56,7 +56,7 @@ RB_GENERATE_STATIC(drawable_tree, bsd_drm_drawable_info, tree,
|
|||
drm_drawable_compare);
|
||||
|
||||
struct drm_drawable_info *
|
||||
drm_get_drawable_info(drm_device_t *dev, int handle)
|
||||
drm_get_drawable_info(struct drm_device *dev, int handle)
|
||||
{
|
||||
struct bsd_drm_drawable_info find, *result;
|
||||
|
||||
|
@ -66,7 +66,7 @@ drm_get_drawable_info(drm_device_t *dev, int handle)
|
|||
return &result->info;
|
||||
}
|
||||
|
||||
int drm_adddraw(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_adddraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_draw_t *draw = data;
|
||||
struct bsd_drm_drawable_info *info;
|
||||
|
@ -87,7 +87,7 @@ int drm_adddraw(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_rmdraw(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_draw_t *draw = (drm_draw_t *)data;
|
||||
struct drm_drawable_info *info;
|
||||
|
@ -108,7 +108,8 @@ 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_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;
|
||||
|
|
|
@ -45,14 +45,14 @@ int drm_debug_flag = 1;
|
|||
int drm_debug_flag = 0;
|
||||
#endif
|
||||
|
||||
static int drm_load(drm_device_t *dev);
|
||||
static void drm_unload(drm_device_t *dev);
|
||||
static int drm_load(struct drm_device *dev);
|
||||
static void drm_unload(struct drm_device *dev);
|
||||
static drm_pci_id_list_t *drm_find_description(int vendor, int device,
|
||||
drm_pci_id_list_t *idlist);
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define DRIVER_SOFTC(unit) \
|
||||
((drm_device_t *)devclass_get_softc(drm_devclass, unit))
|
||||
((struct drm_device *)devclass_get_softc(drm_devclass, unit))
|
||||
|
||||
MODULE_VERSION(drm, 1);
|
||||
MODULE_DEPEND(drm, agp, 1, 1, 1);
|
||||
|
@ -64,7 +64,7 @@ MODULE_DEPEND(drm, mem, 1, 1, 1);
|
|||
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#define DRIVER_SOFTC(unit) \
|
||||
((drm_device_t *)device_lookup(&drm_cd, unit))
|
||||
((struct drm_device *)device_lookup(&drm_cd, unit))
|
||||
#endif /* __NetBSD__ || __OpenBSD__ */
|
||||
|
||||
static drm_ioctl_desc_t drm_ioctls[256] = {
|
||||
|
@ -180,7 +180,7 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist)
|
|||
|
||||
int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist)
|
||||
{
|
||||
drm_device_t *dev;
|
||||
struct drm_device *dev;
|
||||
drm_pci_id_list_t *id_entry;
|
||||
int unit;
|
||||
|
||||
|
@ -319,14 +319,15 @@ void drm_attach(struct pci_attach_args *pa, dev_t kdev,
|
|||
drm_pci_id_list_t *idlist)
|
||||
{
|
||||
int i;
|
||||
drm_device_t *dev;
|
||||
struct drm_device *dev;
|
||||
drm_pci_id_list_t *id_entry;
|
||||
|
||||
config_makeroom(kdev, &drm_cd);
|
||||
drm_cd.cd_devs[(kdev)] = malloc(sizeof(drm_device_t), M_DRM, M_WAITOK);
|
||||
drm_cd.cd_devs[(kdev)] = malloc(sizeof(struct drm_device),
|
||||
M_DRM, M_WAITOK);
|
||||
dev = DRIVER_SOFTC(kdev);
|
||||
|
||||
memset(dev, 0, sizeof(drm_device_t));
|
||||
memset(dev, 0, sizeof(struct drm_device));
|
||||
memcpy(&dev->pa, pa, sizeof(dev->pa));
|
||||
|
||||
dev->irq = pa->pa_intrline;
|
||||
|
@ -346,7 +347,7 @@ void drm_attach(struct pci_attach_args *pa, dev_t kdev,
|
|||
|
||||
int drm_detach(struct device *self, int flags)
|
||||
{
|
||||
drm_unload((drm_device_t *)self);
|
||||
drm_unload((struct drm_device *)self);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -379,7 +380,7 @@ drm_pci_id_list_t *drm_find_description(int vendor, int device,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int drm_firstopen(drm_device_t *dev)
|
||||
static int drm_firstopen(struct drm_device *dev)
|
||||
{
|
||||
drm_local_map_t *map;
|
||||
int i;
|
||||
|
@ -425,7 +426,7 @@ static int drm_firstopen(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int drm_lastclose(drm_device_t *dev)
|
||||
static int drm_lastclose(struct drm_device *dev)
|
||||
{
|
||||
drm_magic_entry_t *pt, *next;
|
||||
drm_local_map_t *map, *mapsave;
|
||||
|
@ -498,7 +499,7 @@ static int drm_lastclose(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int drm_load(drm_device_t *dev)
|
||||
static int drm_load(struct drm_device *dev)
|
||||
{
|
||||
int i, retcode;
|
||||
|
||||
|
@ -599,7 +600,7 @@ error:
|
|||
return retcode;
|
||||
}
|
||||
|
||||
static void drm_unload(drm_device_t *dev)
|
||||
static void drm_unload(struct drm_device *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -654,7 +655,7 @@ static void drm_unload(drm_device_t *dev)
|
|||
}
|
||||
|
||||
|
||||
int drm_version(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_version(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_version_t *version = data;
|
||||
int len;
|
||||
|
@ -681,7 +682,7 @@ int drm_version(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
|
||||
int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
||||
{
|
||||
drm_device_t *dev = NULL;
|
||||
struct drm_device *dev = NULL;
|
||||
int retcode = 0;
|
||||
|
||||
dev = DRIVER_SOFTC(minor(kdev));
|
||||
|
@ -706,7 +707,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
|||
|
||||
int drm_close(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
||||
{
|
||||
drm_device_t *dev = drm_get_device_from_kdev(kdev);
|
||||
struct drm_device *dev = drm_get_device_from_kdev(kdev);
|
||||
drm_file_t *file_priv;
|
||||
int retcode = 0;
|
||||
|
||||
|
@ -827,10 +828,10 @@ done:
|
|||
int drm_ioctl(struct 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 *dev, void *data, struct drm_file *file_priv);
|
||||
int nr = DRM_IOCTL_NR(cmd);
|
||||
int is_driver_ioctl = 0;
|
||||
drm_file_t *file_priv;
|
||||
|
@ -929,7 +930,7 @@ int drm_ioctl(struct cdev *kdev, u_long cmd, caddr_t data, int flags,
|
|||
return retcode;
|
||||
}
|
||||
|
||||
drm_local_map_t *drm_getsarea(drm_device_t *dev)
|
||||
drm_local_map_t *drm_getsarea(struct drm_device *dev)
|
||||
{
|
||||
drm_local_map_t *map;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include "drmP.h"
|
||||
|
||||
drm_file_t *drm_find_file_by_proc(drm_device_t *dev, DRM_STRUCTPROC *p)
|
||||
drm_file_t *drm_find_file_by_proc(struct drm_device *dev, DRM_STRUCTPROC *p)
|
||||
{
|
||||
#if __FreeBSD_version >= 500021
|
||||
uid_t uid = p->td_ucred->cr_svuid;
|
||||
|
@ -57,7 +57,7 @@ drm_file_t *drm_find_file_by_proc(drm_device_t *dev, DRM_STRUCTPROC *p)
|
|||
|
||||
/* drm_open_helper is called whenever a process opens /dev/drm. */
|
||||
int drm_open_helper(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p,
|
||||
drm_device_t *dev)
|
||||
struct drm_device *dev)
|
||||
{
|
||||
int m = minor(kdev);
|
||||
drm_file_t *priv;
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
* before setunique has been called. The format for the bus-specific part of
|
||||
* the unique is not defined for any other bus.
|
||||
*/
|
||||
int drm_getunique(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_getunique(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_unique_t *u = data;
|
||||
|
||||
|
@ -57,7 +58,8 @@ int drm_getunique(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
/* Deprecated in DRM version 1.1, and will return EBUSY when setversion has
|
||||
* requested version 1.1 or greater.
|
||||
*/
|
||||
int drm_setunique(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_setunique(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_unique_t *u = data;
|
||||
int domain, bus, slot, func, ret;
|
||||
|
@ -112,7 +114,7 @@ int drm_setunique(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
|
||||
|
||||
static int
|
||||
drm_set_busid(drm_device_t *dev)
|
||||
drm_set_busid(struct drm_device *dev)
|
||||
{
|
||||
|
||||
DRM_LOCK();
|
||||
|
@ -137,7 +139,7 @@ drm_set_busid(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_getmap(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_getmap(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_map_t *map = data;
|
||||
drm_local_map_t *mapinlist;
|
||||
|
@ -173,7 +175,8 @@ int drm_getmap(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_getclient(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_getclient(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_client_t *client = data;
|
||||
drm_file_t *pt;
|
||||
|
@ -200,7 +203,7 @@ int drm_getclient(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return EINVAL;
|
||||
}
|
||||
|
||||
int drm_getstats(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_getstats(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_stats_t *stats = data;
|
||||
int i;
|
||||
|
@ -229,7 +232,8 @@ int drm_getstats(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
#define DRM_IF_MAJOR 1
|
||||
#define DRM_IF_MINOR 2
|
||||
|
||||
int drm_setversion(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_setversion(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_set_version_t *sv = data;
|
||||
drm_set_version_t ver;
|
||||
|
@ -273,7 +277,7 @@ int 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)
|
||||
int drm_noop(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
DRM_DEBUG("\n");
|
||||
return 0;
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
|
||||
static void drm_locked_task(void *context, int pending __unused);
|
||||
|
||||
int drm_irq_by_busid(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_irq_by_busid(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_irq_busid_t *irq = data;
|
||||
|
||||
|
@ -57,7 +58,7 @@ int drm_irq_by_busid(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
static irqreturn_t
|
||||
drm_irq_handler_wrap(DRM_IRQ_ARGS)
|
||||
{
|
||||
drm_device_t *dev = (drm_device_t *)arg;
|
||||
struct drm_device *dev = arg;
|
||||
|
||||
DRM_SPINLOCK(&dev->irq_lock);
|
||||
dev->driver.irq_handler(arg);
|
||||
|
@ -65,7 +66,7 @@ drm_irq_handler_wrap(DRM_IRQ_ARGS)
|
|||
}
|
||||
#endif
|
||||
|
||||
int drm_irq_install(drm_device_t *dev)
|
||||
int drm_irq_install(struct drm_device *dev)
|
||||
{
|
||||
int retcode;
|
||||
#ifdef __NetBSD__
|
||||
|
@ -147,7 +148,7 @@ err:
|
|||
return retcode;
|
||||
}
|
||||
|
||||
int drm_irq_uninstall(drm_device_t *dev)
|
||||
int drm_irq_uninstall(struct drm_device *dev)
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
int irqrid;
|
||||
|
@ -179,7 +180,7 @@ int drm_irq_uninstall(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_control(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_control(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_control_t *ctl = data;
|
||||
int err;
|
||||
|
@ -207,7 +208,7 @@ 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)
|
||||
int drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_wait_vblank_t *vblwait = data;
|
||||
struct timeval now;
|
||||
|
@ -288,12 +289,12 @@ int drm_wait_vblank(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void drm_vbl_send_signals(drm_device_t *dev)
|
||||
void drm_vbl_send_signals(struct drm_device *dev)
|
||||
{
|
||||
}
|
||||
|
||||
#if 0 /* disabled */
|
||||
void drm_vbl_send_signals( drm_device_t *dev )
|
||||
void drm_vbl_send_signals( struct drm_device *dev )
|
||||
{
|
||||
drm_vbl_sig_t *vbl_sig;
|
||||
unsigned int vbl_seq = atomic_read( &dev->vbl_received );
|
||||
|
@ -318,7 +319,7 @@ void drm_vbl_send_signals( drm_device_t *dev )
|
|||
|
||||
static void drm_locked_task(void *context, int pending __unused)
|
||||
{
|
||||
drm_device_t *dev = context;
|
||||
struct drm_device *dev = context;
|
||||
|
||||
DRM_LOCK();
|
||||
for (;;) {
|
||||
|
@ -352,7 +353,8 @@ static void drm_locked_task(void *context, int pending __unused)
|
|||
}
|
||||
|
||||
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))
|
||||
{
|
||||
dev->locked_task_call = tasklet;
|
||||
taskqueue_enqueue(taskqueue_swi, &dev->locked_task);
|
||||
|
|
|
@ -77,7 +77,7 @@ int 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,
|
||||
int drm_lock_transfer(struct drm_device *dev,
|
||||
__volatile__ unsigned int *lock, unsigned int context)
|
||||
{
|
||||
unsigned int old, new;
|
||||
|
@ -91,7 +91,7 @@ int drm_lock_transfer(drm_device_t *dev,
|
|||
return 1;
|
||||
}
|
||||
|
||||
int drm_lock_free(drm_device_t *dev,
|
||||
int drm_lock_free(struct drm_device *dev,
|
||||
__volatile__ unsigned int *lock, unsigned int context)
|
||||
{
|
||||
unsigned int old, new;
|
||||
|
@ -111,7 +111,7 @@ int drm_lock_free(drm_device_t *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_lock(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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 @@ int drm_lock(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_unlock(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
|
||||
{
|
||||
drm_lock_t *lock = data;
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ void drm_free(void *pt, size_t size, int area)
|
|||
free(pt, M_DRM);
|
||||
}
|
||||
|
||||
void *drm_ioremap(drm_device_t *dev, drm_local_map_t *map)
|
||||
void *drm_ioremap(struct drm_device *dev, drm_local_map_t *map)
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
return pmap_mapdev(map->offset, map->size);
|
||||
|
|
|
@ -53,7 +53,8 @@ drm_pci_busdma_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error
|
|||
* 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;
|
||||
|
@ -123,7 +124,7 @@ drm_pci_alloc(drm_device_t *dev, size_t size, size_t align, dma_addr_t maxaddr)
|
|||
* \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;
|
||||
|
|
|
@ -45,7 +45,7 @@ void drm_sg_cleanup(drm_sg_mem_t *entry)
|
|||
free(entry, M_DRM);
|
||||
}
|
||||
|
||||
int drm_sg_alloc(drm_device_t * dev, drm_scatter_gather_t * request)
|
||||
int drm_sg_alloc(struct drm_device * dev, drm_scatter_gather_t * request)
|
||||
{
|
||||
drm_sg_mem_t *entry;
|
||||
unsigned long pages;
|
||||
|
@ -98,7 +98,8 @@ int drm_sg_alloc(drm_device_t * dev, drm_scatter_gather_t * request)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_sg_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int drm_sg_alloc_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
drm_scatter_gather_t *request = data;
|
||||
int ret;
|
||||
|
@ -109,7 +110,7 @@ int drm_sg_alloc_ioctl(drm_device_t *dev, void *data, struct drm_file *file_priv
|
|||
return ret;
|
||||
}
|
||||
|
||||
int drm_sg_free(drm_device_t *dev, void *data, struct drm_file *file_priv)
|
||||
int 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;
|
||||
|
|
|
@ -52,7 +52,7 @@ struct drm_sysctl_info {
|
|||
char name[2];
|
||||
};
|
||||
|
||||
int drm_sysctl_init(drm_device_t *dev)
|
||||
int drm_sysctl_init(struct drm_device *dev)
|
||||
{
|
||||
struct drm_sysctl_info *info;
|
||||
struct sysctl_oid *oid;
|
||||
|
@ -106,7 +106,7 @@ int drm_sysctl_init(drm_device_t *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drm_sysctl_cleanup(drm_device_t *dev)
|
||||
int drm_sysctl_cleanup(struct drm_device *dev)
|
||||
{
|
||||
int error;
|
||||
error = sysctl_ctx_free( &dev->sysctl->ctx );
|
||||
|
@ -127,7 +127,7 @@ do { \
|
|||
|
||||
static int drm_name_info DRM_SYSCTL_HANDLER_ARGS
|
||||
{
|
||||
drm_device_t *dev = arg1;
|
||||
struct drm_device *dev = arg1;
|
||||
char buf[128];
|
||||
int retcode;
|
||||
int hasunique = 0;
|
||||
|
@ -152,7 +152,7 @@ done:
|
|||
|
||||
static int drm_vm_info DRM_SYSCTL_HANDLER_ARGS
|
||||
{
|
||||
drm_device_t *dev = arg1;
|
||||
struct drm_device *dev = arg1;
|
||||
drm_local_map_t *map, *tempmaps;
|
||||
const char *types[] = { "FB", "REG", "SHM", "AGP", "SG" };
|
||||
const char *type, *yesno;
|
||||
|
@ -211,7 +211,7 @@ done:
|
|||
|
||||
static int drm_bufs_info DRM_SYSCTL_HANDLER_ARGS
|
||||
{
|
||||
drm_device_t *dev = arg1;
|
||||
struct drm_device *dev = arg1;
|
||||
drm_device_dma_t *dma = dev->dma;
|
||||
drm_device_dma_t tempdma;
|
||||
int *templists;
|
||||
|
@ -267,7 +267,7 @@ done:
|
|||
|
||||
static int drm_clients_info DRM_SYSCTL_HANDLER_ARGS
|
||||
{
|
||||
drm_device_t *dev = arg1;
|
||||
struct drm_device *dev = arg1;
|
||||
drm_file_t *priv, *tempprivs;
|
||||
char buf[128];
|
||||
int retcode;
|
||||
|
|
|
@ -37,7 +37,7 @@ int drm_mmap(dev_t kdev, vm_offset_t offset, int prot)
|
|||
paddr_t drm_mmap(dev_t kdev, off_t offset, int prot)
|
||||
#endif
|
||||
{
|
||||
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;
|
||||
drm_map_type_t type;
|
||||
|
|
|
@ -40,7 +40,7 @@ static drm_pci_id_list_t i915_pciidlist[] = {
|
|||
i915_PCI_IDS
|
||||
};
|
||||
|
||||
static void i915_configure(drm_device_t *dev)
|
||||
static void i915_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = 1; /* No dev_priv */
|
||||
dev->driver.load = i915_driver_load;
|
||||
|
@ -82,9 +82,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);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ static driver_t i915_driver = {
|
|||
"drmsub",
|
||||
#endif
|
||||
i915_methods,
|
||||
sizeof(drm_device_t)
|
||||
sizeof(struct drm_device)
|
||||
};
|
||||
|
||||
extern devclass_t drm_devclass;
|
||||
|
|
|
@ -44,7 +44,7 @@ static drm_pci_id_list_t mach64_pciidlist[] = {
|
|||
mach64_PCI_IDS
|
||||
};
|
||||
|
||||
static void mach64_configure(drm_device_t *dev)
|
||||
static void mach64_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = 1; /* No dev_priv */
|
||||
dev->driver.lastclose = mach64_driver_lastclose;
|
||||
|
@ -83,9 +83,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);
|
||||
}
|
||||
|
@ -102,7 +102,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;
|
||||
|
|
|
@ -59,7 +59,7 @@ static drm_pci_id_list_t mga_pciidlist[] = {
|
|||
* This function needs to be filled in! The implementation in
|
||||
* linux-core/mga_drv.c shows what needs to be done.
|
||||
*/
|
||||
static int mga_driver_device_is_agp(drm_device_t * dev)
|
||||
static int mga_driver_device_is_agp(struct drm_device * dev)
|
||||
{
|
||||
device_t bus;
|
||||
|
||||
|
@ -84,7 +84,7 @@ static int mga_driver_device_is_agp(drm_device_t * dev)
|
|||
return DRM_MIGHT_BE_AGP;
|
||||
}
|
||||
|
||||
static void mga_configure(drm_device_t *dev)
|
||||
static void mga_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = sizeof(drm_mga_buf_priv_t);
|
||||
dev->driver.load = mga_driver_load;
|
||||
|
@ -129,9 +129,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);
|
||||
}
|
||||
|
@ -148,7 +148,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;
|
||||
|
@ -163,7 +163,7 @@ MODULE_DEPEND(mga, drm, 1, 1, 1);
|
|||
#ifdef _LKM
|
||||
CFDRIVER_DECL(mga, DV_TTY, NULL);
|
||||
#else
|
||||
CFATTACH_DECL(mga, sizeof(drm_device_t), drm_probe, drm_attach, drm_detach,
|
||||
CFATTACH_DECL(mga, sizeof(struct drm_device), drm_probe, drm_attach, drm_detach,
|
||||
drm_activate);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -42,7 +42,7 @@ static drm_pci_id_list_t r128_pciidlist[] = {
|
|||
r128_PCI_IDS
|
||||
};
|
||||
|
||||
static void r128_configure(drm_device_t *dev)
|
||||
static void r128_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = sizeof(drm_r128_buf_priv_t);
|
||||
dev->driver.preclose = r128_driver_preclose;
|
||||
|
@ -83,9 +83,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);
|
||||
}
|
||||
|
@ -102,7 +102,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;
|
||||
|
@ -117,7 +117,7 @@ MODULE_DEPEND(r128, drm, 1, 1, 1);
|
|||
#ifdef _LKM
|
||||
CFDRIVER_DECL(r128, DV_TTY, NULL);
|
||||
#else
|
||||
CFATTACH_DECL(r128, sizeof(drm_device_t), drm_probe, drm_attach, drm_detach,
|
||||
drm_activate);
|
||||
CFATTACH_DECL(r128, sizeof(struct drm_device), drm_probe, drm_attach,
|
||||
drm_detach, drm_activate);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -42,7 +42,7 @@ static drm_pci_id_list_t radeon_pciidlist[] = {
|
|||
radeon_PCI_IDS
|
||||
};
|
||||
|
||||
static void radeon_configure(drm_device_t *dev)
|
||||
static void radeon_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = sizeof(drm_radeon_buf_priv_t);
|
||||
dev->driver.load = radeon_driver_load;
|
||||
|
@ -90,9 +90,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);
|
||||
}
|
||||
|
@ -109,7 +109,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;
|
||||
|
@ -124,7 +124,7 @@ MODULE_DEPEND(radeon, drm, 1, 1, 1);
|
|||
#ifdef _LKM
|
||||
CFDRIVER_DECL(radeon, DV_TTY, NULL);
|
||||
#else
|
||||
CFATTACH_DECL(radeon, sizeof(drm_device_t), drm_probe, drm_attach, drm_detach,
|
||||
drm_activate);
|
||||
CFATTACH_DECL(radeon, sizeof(struct drm_device), drm_probe, drm_attach,
|
||||
drm_detach, drm_activate);
|
||||
#endif
|
||||
#endif /* __FreeBSD__ */
|
||||
|
|
|
@ -37,7 +37,7 @@ static drm_pci_id_list_t savage_pciidlist[] = {
|
|||
savage_PCI_IDS
|
||||
};
|
||||
|
||||
static void savage_configure(drm_device_t *dev)
|
||||
static void savage_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = sizeof(drm_savage_buf_priv_t);
|
||||
dev->driver.load = savage_driver_load;
|
||||
|
@ -73,9 +73,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);
|
||||
}
|
||||
|
@ -92,7 +92,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;
|
||||
|
|
|
@ -36,7 +36,7 @@ static drm_pci_id_list_t sis_pciidlist[] = {
|
|||
sis_PCI_IDS
|
||||
};
|
||||
|
||||
static void sis_configure(drm_device_t *dev)
|
||||
static void sis_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = 1; /* No dev_priv */
|
||||
dev->driver.context_ctor = sis_init_context;
|
||||
|
@ -66,9 +66,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);
|
||||
}
|
||||
|
@ -85,7 +85,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;
|
||||
|
@ -100,7 +100,7 @@ MODULE_DEPEND(sisdrm, drm, 1, 1, 1);
|
|||
#ifdef _LKM
|
||||
CFDRIVER_DECL(sis, DV_TTY, NULL);
|
||||
#else
|
||||
CFATTACH_DECL(sis, sizeof(drm_device_t), drm_probe, drm_attach, drm_detach,
|
||||
CFATTACH_DECL(sis, sizeof(struct drm_device), drm_probe, drm_attach, drm_detach,
|
||||
drm_activate);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -41,7 +41,7 @@ static drm_pci_id_list_t tdfx_pciidlist[] = {
|
|||
tdfx_PCI_IDS
|
||||
};
|
||||
|
||||
static void tdfx_configure(drm_device_t *dev)
|
||||
static void tdfx_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = 1; /* No dev_priv */
|
||||
|
||||
|
@ -67,9 +67,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);
|
||||
}
|
||||
|
@ -86,7 +86,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;
|
||||
|
@ -101,7 +101,7 @@ MODULE_DEPEND(tdfx, drm, 1, 1, 1);
|
|||
#ifdef _LKM
|
||||
CFDRIVER_DECL(tdfx, DV_TTY, NULL);
|
||||
#else
|
||||
CFATTACH_DECL(tdfx, sizeof(drm_device_t), drm_probe, drm_attach, drm_detach,
|
||||
drm_activate);
|
||||
CFATTACH_DECL(tdfx, sizeof(struct drm_device), drm_probe, drm_attach,
|
||||
drm_detach, drm_activate);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -39,7 +39,7 @@ static drm_pci_id_list_t via_pciidlist[] = {
|
|||
viadrv_PCI_IDS
|
||||
};
|
||||
|
||||
static void via_configure(drm_device_t *dev)
|
||||
static void via_configure(struct drm_device *dev)
|
||||
{
|
||||
dev->driver.buf_priv_size = 1;
|
||||
dev->driver.load = via_driver_load;
|
||||
|
@ -79,9 +79,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);
|
||||
}
|
||||
|
@ -98,7 +98,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;
|
||||
|
@ -109,7 +109,7 @@ MODULE_DEPEND(via, drm, 1, 1, 1);
|
|||
#ifdef _LKM
|
||||
CFDRIVER_DECL(via, DV_TTY, NULL);
|
||||
#else
|
||||
CFATTACH_DECL(via, sizeof(drm_device_t), drm_probe, drm_attach, drm_detach,
|
||||
CFATTACH_DECL(via, sizeof(struct drm_device), drm_probe, drm_attach, drm_detach,
|
||||
drm_activate);
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue