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
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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) {
......
......@@ -132,7 +132,7 @@ static drm_ioctl_desc_t drm_ioctls[] = {
int drm_lastclose(struct drm_device * dev)
{
struct drm_magic_entry *pt, *next;
drm_map_list_t *r_list, *list_t;
struct drm_map_list *r_list, *list_t;
struct drm_vma_entry *vma, *vma_temp;
int i;
......@@ -178,7 +178,7 @@ int drm_lastclose(struct drm_device * dev)
/* Clear AGP information */
if (drm_core_has_AGP(dev) && dev->agp) {
drm_agp_mem_t *entry, *tempe;
struct drm_agp_mem *entry, *tempe;
/* Remove AGP resources, but leave dev->agp
intact until drv_cleanup is called. */
......@@ -520,7 +520,7 @@ EXPORT_SYMBOL(drm_ioctl);
drm_local_map_t *drm_getsarea(struct drm_device *dev)
{
drm_map_list_t *entry;
struct drm_map_list *entry;
list_for_each_entry(entry, &dev->maplist, head) {
if (entry->map && entry->map->type == _DRM_SHM &&
......
......@@ -401,7 +401,7 @@ int drm_release(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->tag == priv &&
......
......@@ -188,7 +188,7 @@ int drm_getmap(struct inode *inode, struct file *filp,
struct drm_device *dev = priv->head->dev;
struct drm_map __user *argp = (void __user *)arg;
struct drm_map map;
drm_map_list_t *r_list = NULL;
struct drm_map_list *r_list = NULL;
struct list_head *list;
int idx;
int i;
......@@ -206,7 +206,7 @@ int drm_getmap(struct inode *inode, struct file *filp,
i = 0;
list_for_each(list, &dev->maplist) {
if (i == idx) {
r_list = list_entry(list, drm_map_list_t, head);
r_list = list_entry(list, struct drm_map_list, head);
break;
}
i++;
......
......@@ -294,7 +294,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
unsigned long irqflags;
struct list_head *vbl_sigs = (flags & _DRM_VBLANK_SECONDARY)
? &dev->vbl_sigs2 : &dev->vbl_sigs;
drm_vbl_sig_t *vbl_sig;
struct drm_vbl_sig *vbl_sig;
spin_lock_irqsave(&dev->vbl_lock, irqflags);
......@@ -324,7 +324,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
if (!
(vbl_sig =
drm_alloc(sizeof(drm_vbl_sig_t), DRM_MEM_DRIVER))) {
drm_alloc(sizeof(struct drm_vbl_sig), DRM_MEM_DRIVER))) {
return -ENOMEM;
}
......@@ -379,7 +379,7 @@ void drm_vbl_send_signals(struct drm_device * dev)
spin_lock_irqsave(&dev->vbl_lock, flags);
for (i = 0; i < 2; i++) {
drm_vbl_sig_t *vbl_sig, *tmp;
struct drm_vbl_sig *vbl_sig, *tmp;
struct list_head *vbl_sigs = i ? &dev->vbl_sigs2 : &dev->vbl_sigs;
unsigned int vbl_seq = atomic_read(i ? &dev->vbl_received2 :
&dev->vbl_received);
......
......@@ -202,7 +202,7 @@ int drm_unlock(struct inode *inode, struct file *filp,
*
* Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
*/
int drm_lock_take(drm_lock_data_t *lock_data,
int drm_lock_take(struct drm_lock_data *lock_data,
unsigned int context)
{
unsigned int old, new, prev;
......@@ -251,7 +251,7 @@ int drm_lock_take(drm_lock_data_t *lock_data,
* Resets the lock file pointer.
* Marks the lock as held by the given context, via the \p cmpxchg instruction.
*/
static int drm_lock_transfer(drm_lock_data_t *lock_data,
static int drm_lock_transfer(struct drm_lock_data *lock_data,
unsigned int context)
{
unsigned int old, new, prev;
......@@ -277,7 +277,7 @@ static int drm_lock_transfer(drm_lock_data_t *lock_data,
* Marks the lock as not held, via the \p cmpxchg instruction. Wakes any task
* waiting on the lock queue.
*/
int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context)
int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context)
{
unsigned int old, new, prev;
volatile unsigned int *lock = &lock_data->hw_lock->lock;
......@@ -319,7 +319,7 @@ int drm_lock_free(drm_lock_data_t *lock_data, unsigned int context)
*/
static int drm_notifier(void *priv)
{
drm_sigdata_t *s = (drm_sigdata_t *) priv;
struct drm_sigdata *s = (struct drm_sigdata *) priv;
unsigned int old, new, prev;
/* Allow signal delivery if lock isn't held */
......@@ -350,7 +350,7 @@ static int drm_notifier(void *priv)
* having to worry about starvation.
*/
void drm_idlelock_take(drm_lock_data_t *lock_data)
void drm_idlelock_take(struct drm_lock_data *lock_data)
{
int ret = 0;
......@@ -369,7 +369,7 @@ void drm_idlelock_take(drm_lock_data_t *lock_data)
}
EXPORT_SYMBOL(drm_idlelock_take);
void drm_idlelock_release(drm_lock_data_t *lock_data)
void drm_idlelock_release(struct drm_lock_data *lock_data)
{
unsigned int old, prev;
volatile unsigned int *lock = &lock_data->hw_lock->lock;
......
......@@ -44,26 +44,26 @@
#include "drmP.h"
#include <linux/slab.h>
unsigned long drm_mm_tail_space(drm_mm_t *mm)
unsigned long drm_mm_tail_space(struct drm_mm *mm)
{
struct list_head *tail_node;
drm_mm_node_t *entry;
struct drm_mm_node *entry;
tail_node = mm->ml_entry.prev;
entry = list_entry(tail_node, drm_mm_node_t, ml_entry);
entry = list_entry(tail_node, struct drm_mm_node, ml_entry);
if (!entry->free)
return 0;
return entry->size;
}
int drm_mm_remove_space_from_tail(drm_mm_t *mm, unsigned long size)
int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size)
{
struct list_head *tail_node;
drm_mm_node_t *entry;
struct drm_mm_node *entry;