Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55910517 authored by Dave Airlie's avatar Dave Airlie
Browse files

drm: detypedeffing continues...



Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent cdd55a29
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -73,9 +73,9 @@ static void drm_ati_free_pcigart_table(void *address, int order)
	free_pages((unsigned long)address, order);
}

int drm_ati_pcigart_cleanup(struct drm_device *dev, drm_ati_pcigart_info *gart_info)
int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
{
	drm_sg_mem_t *entry = dev->sg;
	struct drm_sg_mem *entry = dev->sg;
	unsigned long pages;
	int i;
	int order;
@@ -122,9 +122,9 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, drm_ati_pcigart_info *gart_i
}
EXPORT_SYMBOL(drm_ati_pcigart_cleanup);

int drm_ati_pcigart_init(struct drm_device *dev, drm_ati_pcigart_info *gart_info)
int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
{
	drm_sg_mem_t *entry = dev->sg;
	struct drm_sg_mem *entry = dev->sg;
	void *address = NULL;
	unsigned long pages;
	u32 *pci_gart, page_base, bus_address = 0;
+44 −44
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ struct drm_queue {
/**
 * Lock data.
 */
typedef struct drm_lock_data {
struct drm_lock_data {
	struct drm_hw_lock *hw_lock;	/**< Hardware lock */
	struct file *filp;		/**< File descr of lock holder (0=kernel) */
	wait_queue_head_t lock_queue;	/**< Queue of blocked processes */
@@ -408,7 +408,7 @@ typedef struct drm_lock_data {
	uint32_t kernel_waiters;
	uint32_t user_waiters;
	int idle_has_lock;
} drm_lock_data_t;
};

/**
 * DMA data.
@@ -434,20 +434,20 @@ struct drm_device_dma {
/**
 * AGP memory entry.  Stored as a doubly linked list.
 */
typedef struct drm_agp_mem {
struct drm_agp_mem {
	unsigned long handle;		/**< handle */
	DRM_AGP_MEM *memory;
	unsigned long bound;		/**< address */
	int pages;
	struct list_head head;
} drm_agp_mem_t;
};

/**
 * AGP data.
 *
 * \sa drm_agp_init() and drm_device::agp.
 */
typedef struct drm_agp_head {
struct drm_agp_head {
	DRM_AGP_KERN agp_info;		/**< AGP device information */
	struct list_head memory;
	unsigned long mode;		/**< AGP mode */
@@ -458,51 +458,51 @@ typedef struct drm_agp_head {
	int agp_mtrr;
	int cant_use_aperture;
	unsigned long page_mask;
} drm_agp_head_t;
};

/**
 * Scatter-gather memory.
 */
typedef struct drm_sg_mem {
struct drm_sg_mem {
	unsigned long handle;
	void *virtual;
	int pages;
	struct page **pagelist;
	dma_addr_t *busaddr;
} drm_sg_mem_t;
};

typedef struct drm_sigdata {
struct drm_sigdata {
	int context;
	struct drm_hw_lock *lock;
} drm_sigdata_t;
};

/**
 * Mappings list
 */
typedef struct drm_map_list {
struct drm_map_list {
	struct list_head head;		/**< list head */
	drm_hash_item_t hash;
	struct drm_map *map;			/**< mapping */
	unsigned int user_token;
} drm_map_list_t;
};

typedef struct drm_map drm_local_map_t;

/**
 * Context handle list
 */
typedef struct drm_ctx_list {
struct drm_ctx_list {
	struct list_head head;		/**< list head */
	drm_context_t handle;		/**< context handle */
	struct drm_file *tag;		/**< associated fd private data */
} drm_ctx_list_t;
};

typedef struct drm_vbl_sig {
struct drm_vbl_sig {
	struct list_head head;
	unsigned int sequence;
	struct siginfo info;
	struct task_struct *task;
} drm_vbl_sig_t;
};

/* location of GART table */
#define DRM_ATI_GART_MAIN 1
@@ -512,19 +512,19 @@ typedef struct drm_vbl_sig {
#define DRM_ATI_GART_PCIE 2
#define DRM_ATI_GART_IGP 3

typedef struct ati_pcigart_info {
struct drm_ati_pcigart_info {
	int gart_table_location;
	int gart_reg_if;
	void *addr;
	dma_addr_t bus_addr;
	drm_local_map_t mapping;
	int table_size;
} drm_ati_pcigart_info;
};

/*
 * Generic memory manager structs
 */
typedef struct drm_mm_node {
struct drm_mm_node {
	struct list_head fl_entry;
	struct list_head ml_entry;
	int free;
@@ -532,12 +532,12 @@ typedef struct drm_mm_node {
	unsigned long size;
	struct drm_mm *mm;
	void *private;
} drm_mm_node_t;
};

typedef struct drm_mm {
struct drm_mm {
	struct list_head fl_entry;
	struct list_head ml_entry;
} drm_mm_t;
};

/**
 * DRM driver structure. This structure represent the common code for
@@ -680,7 +680,7 @@ struct drm_device {
	int max_context;

	struct list_head vmalist;	/**< List of vmas (for debugging) */
	drm_lock_data_t lock;		/**< Information on hardware lock */
	struct drm_lock_data lock;	/**< Information on hardware lock */
	/*@} */

	/** \name DMA queues (contexts) */
@@ -728,7 +728,7 @@ struct drm_device {
	wait_queue_head_t buf_readers;	/**< Processes waiting to read */
	wait_queue_head_t buf_writers;	/**< Processes waiting to ctx switch */

	drm_agp_head_t *agp;	/**< AGP data */
	struct drm_agp_head *agp;	/**< AGP data */

	struct pci_dev *pdev;		/**< PCI device structure */
	int pci_vendor;			/**< PCI vendor id */
@@ -736,10 +736,10 @@ struct drm_device {
#ifdef __alpha__
	struct pci_controller *hose;
#endif
	drm_sg_mem_t *sg;	/**< Scatter gather memory */
	struct drm_sg_mem *sg;	/**< Scatter gather memory */
	unsigned long *ctx_bitmap;	/**< context bitmap */
	void *dev_private;		/**< device private data */
	drm_sigdata_t sigdata;	   /**< For block_all_signals */
	struct drm_sigdata sigdata;	   /**< For block_all_signals */
	sigset_t sigmask;

	struct drm_driver *driver;
@@ -915,10 +915,10 @@ extern int drm_lock(struct inode *inode, struct file *filp,
		    unsigned int cmd, unsigned long arg);
extern int drm_unlock(struct inode *inode, struct file *filp,
		      unsigned int cmd, unsigned long arg);
extern int drm_lock_take(drm_lock_data_t *lock_data, unsigned int context);
extern int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context);
extern void drm_idlelock_take(drm_lock_data_t *lock_data);
extern void drm_idlelock_release(drm_lock_data_t *lock_data);
extern int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context);
extern int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context);
extern void drm_idlelock_take(struct drm_lock_data *lock_data);
extern void drm_idlelock_release(struct drm_lock_data *lock_data);

/*
 * These are exported to drivers so that they can implement fencing using
@@ -979,7 +979,7 @@ extern void drm_vbl_send_signals(struct drm_device *dev);
extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*));

				/* AGP/GART support (drm_agpsupport.h) */
extern drm_agp_head_t *drm_agp_init(struct drm_device *dev);
extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
extern int drm_agp_acquire(struct drm_device *dev);
extern int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
				 unsigned int cmd, unsigned long arg);
@@ -1033,7 +1033,7 @@ extern int drm_proc_cleanup(int minor,
			    struct proc_dir_entry *dev_root);

				/* Scatter Gather Support (drm_scatter.h) */
extern void drm_sg_cleanup(drm_sg_mem_t * entry);
extern void drm_sg_cleanup(struct drm_sg_mem * entry);
extern int drm_sg_alloc(struct inode *inode, struct file *filp,
			unsigned int cmd, unsigned long arg);
extern int drm_sg_free(struct inode *inode, struct file *filp,
@@ -1041,9 +1041,9 @@ extern int drm_sg_free(struct inode *inode, struct file *filp,

			       /* ATI PCIGART support (ati_pcigart.h) */
extern int drm_ati_pcigart_init(struct drm_device *dev,
				drm_ati_pcigart_info * gart_info);
				struct drm_ati_pcigart_info * gart_info);
extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
				   drm_ati_pcigart_info * gart_info);
				   struct drm_ati_pcigart_info * gart_info);

extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
				       size_t align, dma_addr_t maxaddr);
@@ -1060,18 +1060,18 @@ extern void drm_sysfs_device_remove(struct class_device *class_dev);
/*
 * Basic memory manager support (drm_mm.c)
 */
extern drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node * parent,
				       unsigned long size,
				       unsigned alignment);
void drm_mm_put_block(drm_mm_node_t * cur);
extern drm_mm_node_t *drm_mm_search_free(const drm_mm_t *mm, unsigned long size,
void drm_mm_put_block(struct drm_mm_node * cur);
extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, unsigned long size,
					 unsigned alignment, int best_match);
extern int drm_mm_init(drm_mm_t *mm, unsigned long start, unsigned long size);
extern void drm_mm_takedown(drm_mm_t *mm);
extern int drm_mm_clean(drm_mm_t *mm);
extern unsigned long drm_mm_tail_space(drm_mm_t *mm);
extern int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size);
extern int drm_mm_add_space_to_tail(drm_mm_t *mm, unsigned long size);
extern int drm_mm_init(struct drm_mm *mm, unsigned long start, unsigned long size);
extern void drm_mm_takedown(struct drm_mm *mm);
extern int drm_mm_clean(struct drm_mm *mm);
extern unsigned long drm_mm_tail_space(struct drm_mm *mm);
extern int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size);
extern int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size);

extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev);
extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
@@ -1079,7 +1079,7 @@ extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,
						   unsigned int token)
{
	drm_map_list_t *_entry;
	struct drm_map_list *_entry;
	list_for_each_entry(_entry, &dev->maplist, head)
	    if (_entry->user_token == token)
		return _entry->map;
+9 −9
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
 */
int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request)
{
	drm_agp_mem_t *entry;
	struct drm_agp_mem *entry;
	DRM_AGP_MEM *memory;
	unsigned long pages;
	u32 type;
@@ -258,7 +258,7 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
		return err;

	if (copy_to_user(argp, &request, sizeof(request))) {
		drm_agp_mem_t *entry;
		struct drm_agp_mem *entry;
		list_for_each_entry(entry, &dev->agp->memory, head) {
			if (entry->handle == request.handle)
				break;
@@ -281,10 +281,10 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
 *
 * Walks through drm_agp_head::memory until finding a matching handle.
 */
static drm_agp_mem_t *drm_agp_lookup_entry(struct drm_device * dev,
static struct drm_agp_mem *drm_agp_lookup_entry(struct drm_device * dev,
					   unsigned long handle)
{
	drm_agp_mem_t *entry;
	struct drm_agp_mem *entry;

	list_for_each_entry(entry, &dev->agp->memory, head) {
		if (entry->handle == handle)
@@ -307,7 +307,7 @@ static drm_agp_mem_t *drm_agp_lookup_entry(struct drm_device * dev,
 */
int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
{
	drm_agp_mem_t *entry;
	struct drm_agp_mem *entry;
	int ret;

	if (!dev->agp || !dev->agp->acquired)
@@ -352,7 +352,7 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
 */
int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
{
	drm_agp_mem_t *entry;
	struct drm_agp_mem *entry;
	int retcode;
	int page;

@@ -402,7 +402,7 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
 */
int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
{
	drm_agp_mem_t *entry;
	struct drm_agp_mem *entry;

	if (!dev->agp || !dev->agp->acquired)
		return -EINVAL;
@@ -442,9 +442,9 @@ int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
 * via the inter_module_* functions. Creates and initializes a drm_agp_head
 * structure.
 */
drm_agp_head_t *drm_agp_init(struct drm_device *dev)
struct drm_agp_head *drm_agp_init(struct drm_device *dev)
{
	drm_agp_head_t *head = NULL;
	struct drm_agp_head *head = NULL;

	if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS)))
		return NULL;
+11 −10
Original line number Diff line number Diff line
@@ -49,10 +49,10 @@ unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource

EXPORT_SYMBOL(drm_get_resource_len);

static drm_map_list_t *drm_find_matching_map(struct drm_device *dev,
static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
					     drm_local_map_t *map)
{
	drm_map_list_t *entry;
	struct drm_map_list *entry;
	list_for_each_entry(entry, &dev->maplist, head) {
		if (entry->map && map->type == entry->map->type &&
		    ((entry->map->offset == map->offset) ||
@@ -103,10 +103,11 @@ static int drm_map_handle(struct drm_device *dev, drm_hash_item_t *hash,
 */
static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
			   unsigned int size, enum drm_map_type type,
			   enum drm_map_flags flags, drm_map_list_t ** maplist)
			   enum drm_map_flags flags,
			   struct drm_map_list ** maplist)
{
	struct drm_map *map;
	drm_map_list_t *list;
	struct drm_map_list *list;
	drm_dma_handle_t *dmah;
	unsigned long user_token;
	int ret;
@@ -212,7 +213,7 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
		}
		break;
	case _DRM_AGP: {
		drm_agp_mem_t *entry;
		struct drm_agp_mem *entry;
		int valid = 0;

		if (!drm_core_has_AGP(dev)) {
@@ -314,7 +315,7 @@ int drm_addmap(struct drm_device * dev, unsigned int offset,
	       unsigned int size, enum drm_map_type type,
	       enum drm_map_flags flags, drm_local_map_t ** map_ptr)
{
	drm_map_list_t *list;
	struct drm_map_list *list;
	int rc;

	rc = drm_addmap_core(dev, offset, size, type, flags, &list);
@@ -331,7 +332,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
	struct drm_file *priv = filp->private_data;
	struct drm_device *dev = priv->head->dev;
	struct drm_map map;
	drm_map_list_t *maplist;
	struct drm_map_list *maplist;
	struct drm_map __user *argp = (void __user *)arg;
	int err;

@@ -378,7 +379,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
 */
int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map)
{
	drm_map_list_t *r_list = NULL, *list_t;
	struct drm_map_list *r_list = NULL, *list_t;
	drm_dma_handle_t dmah;
	int found = 0;

@@ -453,7 +454,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
	struct drm_device *dev = priv->head->dev;
	struct drm_map request;
	drm_local_map_t *map = NULL;
	drm_map_list_t *r_list;
	struct drm_map_list *r_list;
	int ret;

	if (copy_from_user(&request, (struct drm_map __user *) arg, sizeof(request))) {
@@ -554,7 +555,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
{
	struct drm_device_dma *dma = dev->dma;
	struct drm_buf_entry *entry;
	drm_agp_mem_t *agp_entry;
	struct drm_agp_mem *agp_entry;
	struct drm_buf *buf;
	unsigned long offset;
	unsigned long agp_offset;
+4 −4
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
	struct drm_ctx_priv_map __user *argp = (void __user *)arg;
	struct drm_ctx_priv_map request;
	struct drm_map *map;
	drm_map_list_t *_entry;
	struct drm_map_list *_entry;

	if (copy_from_user(&request, argp, sizeof(request)))
		return -EFAULT;
@@ -267,7 +267,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
	struct drm_device *dev = priv->head->dev;
	struct drm_ctx_priv_map request;
	struct drm_map *map = NULL;
	drm_map_list_t *r_list = NULL;
	struct drm_map_list *r_list = NULL;

	if (copy_from_user(&request,
			   (struct drm_ctx_priv_map __user *) arg,
@@ -410,7 +410,7 @@ int drm_addctx(struct inode *inode, struct file *filp,
{
	struct drm_file *priv = filp->private_data;
	struct drm_device *dev = priv->head->dev;
	drm_ctx_list_t *ctx_entry;
	struct drm_ctx_list *ctx_entry;
	struct drm_ctx __user *argp = (void __user *)arg;
	struct drm_ctx ctx;

@@ -575,7 +575,7 @@ int drm_rmctx(struct inode *inode, struct file *filp,

	mutex_lock(&dev->ctxlist_mutex);
	if (!list_empty(&dev->ctxlist)) {
		drm_ctx_list_t *pos, *n;
		struct drm_ctx_list *pos, *n;

		list_for_each_entry_safe(pos, n, &dev->ctxlist, head) {
			if (pos->handle == ctx.handle) {
Loading