diff options
Diffstat (limited to 'drivers/char/drm/i810_dma.c')
-rw-r--r-- | drivers/char/drm/i810_dma.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c index ca82cddb4a22..b4a98fa2e2d4 100644 --- a/drivers/char/drm/i810_dma.c +++ b/drivers/char/drm/i810_dma.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #define I810_BUF_UNMAPPED 0 | 45 | #define I810_BUF_UNMAPPED 0 |
46 | #define I810_BUF_MAPPED 1 | 46 | #define I810_BUF_MAPPED 1 |
47 | 47 | ||
48 | static drm_buf_t *i810_freelist_get(struct drm_device * dev) | 48 | static struct drm_buf *i810_freelist_get(struct drm_device * dev) |
49 | { | 49 | { |
50 | drm_device_dma_t *dma = dev->dma; | 50 | drm_device_dma_t *dma = dev->dma; |
51 | int i; | 51 | int i; |
@@ -54,7 +54,7 @@ static drm_buf_t *i810_freelist_get(struct drm_device * dev) | |||
54 | /* Linear search might not be the best solution */ | 54 | /* Linear search might not be the best solution */ |
55 | 55 | ||
56 | for (i = 0; i < dma->buf_count; i++) { | 56 | for (i = 0; i < dma->buf_count; i++) { |
57 | drm_buf_t *buf = dma->buflist[i]; | 57 | struct drm_buf *buf = dma->buflist[i]; |
58 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 58 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
59 | /* In use is already a pointer */ | 59 | /* In use is already a pointer */ |
60 | used = cmpxchg(buf_priv->in_use, I810_BUF_FREE, | 60 | 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 | * yet, the hardware updates in use for us once its on the ring buffer. | 70 | * yet, the hardware updates in use for us once its on the ring buffer. |
71 | */ | 71 | */ |
72 | 72 | ||
73 | static int i810_freelist_put(struct drm_device * dev, drm_buf_t * buf) | 73 | static int i810_freelist_put(struct drm_device * dev, struct drm_buf * buf) |
74 | { | 74 | { |
75 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 75 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
76 | int used; | 76 | int used; |
@@ -90,7 +90,7 @@ static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma) | |||
90 | struct drm_file *priv = filp->private_data; | 90 | struct drm_file *priv = filp->private_data; |
91 | struct drm_device *dev; | 91 | struct drm_device *dev; |
92 | drm_i810_private_t *dev_priv; | 92 | drm_i810_private_t *dev_priv; |
93 | drm_buf_t *buf; | 93 | struct drm_buf *buf; |
94 | drm_i810_buf_priv_t *buf_priv; | 94 | drm_i810_buf_priv_t *buf_priv; |
95 | 95 | ||
96 | lock_kernel(); | 96 | lock_kernel(); |
@@ -120,7 +120,7 @@ static const struct file_operations i810_buffer_fops = { | |||
120 | .fasync = drm_fasync, | 120 | .fasync = drm_fasync, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static int i810_map_buffer(drm_buf_t * buf, struct file *filp) | 123 | static int i810_map_buffer(struct drm_buf * buf, struct file *filp) |
124 | { | 124 | { |
125 | struct drm_file *priv = filp->private_data; | 125 | struct drm_file *priv = filp->private_data; |
126 | struct drm_device *dev = priv->head->dev; | 126 | struct drm_device *dev = priv->head->dev; |
@@ -152,7 +152,7 @@ static int i810_map_buffer(drm_buf_t * buf, struct file *filp) | |||
152 | return retcode; | 152 | return retcode; |
153 | } | 153 | } |
154 | 154 | ||
155 | static int i810_unmap_buffer(drm_buf_t * buf) | 155 | static int i810_unmap_buffer(struct drm_buf * buf) |
156 | { | 156 | { |
157 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 157 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
158 | int retcode = 0; | 158 | int retcode = 0; |
@@ -175,7 +175,7 @@ static int i810_unmap_buffer(drm_buf_t * buf) | |||
175 | static int i810_dma_get_buffer(struct drm_device * dev, drm_i810_dma_t * d, | 175 | static int i810_dma_get_buffer(struct drm_device * dev, drm_i810_dma_t * d, |
176 | struct file *filp) | 176 | struct file *filp) |
177 | { | 177 | { |
178 | drm_buf_t *buf; | 178 | struct drm_buf *buf; |
179 | drm_i810_buf_priv_t *buf_priv; | 179 | drm_i810_buf_priv_t *buf_priv; |
180 | int retcode = 0; | 180 | int retcode = 0; |
181 | 181 | ||
@@ -233,7 +233,7 @@ static int i810_dma_cleanup(struct drm_device * dev) | |||
233 | dev->dev_private = NULL; | 233 | dev->dev_private = NULL; |
234 | 234 | ||
235 | for (i = 0; i < dma->buf_count; i++) { | 235 | for (i = 0; i < dma->buf_count; i++) { |
236 | drm_buf_t *buf = dma->buflist[i]; | 236 | struct drm_buf *buf = dma->buflist[i]; |
237 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 237 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
238 | 238 | ||
239 | if (buf_priv->kernel_virtual && buf->total) | 239 | 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 | } | 301 | } |
302 | 302 | ||
303 | for (i = 0; i < dma->buf_count; i++) { | 303 | for (i = 0; i < dma->buf_count; i++) { |
304 | drm_buf_t *buf = dma->buflist[i]; | 304 | struct drm_buf *buf = dma->buflist[i]; |
305 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 305 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
306 | 306 | ||
307 | buf_priv->in_use = hw_status++; | 307 | buf_priv->in_use = hw_status++; |
@@ -788,7 +788,7 @@ static void i810_dma_dispatch_swap(struct drm_device * dev) | |||
788 | } | 788 | } |
789 | 789 | ||
790 | static void i810_dma_dispatch_vertex(struct drm_device * dev, | 790 | static void i810_dma_dispatch_vertex(struct drm_device * dev, |
791 | drm_buf_t * buf, int discard, int used) | 791 | struct drm_buf * buf, int discard, int used) |
792 | { | 792 | { |
793 | drm_i810_private_t *dev_priv = dev->dev_private; | 793 | drm_i810_private_t *dev_priv = dev->dev_private; |
794 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 794 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
@@ -952,7 +952,7 @@ static int i810_flush_queue(struct drm_device * dev) | |||
952 | i810_wait_ring(dev, dev_priv->ring.Size - 8); | 952 | i810_wait_ring(dev, dev_priv->ring.Size - 8); |
953 | 953 | ||
954 | for (i = 0; i < dma->buf_count; i++) { | 954 | for (i = 0; i < dma->buf_count; i++) { |
955 | drm_buf_t *buf = dma->buflist[i]; | 955 | struct drm_buf *buf = dma->buflist[i]; |
956 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 956 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
957 | 957 | ||
958 | int used = cmpxchg(buf_priv->in_use, I810_BUF_HARDWARE, | 958 | 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 | i810_flush_queue(dev); | 983 | i810_flush_queue(dev); |
984 | 984 | ||
985 | for (i = 0; i < dma->buf_count; i++) { | 985 | for (i = 0; i < dma->buf_count; i++) { |
986 | drm_buf_t *buf = dma->buflist[i]; | 986 | struct drm_buf *buf = dma->buflist[i]; |
987 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 987 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
988 | 988 | ||
989 | if (buf->filp == filp && buf_priv) { | 989 | if (buf->filp == filp && buf_priv) { |
@@ -1142,7 +1142,7 @@ static int i810_docopy(struct inode *inode, struct file *filp, unsigned int cmd, | |||
1142 | return 0; | 1142 | return 0; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | static void i810_dma_dispatch_mc(struct drm_device * dev, drm_buf_t * buf, int used, | 1145 | static void i810_dma_dispatch_mc(struct drm_device * dev, struct drm_buf * buf, int used, |
1146 | unsigned int last_render) | 1146 | unsigned int last_render) |
1147 | { | 1147 | { |
1148 | drm_i810_private_t *dev_priv = dev->dev_private; | 1148 | drm_i810_private_t *dev_priv = dev->dev_private; |