Commit 056219e2 authored by Dave Airlie's avatar Dave Airlie

drm: drop drm_buf_t typedef

Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent eddca551
...@@ -294,7 +294,7 @@ typedef struct drm_vma_entry { ...@@ -294,7 +294,7 @@ typedef struct drm_vma_entry {
/** /**
* DMA buffer. * DMA buffer.
*/ */
typedef struct drm_buf { struct drm_buf {
int idx; /**< Index into master buflist */ int idx; /**< Index into master buflist */
int total; /**< Buffer size */ int total; /**< Buffer size */
int order; /**< log-base-2(total) */ int order; /**< log-base-2(total) */
...@@ -320,15 +320,15 @@ typedef struct drm_buf { ...@@ -320,15 +320,15 @@ typedef struct drm_buf {
int dev_priv_size; /**< Size of buffer private storage */ int dev_priv_size; /**< Size of buffer private storage */
void *dev_private; /**< Per-buffer private storage */ void *dev_private; /**< Per-buffer private storage */
} drm_buf_t; };
/** bufs is one longer than it has to be */ /** bufs is one longer than it has to be */
typedef struct drm_waitlist { typedef struct drm_waitlist {
int count; /**< Number of possible buffers */ int count; /**< Number of possible buffers */
drm_buf_t **bufs; /**< List of pointers to buffers */ struct drm_buf **bufs; /**< List of pointers to buffers */
drm_buf_t **rp; /**< Read pointer */ struct drm_buf **rp; /**< Read pointer */
drm_buf_t **wp; /**< Write pointer */ struct drm_buf **wp; /**< Write pointer */
drm_buf_t **end; /**< End pointer */ struct drm_buf **end; /**< End pointer */
spinlock_t read_lock; spinlock_t read_lock;
spinlock_t write_lock; spinlock_t write_lock;
} drm_waitlist_t; } drm_waitlist_t;
...@@ -336,7 +336,7 @@ typedef struct drm_waitlist { ...@@ -336,7 +336,7 @@ typedef struct drm_waitlist {
typedef struct drm_freelist { typedef struct drm_freelist {
int initialized; /**< Freelist in use */ int initialized; /**< Freelist in use */
atomic_t count; /**< Number of free buffers */ atomic_t count; /**< Number of free buffers */
drm_buf_t *next; /**< End pointer */ struct drm_buf *next; /**< End pointer */
wait_queue_head_t waiting; /**< Processes waiting on free bufs */ wait_queue_head_t waiting; /**< Processes waiting on free bufs */
int low_mark; /**< Low water mark */ int low_mark; /**< Low water mark */
...@@ -357,7 +357,7 @@ typedef struct drm_dma_handle { ...@@ -357,7 +357,7 @@ typedef struct drm_dma_handle {
typedef struct drm_buf_entry { typedef struct drm_buf_entry {
int buf_size; /**< size */ int buf_size; /**< size */
int buf_count; /**< number of buffers */ int buf_count; /**< number of buffers */
drm_buf_t *buflist; /**< buffer list */ struct drm_buf *buflist; /**< buffer list */
int seg_count; int seg_count;
int page_order; int page_order;
drm_dma_handle_t **seglist; drm_dma_handle_t **seglist;
...@@ -421,7 +421,7 @@ typedef struct drm_device_dma { ...@@ -421,7 +421,7 @@ typedef struct drm_device_dma {
drm_buf_entry_t bufs[DRM_MAX_ORDER + 1]; /**< buffers, grouped by their size order */ drm_buf_entry_t bufs[DRM_MAX_ORDER + 1]; /**< buffers, grouped by their size order */
int buf_count; /**< total number of buffers */ int buf_count; /**< total number of buffers */
drm_buf_t **buflist; /**< Vector of pointers into drm_device_dma::bufs */ struct drm_buf **buflist; /**< Vector of pointers into drm_device_dma::bufs */
int seg_count; int seg_count;
int page_count; /**< number of pages */ int page_count; /**< number of pages */
unsigned long *pagelist; /**< page list */ unsigned long *pagelist; /**< page list */
...@@ -964,7 +964,7 @@ extern unsigned long drm_get_resource_len(struct drm_device *dev, ...@@ -964,7 +964,7 @@ extern unsigned long drm_get_resource_len(struct drm_device *dev,
/* DMA support (drm_dma.h) */ /* DMA support (drm_dma.h) */
extern int drm_dma_setup(struct drm_device *dev); extern int drm_dma_setup(struct drm_device *dev);
extern void drm_dma_takedown(struct drm_device *dev); extern void drm_dma_takedown(struct drm_device *dev);
extern void drm_free_buffer(struct drm_device *dev, drm_buf_t * buf); extern void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf);
extern void drm_core_reclaim_buffers(struct drm_device *dev, struct file *filp); extern void drm_core_reclaim_buffers(struct drm_device *dev, struct file *filp);
/* IRQ support (drm_irq.h) */ /* IRQ support (drm_irq.h) */
......
...@@ -554,7 +554,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request) ...@@ -554,7 +554,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry; drm_buf_entry_t *entry;
drm_agp_mem_t *agp_entry; drm_agp_mem_t *agp_entry;
drm_buf_t *buf; struct drm_buf *buf;
unsigned long offset; unsigned long offset;
unsigned long agp_offset; unsigned long agp_offset;
int count; int count;
...@@ -565,7 +565,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request) ...@@ -565,7 +565,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
int total; int total;
int byte_count; int byte_count;
int i, valid; int i, valid;
drm_buf_t **temp_buflist; struct drm_buf **temp_buflist;
if (!dma) if (!dma)
return -EINVAL; return -EINVAL;
...@@ -729,14 +729,14 @@ int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request) ...@@ -729,14 +729,14 @@ int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request)
int page_order; int page_order;
drm_buf_entry_t *entry; drm_buf_entry_t *entry;
drm_dma_handle_t *dmah; drm_dma_handle_t *dmah;
drm_buf_t *buf; struct drm_buf *buf;
int alignment; int alignment;
unsigned long offset; unsigned long offset;
int i; int i;
int byte_count; int byte_count;
int page_count; int page_count;
unsigned long *temp_pagelist; unsigned long *temp_pagelist;
drm_buf_t **temp_buflist; struct drm_buf **temp_buflist;
if (!drm_core_check_feature(dev, DRIVER_PCI_DMA)) if (!drm_core_check_feature(dev, DRIVER_PCI_DMA))
return -EINVAL; return -EINVAL;
...@@ -949,7 +949,7 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request ...@@ -949,7 +949,7 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry; drm_buf_entry_t *entry;
drm_buf_t *buf; struct drm_buf *buf;
unsigned long offset; unsigned long offset;
unsigned long agp_offset; unsigned long agp_offset;
int count; int count;
...@@ -960,7 +960,7 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request ...@@ -960,7 +960,7 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request
int total; int total;
int byte_count; int byte_count;
int i; int i;
drm_buf_t **temp_buflist; struct drm_buf **temp_buflist;
if (!drm_core_check_feature(dev, DRIVER_SG)) if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL; return -EINVAL;
...@@ -1111,7 +1111,7 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request ...@@ -1111,7 +1111,7 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_entry_t *entry; drm_buf_entry_t *entry;
drm_buf_t *buf; struct drm_buf *buf;
unsigned long offset; unsigned long offset;
unsigned long agp_offset; unsigned long agp_offset;
int count; int count;
...@@ -1122,7 +1122,7 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request ...@@ -1122,7 +1122,7 @@ static int drm_addbufs_fb(struct drm_device * dev, struct drm_buf_desc * request
int total; int total;
int byte_count; int byte_count;
int i; int i;
drm_buf_t **temp_buflist; struct drm_buf **temp_buflist;
if (!drm_core_check_feature(dev, DRIVER_FB_DMA)) if (!drm_core_check_feature(dev, DRIVER_FB_DMA))
return -EINVAL; return -EINVAL;
...@@ -1481,7 +1481,7 @@ int drm_freebufs(struct inode *inode, struct file *filp, ...@@ -1481,7 +1481,7 @@ int drm_freebufs(struct inode *inode, struct file *filp,
struct drm_buf_free request; struct drm_buf_free request;
int i; int i;
int idx; int idx;
drm_buf_t *buf; struct drm_buf *buf;
if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA))
return -EINVAL; return -EINVAL;
......
...@@ -129,7 +129,7 @@ void drm_dma_takedown(struct drm_device *dev) ...@@ -129,7 +129,7 @@ void drm_dma_takedown(struct drm_device *dev)
* *
* Resets the fields of \p buf. * Resets the fields of \p buf.
*/ */
void drm_free_buffer(struct drm_device *dev, drm_buf_t * buf) void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf)
{ {
if (!buf) if (!buf)
return; return;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#define I810_BUF_UNMAPPED 0 #define I810_BUF_UNMAPPED 0
#define I810_BUF_MAPPED 1 #define I810_BUF_MAPPED 1
static drm_buf_t *i810_freelist_get(struct drm_device * dev) static struct drm_buf *i810_freelist_get(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
int i; int i;
...@@ -54,7 +54,7 @@ static drm_buf_t *i810_freelist_get(struct drm_device * dev) ...@@ -54,7 +54,7 @@ static drm_buf_t *i810_freelist_get(struct drm_device * dev)
/* Linear search might not be the best solution */ /* Linear search might not be the best solution */
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
/* In use is already a pointer */ /* In use is already a pointer */
used = cmpxchg(buf_priv->in_use, I810_BUF_FREE, used = cmpxchg(buf_priv->in_use, I810_BUF_FREE,
...@@ -70,7 +70,7 @@ static drm_buf_t *i810_freelist_get(struct drm_device * dev) ...@@ -70,7 +70,7 @@ static drm_buf_t *i810_freelist_get(struct drm_device * dev)
* yet, the hardware updates in use for us once its on the ring buffer. * yet, the hardware updates in use for us once its on the ring buffer.
*/ */
static int i810_freelist_put(struct drm_device * dev, drm_buf_t * buf) static int i810_freelist_put(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
int used; int used;
...@@ -90,7 +90,7 @@ static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma) ...@@ -90,7 +90,7 @@ static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
struct drm_file *priv = filp->private_data; struct drm_file *priv = filp->private_data;
struct drm_device *dev; struct drm_device *dev;
drm_i810_private_t *dev_priv; drm_i810_private_t *dev_priv;
drm_buf_t *buf; struct drm_buf *buf;
drm_i810_buf_priv_t *buf_priv; drm_i810_buf_priv_t *buf_priv;
lock_kernel(); lock_kernel();
...@@ -120,7 +120,7 @@ static const struct file_operations i810_buffer_fops = { ...@@ -120,7 +120,7 @@ static const struct file_operations i810_buffer_fops = {
.fasync = drm_fasync, .fasync = drm_fasync,
}; };
static int i810_map_buffer(drm_buf_t * buf, struct file *filp) static int i810_map_buffer(struct drm_buf * buf, struct file *filp)
{ {
struct drm_file *priv = filp->private_data; struct drm_file *priv = filp->private_data;
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
...@@ -152,7 +152,7 @@ static int i810_map_buffer(drm_buf_t * buf, struct file *filp) ...@@ -152,7 +152,7 @@ static int i810_map_buffer(drm_buf_t * buf, struct file *filp)
return retcode; return retcode;
} }
static int i810_unmap_buffer(drm_buf_t * buf) static int i810_unmap_buffer(struct drm_buf * buf)
{ {
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
int retcode = 0; int retcode = 0;
...@@ -175,7 +175,7 @@ static int i810_unmap_buffer(drm_buf_t * buf) ...@@ -175,7 +175,7 @@ static int i810_unmap_buffer(drm_buf_t * buf)
static int i810_dma_get_buffer(struct drm_device * dev, drm_i810_dma_t * d, static int i810_dma_get_buffer(struct drm_device * dev, drm_i810_dma_t * d,
struct file *filp) struct file *filp)
{ {
drm_buf_t *buf; struct drm_buf *buf;
drm_i810_buf_priv_t *buf_priv; drm_i810_buf_priv_t *buf_priv;
int retcode = 0; int retcode = 0;
...@@ -233,7 +233,7 @@ static int i810_dma_cleanup(struct drm_device * dev) ...@@ -233,7 +233,7 @@ static int i810_dma_cleanup(struct drm_device * dev)
dev->dev_private = NULL; dev->dev_private = NULL;
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
if (buf_priv->kernel_virtual && buf->total) if (buf_priv->kernel_virtual && buf->total)
...@@ -301,7 +301,7 @@ static int i810_freelist_init(struct drm_device * dev, drm_i810_private_t * dev_ ...@@ -301,7 +301,7 @@ static int i810_freelist_init(struct drm_device * dev, drm_i810_private_t * dev_
} }
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
buf_priv->in_use = hw_status++; buf_priv->in_use = hw_status++;
...@@ -788,7 +788,7 @@ static void i810_dma_dispatch_swap(struct drm_device * dev) ...@@ -788,7 +788,7 @@ static void i810_dma_dispatch_swap(struct drm_device * dev)
} }
static void i810_dma_dispatch_vertex(struct drm_device * dev, static void i810_dma_dispatch_vertex(struct drm_device * dev,
drm_buf_t * buf, int discard, int used) struct drm_buf * buf, int discard, int used)
{ {
drm_i810_private_t *dev_priv = dev->dev_private; drm_i810_private_t *dev_priv = dev->dev_private;
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
...@@ -952,7 +952,7 @@ static int i810_flush_queue(struct drm_device * dev) ...@@ -952,7 +952,7 @@ static int i810_flush_queue(struct drm_device * dev)
i810_wait_ring(dev, dev_priv->ring.Size - 8); i810_wait_ring(dev, dev_priv->ring.Size - 8);
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
int used = cmpxchg(buf_priv->in_use, I810_BUF_HARDWARE, int used = cmpxchg(buf_priv->in_use, I810_BUF_HARDWARE,
...@@ -983,7 +983,7 @@ static void i810_reclaim_buffers(struct drm_device * dev, struct file *filp) ...@@ -983,7 +983,7 @@ static void i810_reclaim_buffers(struct drm_device * dev, struct file *filp)
i810_flush_queue(dev); i810_flush_queue(dev);
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i810_buf_priv_t *buf_priv = buf->dev_private; drm_i810_buf_priv_t *buf_priv = buf->dev_private;
if (buf->filp == filp && buf_priv) { if (buf->filp == filp && buf_priv) {
...@@ -1142,7 +1142,7 @@ static int i810_docopy(struct inode *inode, struct file *filp, unsigned int cmd, ...@@ -1142,7 +1142,7 @@ static int i810_docopy(struct inode *inode, struct file *filp, unsigned int cmd,
return 0; return 0;
} }
static void i810_dma_dispatch_mc(struct drm_device * dev, drm_buf_t * buf, int used, static void i810_dma_dispatch_mc(struct drm_device * dev, struct drm_buf * buf, int used,
unsigned int last_render) unsigned int last_render)
{ {
drm_i810_private_t *dev_priv = dev->dev_private; drm_i810_private_t *dev_priv = dev->dev_private;
......
...@@ -88,7 +88,7 @@ typedef struct drm_i810_private { ...@@ -88,7 +88,7 @@ typedef struct drm_i810_private {
dma_addr_t dma_status_page; dma_addr_t dma_status_page;
drm_buf_t *mmap_buffer; struct drm_buf *mmap_buffer;
u32 front_di1, back_di1, zi1; u32 front_di1, back_di1, zi1;
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#define I830_BUF_UNMAPPED 0 #define I830_BUF_UNMAPPED 0
#define I830_BUF_MAPPED 1 #define I830_BUF_MAPPED 1
static drm_buf_t *i830_freelist_get(struct drm_device * dev) static struct drm_buf *i830_freelist_get(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
int i; int i;
...@@ -56,7 +56,7 @@ static drm_buf_t *i830_freelist_get(struct drm_device * dev) ...@@ -56,7 +56,7 @@ static drm_buf_t *i830_freelist_get(struct drm_device * dev)
/* Linear search might not be the best solution */ /* Linear search might not be the best solution */
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
/* In use is already a pointer */ /* In use is already a pointer */
used = cmpxchg(buf_priv->in_use, I830_BUF_FREE, used = cmpxchg(buf_priv->in_use, I830_BUF_FREE,
...@@ -72,7 +72,7 @@ static drm_buf_t *i830_freelist_get(struct drm_device * dev) ...@@ -72,7 +72,7 @@ static drm_buf_t *i830_freelist_get(struct drm_device * dev)
* yet, the hardware updates in use for us once its on the ring buffer. * yet, the hardware updates in use for us once its on the ring buffer.
*/ */
static int i830_freelist_put(struct drm_device * dev, drm_buf_t * buf) static int i830_freelist_put(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
int used; int used;
...@@ -92,7 +92,7 @@ static int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma) ...@@ -92,7 +92,7 @@ static int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
struct drm_file *priv = filp->private_data; struct drm_file *priv = filp->private_data;
struct drm_device *dev; struct drm_device *dev;
drm_i830_private_t *dev_priv; drm_i830_private_t *dev_priv;
drm_buf_t *buf; struct drm_buf *buf;
drm_i830_buf_priv_t *buf_priv; drm_i830_buf_priv_t *buf_priv;
lock_kernel(); lock_kernel();
...@@ -122,7 +122,7 @@ static const struct file_operations i830_buffer_fops = { ...@@ -122,7 +122,7 @@ static const struct file_operations i830_buffer_fops = {
.fasync = drm_fasync, .fasync = drm_fasync,
}; };
static int i830_map_buffer(drm_buf_t * buf, struct file *filp) static int i830_map_buffer(struct drm_buf * buf, struct file *filp)
{ {
struct drm_file *priv = filp->private_data; struct drm_file *priv = filp->private_data;
struct drm_device *dev = priv->head->dev; struct drm_device *dev = priv->head->dev;
...@@ -156,7 +156,7 @@ static int i830_map_buffer(drm_buf_t * buf, struct file *filp) ...@@ -156,7 +156,7 @@ static int i830_map_buffer(drm_buf_t * buf, struct file *filp)
return retcode; return retcode;
} }
static int i830_unmap_buffer(drm_buf_t * buf) static int i830_unmap_buffer(struct drm_buf * buf)
{ {
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
int retcode = 0; int retcode = 0;
...@@ -179,7 +179,7 @@ static int i830_unmap_buffer(drm_buf_t * buf) ...@@ -179,7 +179,7 @@ static int i830_unmap_buffer(drm_buf_t * buf)
static int i830_dma_get_buffer(struct drm_device * dev, drm_i830_dma_t * d, static int i830_dma_get_buffer(struct drm_device * dev, drm_i830_dma_t * d,
struct file *filp) struct file *filp)
{ {
drm_buf_t *buf; struct drm_buf *buf;
drm_i830_buf_priv_t *buf_priv; drm_i830_buf_priv_t *buf_priv;
int retcode = 0; int retcode = 0;
...@@ -238,7 +238,7 @@ static int i830_dma_cleanup(struct drm_device * dev) ...@@ -238,7 +238,7 @@ static int i830_dma_cleanup(struct drm_device * dev)
dev->dev_private = NULL; dev->dev_private = NULL;
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
if (buf_priv->kernel_virtual && buf->total) if (buf_priv->kernel_virtual && buf->total)
drm_core_ioremapfree(&buf_priv->map, dev); drm_core_ioremapfree(&buf_priv->map, dev);
...@@ -309,7 +309,7 @@ static int i830_freelist_init(struct drm_device * dev, drm_i830_private_t * dev_ ...@@ -309,7 +309,7 @@ static int i830_freelist_init(struct drm_device * dev, drm_i830_private_t * dev_
} }
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
buf_priv->in_use = hw_status++; buf_priv->in_use = hw_status++;
...@@ -1087,7 +1087,7 @@ static void i830_dma_dispatch_flip(struct drm_device * dev) ...@@ -1087,7 +1087,7 @@ static void i830_dma_dispatch_flip(struct drm_device * dev)
} }
static void i830_dma_dispatch_vertex(struct drm_device * dev, static void i830_dma_dispatch_vertex(struct drm_device * dev,
drm_buf_t * buf, int discard, int used) struct drm_buf * buf, int discard, int used)
{ {
drm_i830_private_t *dev_priv = dev->dev_private; drm_i830_private_t *dev_priv = dev->dev_private;
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
...@@ -1232,7 +1232,7 @@ static int i830_flush_queue(struct drm_device * dev) ...@@ -1232,7 +1232,7 @@ static int i830_flush_queue(struct drm_device * dev)
i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__);
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
int used = cmpxchg(buf_priv->in_use, I830_BUF_HARDWARE, int used = cmpxchg(buf_priv->in_use, I830_BUF_HARDWARE,
...@@ -1263,7 +1263,7 @@ static void i830_reclaim_buffers(struct drm_device * dev, struct file *filp) ...@@ -1263,7 +1263,7 @@ static void i830_reclaim_buffers(struct drm_device * dev, struct file *filp)
i830_flush_queue(dev); i830_flush_queue(dev);
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_i830_buf_priv_t *buf_priv = buf->dev_private; drm_i830_buf_priv_t *buf_priv = buf->dev_private;
if (buf->filp == filp && buf_priv) { if (buf->filp == filp && buf_priv) {
......
...@@ -95,7 +95,7 @@ typedef struct drm_i830_private { ...@@ -95,7 +95,7 @@ typedef struct drm_i830_private {
dma_addr_t dma_status_page; dma_addr_t dma_status_page;
drm_buf_t *mmap_buffer; struct drm_buf *mmap_buffer;
u32 front_di1, back_di1, zi1; u32 front_di1, back_di1, zi1;
......
...@@ -248,7 +248,7 @@ static void mga_freelist_print(struct drm_device * dev) ...@@ -248,7 +248,7 @@ static void mga_freelist_print(struct drm_device * dev)
static int mga_freelist_init(struct drm_device * dev, drm_mga_private_t * dev_priv) static int mga_freelist_init(struct drm_device * dev, drm_mga_private_t * dev_priv)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_mga_buf_priv_t *buf_priv; drm_mga_buf_priv_t *buf_priv;
drm_mga_freelist_t *entry; drm_mga_freelist_t *entry;
int i; int i;
...@@ -314,7 +314,7 @@ static void mga_freelist_cleanup(struct drm_device * dev) ...@@ -314,7 +314,7 @@ static void mga_freelist_cleanup(struct drm_device * dev)
static void mga_freelist_reset(struct drm_device * dev) static void mga_freelist_reset(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_mga_buf_priv_t *buf_priv; drm_mga_buf_priv_t *buf_priv;
int i; int i;
...@@ -326,7 +326,7 @@ static void mga_freelist_reset(struct drm_device * dev) ...@@ -326,7 +326,7 @@ static void mga_freelist_reset(struct drm_device * dev)
} }
#endif #endif
static drm_buf_t *mga_freelist_get(struct drm_device * dev) static struct drm_buf *mga_freelist_get(struct drm_device * dev)
{ {
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
drm_mga_freelist_t *next; drm_mga_freelist_t *next;
...@@ -359,7 +359,7 @@ static drm_buf_t *mga_freelist_get(struct drm_device * dev) ...@@ -359,7 +359,7 @@ static drm_buf_t *mga_freelist_get(struct drm_device * dev)
return NULL; return NULL;
} }
int mga_freelist_put(struct drm_device * dev, drm_buf_t * buf) int mga_freelist_put(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
drm_mga_buf_priv_t *buf_priv = buf->dev_private; drm_mga_buf_priv_t *buf_priv = buf->dev_private;
...@@ -1088,7 +1088,7 @@ int mga_dma_reset(DRM_IOCTL_ARGS) ...@@ -1088,7 +1088,7 @@ int mga_dma_reset(DRM_IOCTL_ARGS)
static int mga_dma_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm_dma * d) static int mga_dma_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm_dma * d)
{ {
drm_buf_t *buf; struct drm_buf *buf;
int i; int i;
for (i = d->granted_count; i < d->request_count; i++) { for (i = d->granted_count; i < d->request_count; i++) {
......
...@@ -65,7 +65,7 @@ typedef struct drm_mga_freelist { ...@@ -65,7 +65,7 @@ typedef struct drm_mga_freelist {
struct drm_mga_freelist *next; struct drm_mga_freelist *next;
struct drm_mga_freelist *prev; struct drm_mga_freelist *prev;
drm_mga_age_t age; drm_mga_age_t age;
drm_buf_t *buf; struct drm_buf *buf;
} drm_mga_freelist_t; } drm_mga_freelist_t;
typedef struct { typedef struct {
...@@ -168,7 +168,7 @@ extern void mga_do_dma_flush(drm_mga_private_t * dev_priv); ...@@ -168,7 +168,7 @@ extern void mga_do_dma_flush(drm_mga_private_t * dev_priv);
extern void mga_do_dma_wrap_start(drm_mga_private_t * dev_priv); extern void mga_do_dma_wrap_start(drm_mga_private_t * dev_priv);
extern void mga_do_dma_wrap_end(drm_mga_private_t * dev_priv); extern void mga_do_dma_wrap_end(drm_mga_private_t * dev_priv);
extern int mga_freelist_put(struct drm_device * dev, drm_buf_t * buf); extern int mga_freelist_put(struct drm_device * dev, struct drm_buf * buf);
/* mga_warp.c */ /* mga_warp.c */
extern unsigned int mga_warp_microcode_size(const drm_mga_private_t * dev_priv); extern unsigned int mga_warp_microcode_size(const drm_mga_private_t * dev_priv);
......
...@@ -622,7 +622,7 @@ static void mga_dma_dispatch_swap(struct drm_device * dev) ...@@ -622,7 +622,7 @@ static void mga_dma_dispatch_swap(struct drm_device * dev)
DRM_DEBUG("%s... done.\n", __FUNCTION__); DRM_DEBUG("%s... done.\n", __FUNCTION__);
} }
static void mga_dma_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf) static void mga_dma_dispatch_vertex(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
drm_mga_buf_priv_t *buf_priv = buf->dev_private; drm_mga_buf_priv_t *buf_priv = buf->dev_private;
...@@ -669,7 +669,7 @@ static void mga_dma_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf) ...@@ -669,7 +669,7 @@ static void mga_dma_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf)
FLUSH_DMA(); FLUSH_DMA();
} }
static void mga_dma_dispatch_indices(struct drm_device * dev, drm_buf_t * buf, static void mga_dma_dispatch_indices(struct drm_device * dev, struct drm_buf * buf,
unsigned int start, unsigned int end) unsigned int start, unsigned int end)
{ {
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
...@@ -718,7 +718,7 @@ static void mga_dma_dispatch_indices(struct drm_device * dev, drm_buf_t * buf, ...@@ -718,7 +718,7 @@ static void mga_dma_dispatch_indices(struct drm_device * dev, drm_buf_t * buf,
/* This copies a 64 byte aligned agp region to the frambuffer with a /* This copies a 64 byte aligned agp region to the frambuffer with a
* standard blit, the ioctl needs to do checking. * standard blit, the ioctl needs to do checking.
*/ */
static void mga_dma_dispatch_iload(struct drm_device * dev, drm_buf_t * buf, static void mga_dma_dispatch_iload(struct drm_device * dev, struct drm_buf * buf,
unsigned int dstorg, unsigned int length) unsigned int dstorg, unsigned int length)
{ {
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
...@@ -881,7 +881,7 @@ static int mga_dma_vertex(DRM_IOCTL_ARGS) ...@@ -881,7 +881,7 @@ static int mga_dma_vertex(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_mga_buf_priv_t *buf_priv; drm_mga_buf_priv_t *buf_priv;
drm_mga_vertex_t vertex; drm_mga_vertex_t vertex;
...@@ -921,7 +921,7 @@ static int mga_dma_indices(DRM_IOCTL_ARGS) ...@@ -921,7 +921,7 @@ static int mga_dma_indices(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_mga_buf_priv_t *buf_priv; drm_mga_buf_priv_t *buf_priv;
drm_mga_indices_t indices; drm_mga_indices_t indices;
...@@ -961,7 +961,7 @@ static int mga_dma_iload(DRM_IOCTL_ARGS) ...@@ -961,7 +961,7 @@ static int mga_dma_iload(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_private_t *dev_priv = dev->dev_private;
drm_buf_t *buf; struct drm_buf *buf;
drm_mga_buf_priv_t *buf_priv; drm_mga_buf_priv_t *buf_priv;
drm_mga_iload_t iload; drm_mga_iload_t iload;
DRM_DEBUG("\n"); DRM_DEBUG("\n");
......
...@@ -773,7 +773,7 @@ static int r128_freelist_init(struct drm_device * dev) ...@@ -773,7 +773,7 @@ static int r128_freelist_init(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_buf_t *buf; struct drm_buf *buf;
drm_r128_buf_priv_t *buf_priv; drm_r128_buf_priv_t *buf_priv;
drm_r128_freelist_t *entry; drm_r128_freelist_t *entry;
int i; int i;
...@@ -815,12 +815,12 @@ static int r128_freelist_init(struct drm_device * dev) ...@@ -815,12 +815,12 @@ static int r128_freelist_init(struct drm_device * dev)
} }
#endif #endif
static drm_buf_t *r128_freelist_get(struct drm_device * dev) static struct drm_buf *r128_freelist_get(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_r128_buf_priv_t *buf_priv; drm_r128_buf_priv_t *buf_priv;
drm_buf_t *buf; struct drm_buf *buf;
int i, t; int i, t;
/* FIXME: Optimize -- use freelist code */ /* FIXME: Optimize -- use freelist code */
...@@ -859,7 +859,7 @@ void r128_freelist_reset(struct drm_device * dev) ...@@ -859,7 +859,7 @@ void r128_freelist_reset(struct drm_device * dev)
int i; int i;
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_r128_buf_priv_t *buf_priv = buf->dev_private; drm_r128_buf_priv_t *buf_priv = buf->dev_private;
buf_priv->age = 0; buf_priv->age = 0;
} }
...@@ -889,7 +889,7 @@ int r128_wait_ring(drm_r128_private_t * dev_priv, int n) ...@@ -889,7 +889,7 @@ int r128_wait_ring(drm_r128_private_t * dev_priv, int n)
static int r128_cce_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm_dma * d) static int r128_cce_get_buffers(DRMFILE filp, struct drm_device * dev, struct drm_dma * d)
{ {
int i; int i;
drm_buf_t *buf; struct drm_buf *buf;
for (i = d->granted_count; i < d->request_count; i++) { for (i = d->granted_count; i < d->request_count; i++) {
buf = r128_freelist_get(dev); buf = r128_freelist_get(dev);
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
typedef struct drm_r128_freelist { typedef struct drm_r128_freelist {
unsigned int age; unsigned int age;
drm_buf_t *buf; struct drm_buf *buf;
struct drm_r128_freelist *next; struct drm_r128_freelist *next;
struct drm_r128_freelist *prev; struct drm_r128_freelist *prev;
} drm_r128_freelist_t; } drm_r128_freelist_t;
......
...@@ -567,7 +567,7 @@ static void r128_cce_dispatch_flip(struct drm_device * dev) ...@@ -567,7 +567,7 @@ static void r128_cce_dispatch_flip(struct drm_device * dev)
ADVANCE_RING(); ADVANCE_RING();
} }
static void r128_cce_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf) static void r128_cce_dispatch_vertex(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_r128_buf_priv_t *buf_priv = buf->dev_private; drm_r128_buf_priv_t *buf_priv = buf->dev_private;
...@@ -638,7 +638,7 @@ static void r128_cce_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf) ...@@ -638,7 +638,7 @@ static void r128_cce_dispatch_vertex(struct drm_device * dev, drm_buf_t * buf)
} }
static void r128_cce_dispatch_indirect(struct drm_device * dev, static void r128_cce_dispatch_indirect(struct drm_device * dev,
drm_buf_t * buf, int start, int end) struct drm_buf * buf, int start, int end)
{ {
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_r128_buf_priv_t *buf_priv = buf->dev_private; drm_r128_buf_priv_t *buf_priv = buf->dev_private;
...@@ -693,7 +693,7 @@ static void r128_cce_dispatch_indirect(struct drm_device * dev, ...@@ -693,7 +693,7 @@ static void r128_cce_dispatch_indirect(struct drm_device * dev,
} }
static void r128_cce_dispatch_indices(struct drm_device * dev, static void r128_cce_dispatch_indices(struct drm_device * dev,
drm_buf_t * buf, struct drm_buf * buf,
int start, int end, int count) int start, int end, int count)
{ {
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
...@@ -781,7 +781,7 @@ static int r128_cce_dispatch_blit(DRMFILE filp, ...@@ -781,7 +781,7 @@ static int r128_cce_dispatch_blit(DRMFILE filp,
{ {
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_r128_buf_priv_t *buf_priv; drm_r128_buf_priv_t *buf_priv;
u32 *data; u32 *data;
int dword_shift, dwords; int dword_shift, dwords;
...@@ -1355,7 +1355,7 @@ static int r128_cce_vertex(DRM_IOCTL_ARGS) ...@@ -1355,7 +1355,7 @@ static int r128_cce_vertex(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_r128_buf_priv_t *buf_priv; drm_r128_buf_priv_t *buf_priv;
drm_r128_vertex_t vertex; drm_r128_vertex_t vertex;
...@@ -1414,7 +1414,7 @@ static int r128_cce_indices(DRM_IOCTL_ARGS) ...@@ -1414,7 +1414,7 @@ static int r128_cce_indices(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_r128_buf_priv_t *buf_priv; drm_r128_buf_priv_t *buf_priv;
drm_r128_indices_t elts; drm_r128_indices_t elts;
int count; int count;
...@@ -1572,7 +1572,7 @@ static int r128_cce_indirect(DRM_IOCTL_ARGS) ...@@ -1572,7 +1572,7 @@ static int r128_cce_indirect(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_r128_buf_priv_t *buf_priv; drm_r128_buf_priv_t *buf_priv;
drm_r128_indirect_t indirect; drm_r128_indirect_t indirect;
#if 0 #if 0
......
...@@ -706,7 +706,7 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv) ...@@ -706,7 +706,7 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv)
* The actual age emit is done by r300_do_cp_cmdbuf, which is why you must * The actual age emit is done by r300_do_cp_cmdbuf, which is why you must
* be careful about how this function is called. * be careful about how this function is called.
*/ */
static void r300_discard_buffer(struct drm_device * dev, drm_buf_t * buf) static void r300_discard_buffer(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_buf_priv_t *buf_priv = buf->dev_private; drm_radeon_buf_priv_t *buf_priv = buf->dev_private;
...@@ -786,7 +786,7 @@ int r300_do_cp_cmdbuf(struct drm_device *dev, ...@@ -786,7 +786,7 @@ int r300_do_cp_cmdbuf(struct drm_device *dev,
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf = NULL; struct drm_buf *buf = NULL;
int emit_dispatch_age = 0; int emit_dispatch_age = 0;
int ret = 0; int ret = 0;
......
...@@ -2046,12 +2046,12 @@ int radeon_fullscreen(DRM_IOCTL_ARGS) ...@@ -2046,12 +2046,12 @@ int radeon_fullscreen(DRM_IOCTL_ARGS)
* they can't get the lock. * they can't get the lock.
*/ */
drm_buf_t *radeon_freelist_get(struct drm_device * dev) struct drm_buf *radeon_freelist_get(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_buf_priv_t *buf_priv; drm_radeon_buf_priv_t *buf_priv;
drm_buf_t *buf; struct drm_buf *buf;
int i, t; int i, t;
int start; int start;
...@@ -2086,12 +2086,12 @@ drm_buf_t *radeon_freelist_get(struct drm_device * dev) ...@@ -2086,12 +2086,12 @@ drm_buf_t *radeon_freelist_get(struct drm_device * dev)
} }
#if 0 #if 0
drm_buf_t *radeon_freelist_get(struct drm_device * dev) struct drm_buf *radeon_freelist_get(struct drm_device * dev)
{ {
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_buf_priv_t *buf_priv; drm_radeon_buf_priv_t *buf_priv;
drm_buf_t *buf; struct drm_buf *buf;
int i, t; int i, t;
int start; int start;
u32 done_age = DRM_READ32(dev_priv->ring_rptr, RADEON_SCRATCHOFF(1)); u32 done_age = DRM_READ32(dev_priv->ring_rptr, RADEON_SCRATCHOFF(1));
...@@ -2128,7 +2128,7 @@ void radeon_freelist_reset(struct drm_device * dev) ...@@ -2128,7 +2128,7 @@ void radeon_freelist_reset(struct drm_device * dev)
dev_priv->last_buf = 0; dev_priv->last_buf = 0;
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_radeon_buf_priv_t *buf_priv = buf->dev_private; drm_radeon_buf_priv_t *buf_priv = buf->dev_private;
buf_priv->age = 0; buf_priv->age = 0;
} }
...@@ -2174,7 +2174,7 @@ static int radeon_cp_get_buffers(DRMFILE filp, struct drm_device * dev, ...@@ -2174,7 +2174,7 @@ static int radeon_cp_get_buffers(DRMFILE filp, struct drm_device * dev,
struct drm_dma * d) struct drm_dma * d)
{ {
int i; int i;
drm_buf_t *buf; struct drm_buf *buf;
for (i = d->granted_count; i < d->request_count; i++) { for (i = d->granted_count; i < d->request_count; i++) {
buf = radeon_freelist_get(dev); buf = radeon_freelist_get(dev);
......
...@@ -155,7 +155,7 @@ enum radeon_chip_flags { ...@@ -155,7 +155,7 @@ enum radeon_chip_flags {
typedef struct drm_radeon_freelist { typedef struct drm_radeon_freelist {
unsigned int age; unsigned int age;
drm_buf_t *buf; struct drm_buf *buf;
struct drm_radeon_freelist *next; struct drm_radeon_freelist *next;
struct drm_radeon_freelist *prev; struct drm_radeon_freelist *prev;
} drm_radeon_freelist_t; } drm_radeon_freelist_t;
...@@ -337,7 +337,7 @@ extern int radeon_fullscreen(DRM_IOCTL_ARGS); ...@@ -337,7 +337,7 @@ extern int radeon_fullscreen(DRM_IOCTL_ARGS);
extern int radeon_cp_buffers(DRM_IOCTL_ARGS); extern int radeon_cp_buffers(DRM_IOCTL_ARGS);
extern void radeon_freelist_reset(struct drm_device * dev); extern void radeon_freelist_reset(struct drm_device * dev);
extern drm_buf_t *radeon_freelist_get(struct drm_device * dev); extern struct drm_buf *radeon_freelist_get(struct drm_device * dev);
extern int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n); extern int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n);
......
...@@ -1492,7 +1492,7 @@ typedef struct { ...@@ -1492,7 +1492,7 @@ typedef struct {
} drm_radeon_tcl_prim_t; } drm_radeon_tcl_prim_t;
static void radeon_cp_dispatch_vertex(struct drm_device * dev, static void radeon_cp_dispatch_vertex(struct drm_device * dev,
drm_buf_t * buf, struct drm_buf * buf,
drm_radeon_tcl_prim_t * prim) drm_radeon_tcl_prim_t * prim)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -1537,7 +1537,7 @@ static void radeon_cp_dispatch_vertex(struct drm_device * dev, ...@@ -1537,7 +1537,7 @@ static void radeon_cp_dispatch_vertex(struct drm_device * dev,
} while (i < nbox); } while (i < nbox);
} }
static void radeon_cp_discard_buffer(struct drm_device * dev, drm_buf_t * buf) static void radeon_cp_discard_buffer(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_radeon_buf_priv_t *buf_priv = buf->dev_private; drm_radeon_buf_priv_t *buf_priv = buf->dev_private;
...@@ -1555,7 +1555,7 @@ static void radeon_cp_discard_buffer(struct drm_device * dev, drm_buf_t * buf) ...@@ -1555,7 +1555,7 @@ static void radeon_cp_discard_buffer(struct drm_device * dev, drm_buf_t * buf)
} }
static void radeon_cp_dispatch_indirect(struct drm_device * dev, static void radeon_cp_dispatch_indirect(struct drm_device * dev,
drm_buf_t * buf, int start, int end) struct drm_buf * buf, int start, int end)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
RING_LOCALS; RING_LOCALS;
...@@ -1589,7 +1589,7 @@ static void radeon_cp_dispatch_indirect(struct drm_device * dev, ...@@ -1589,7 +1589,7 @@ static void radeon_cp_dispatch_indirect(struct drm_device * dev,
} }
static void radeon_cp_dispatch_indices(struct drm_device * dev, static void radeon_cp_dispatch_indices(struct drm_device * dev,
drm_buf_t * elt_buf, struct drm_buf * elt_buf,
drm_radeon_tcl_prim_t * prim) drm_radeon_tcl_prim_t * prim)
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
...@@ -1653,7 +1653,7 @@ static int radeon_cp_dispatch_texture(DRMFILE filp, ...@@ -1653,7 +1653,7 @@ static int radeon_cp_dispatch_texture(DRMFILE filp,
{ {
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
struct drm_file *filp_priv; struct drm_file *filp_priv;
drm_buf_t *buf; struct drm_buf *buf;
u32 format; u32 format;
u32 *buffer; u32 *buffer;
const u8 __user *data; const u8 __user *data;
...@@ -2209,7 +2209,7 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS) ...@@ -2209,7 +2209,7 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS)
struct drm_file *filp_priv; struct drm_file *filp_priv;
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_radeon_vertex_t vertex; drm_radeon_vertex_t vertex;
drm_radeon_tcl_prim_t prim; drm_radeon_tcl_prim_t prim;
...@@ -2292,7 +2292,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS) ...@@ -2292,7 +2292,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS)
struct drm_file *filp_priv; struct drm_file *filp_priv;
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_radeon_indices_t elts; drm_radeon_indices_t elts;
drm_radeon_tcl_prim_t prim; drm_radeon_tcl_prim_t prim;
int count; int count;
...@@ -2439,7 +2439,7 @@ static int radeon_cp_indirect(DRM_IOCTL_ARGS) ...@@ -2439,7 +2439,7 @@ static int radeon_cp_indirect(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_radeon_indirect_t indirect; drm_radeon_indirect_t indirect;
RING_LOCALS; RING_LOCALS;
...@@ -2510,7 +2510,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS) ...@@ -2510,7 +2510,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
struct drm_file *filp_priv; struct drm_file *filp_priv;
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_radeon_vertex2_t vertex; drm_radeon_vertex2_t vertex;
int i; int i;
unsigned char laststate; unsigned char laststate;
...@@ -2851,7 +2851,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS) ...@@ -2851,7 +2851,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS)
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
struct drm_file *filp_priv; struct drm_file *filp_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf = NULL; struct drm_buf *buf = NULL;
int idx; int idx;
drm_radeon_kcmd_buffer_t cmdbuf; drm_radeon_kcmd_buffer_t cmdbuf;
drm_radeon_cmd_header_t header; drm_radeon_cmd_header_t header;
......
...@@ -207,7 +207,7 @@ static int savage_freelist_init(struct drm_device * dev) ...@@ -207,7 +207,7 @@ static int savage_freelist_init(struct drm_device * dev)
{ {
drm_savage_private_t *dev_priv = dev->dev_private; drm_savage_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf; struct drm_buf *buf;
drm_savage_buf_priv_t *entry; drm_savage_buf_priv_t *entry;
int i; int i;
DRM_DEBUG("count=%d\n", dma->buf_count); DRM_DEBUG("count=%d\n", dma->buf_count);
...@@ -236,7 +236,7 @@ static int savage_freelist_init(struct drm_device * dev) ...@@ -236,7 +236,7 @@ static int savage_freelist_init(struct drm_device * dev)
return 0; return 0;
} }
static drm_buf_t *savage_freelist_get(struct drm_device * dev) static struct drm_buf *savage_freelist_get(struct drm_device * dev)
{ {
drm_savage_private_t *dev_priv = dev->dev_private; drm_savage_private_t *dev_priv = dev->dev_private;
drm_savage_buf_priv_t *tail = dev_priv->tail.prev; drm_savage_buf_priv_t *tail = dev_priv->tail.prev;
...@@ -269,7 +269,7 @@ static drm_buf_t *savage_freelist_get(struct drm_device * dev) ...@@ -269,7 +269,7 @@ static drm_buf_t *savage_freelist_get(struct drm_device * dev)
return NULL; return NULL;
} }
void savage_freelist_put(struct drm_device * dev, drm_buf_t * buf) void savage_freelist_put(struct drm_device * dev, struct drm_buf * buf)
{ {
drm_savage_private_t *dev_priv = dev->dev_private; drm_savage_private_t *dev_priv = dev->dev_private;
drm_savage_buf_priv_t *entry = buf->dev_private, *prev, *next; drm_savage_buf_priv_t *entry = buf->dev_private, *prev, *next;
...@@ -1009,7 +1009,7 @@ static int savage_bci_event_wait(DRM_IOCTL_ARGS) ...@@ -1009,7 +1009,7 @@ static int savage_bci_event_wait(DRM_IOCTL_ARGS)
static int savage_bci_get_buffers(DRMFILE filp, struct drm_device *dev, struct drm_dma *d) static int savage_bci_get_buffers(DRMFILE filp, struct drm_device *dev, struct drm_dma *d)
{ {
drm_buf_t *buf; struct drm_buf *buf;
int i; int i;
for (i = d->granted_count; i < d->request_count; i++) { for (i = d->granted_count; i < d->request_count; i++) {
...@@ -1085,7 +1085,7 @@ void savage_reclaim_buffers(struct drm_device *dev, DRMFILE filp) ...@@ -1085,7 +1085,7 @@ void savage_reclaim_buffers(struct drm_device *dev, DRMFILE filp)
/*i830_flush_queue(dev); */ /*i830_flush_queue(dev); */
for (i = 0; i < dma->buf_count; i++) { for (i = 0; i < dma->buf_count; i++) {
drm_buf_t *buf = dma->buflist[i]; struct drm_buf *buf = dma->buflist[i];
drm_savage_buf_priv_t *buf_priv = buf->dev_private; drm_savage_buf_priv_t *buf_priv = buf->dev_private;
if (buf->filp == filp && buf_priv && if (buf->filp == filp && buf_priv &&
......
...@@ -58,7 +58,7 @@ typedef struct drm_savage_buf_priv { ...@@ -58,7 +58,7 @@ typedef struct drm_savage_buf_priv {
struct drm_savage_buf_priv *next; struct drm_savage_buf_priv *next;
struct drm_savage_buf_priv *prev; struct drm_savage_buf_priv *prev;
drm_savage_age_t age; drm_savage_age_t age;
drm_buf_t *buf; struct drm_buf *buf;
} drm_savage_buf_priv_t; } drm_savage_buf_priv_t;
typedef struct drm_savage_dma_page { typedef struct drm_savage_dma_page {
...@@ -203,7 +203,7 @@ extern int savage_bci_buffers(DRM_IOCTL_ARGS); ...@@ -203,7 +203,7 @@ extern int savage_bci_buffers(DRM_IOCTL_ARGS);
/* BCI functions */ /* BCI functions */
extern uint16_t savage_bci_emit_event(drm_savage_private_t * dev_priv, extern uint16_t savage_bci_emit_event(drm_savage_private_t * dev_priv,
unsigned int flags); unsigned int flags);
extern void savage_freelist_put(struct drm_device * dev, drm_buf_t * buf); extern void savage_freelist_put(struct drm_device * dev, struct drm_buf * buf);
extern void savage_dma_reset(drm_savage_private_t * dev_priv); extern void savage_dma_reset(drm_savage_private_t * dev_priv);
extern void savage_dma_wait(drm_savage_private_t * dev_priv, unsigned int page); extern void savage_dma_wait(drm_savage_private_t * dev_priv, unsigned int page);
extern uint32_t *savage_dma_alloc(drm_savage_private_t * dev_priv, extern uint32_t *savage_dma_alloc(drm_savage_private_t * dev_priv,
......
...@@ -277,7 +277,7 @@ static int savage_dispatch_state(drm_savage_private_t * dev_priv, ...@@ -277,7 +277,7 @@ static int savage_dispatch_state(drm_savage_private_t * dev_priv,
static int savage_dispatch_dma_prim(drm_savage_private_t * dev_priv, static int savage_dispatch_dma_prim(drm_savage_private_t * dev_priv,
const drm_savage_cmd_header_t * cmd_header, const drm_savage_cmd_header_t * cmd_header,
const drm_buf_t * dmabuf) const struct drm_buf * dmabuf)
{ {
unsigned char reorder = 0; unsigned char reorder = 0;
unsigned int prim = cmd_header->prim.prim; unsigned int prim = cmd_header->prim.prim;
...@@ -536,7 +536,7 @@ static int savage_dispatch_vb_prim(drm_savage_private_t * dev_priv, ...@@ -536,7 +536,7 @@ static int savage_dispatch_vb_prim(drm_savage_private_t * dev_priv,
static int savage_dispatch_dma_idx(drm_savage_private_t * dev_priv, static int savage_dispatch_dma_idx(drm_savage_private_t * dev_priv,
const drm_savage_cmd_header_t * cmd_header, const drm_savage_cmd_header_t * cmd_header,
const uint16_t *idx, const uint16_t *idx,
const drm_buf_t * dmabuf) const struct drm_buf * dmabuf)
{ {
unsigned char reorder = 0; unsigned char reorder = 0;
unsigned int prim = cmd_header->idx.prim; unsigned int prim = cmd_header->idx.prim;
...@@ -892,7 +892,7 @@ static int savage_dispatch_swap(drm_savage_private_t * dev_priv, ...@@ -892,7 +892,7 @@ static int savage_dispatch_swap(drm_savage_private_t * dev_priv,
static int savage_dispatch_draw(drm_savage_private_t * dev_priv, static int savage_dispatch_draw(drm_savage_private_t * dev_priv,
const drm_savage_cmd_header_t *start, const drm_savage_cmd_header_t *start,
const drm_savage_cmd_header_t *end, const drm_savage_cmd_header_t *end,
const drm_buf_t * dmabuf, const struct drm_buf * dmabuf,
const unsigned int *vtxbuf, const unsigned int *vtxbuf,
unsigned int vb_size, unsigned int vb_stride, unsigned int vb_size, unsigned int vb_stride,
unsigned int nbox, unsigned int nbox,
...@@ -958,7 +958,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS) ...@@ -958,7 +958,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
DRM_DEVICE; DRM_DEVICE;
drm_savage_private_t *dev_priv = dev->dev_private; drm_savage_private_t *dev_priv = dev->dev_private;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *dmabuf; struct drm_buf *dmabuf;
drm_savage_cmdbuf_t cmdbuf; drm_savage_cmdbuf_t cmdbuf;
drm_savage_cmd_header_t *kcmd_addr = NULL; drm_savage_cmd_header_t *kcmd_addr = NULL;
drm_savage_cmd_header_t *first_draw_cmd; drm_savage_cmd_header_t *first_draw_cmd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment