diff options
Diffstat (limited to 'drivers/char/drm/i830_dma.c')
-rw-r--r-- | drivers/char/drm/i830_dma.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c index 57ce074a559..021a0711485 100644 --- a/drivers/char/drm/i830_dma.c +++ b/drivers/char/drm/i830_dma.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #define I830_BUF_UNMAPPED 0 | 47 | #define I830_BUF_UNMAPPED 0 |
48 | #define I830_BUF_MAPPED 1 | 48 | #define I830_BUF_MAPPED 1 |
49 | 49 | ||
50 | static drm_buf_t *i830_freelist_get(struct drm_device * dev) | 50 | static struct drm_buf *i830_freelist_get(struct drm_device * dev) |
51 | { | 51 | { |
52 | drm_device_dma_t *dma = dev->dma; | 52 | drm_device_dma_t *dma = dev->dma; |
53 | int i; | 53 | int i; |
@@ -56,7 +56,7 @@ static drm_buf_t *i830_freelist_get(struct drm_device * dev) | |||
56 | /* Linear search might not be the best solution */ | 56 | /* Linear search might not be the best solution */ |
57 | 57 | ||
58 | for (i = 0; i < dma->buf_count; i++) { | 58 | for (i = 0; i < dma->buf_count; i++) { |
59 | drm_buf_t *buf = dma->buflist[i]; | 59 | struct drm_buf *buf = dma->buflist[i]; |
60 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 60 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
61 | /* In use is already a pointer */ | 61 | /* In use is already a pointer */ |
62 | used = cmpxchg(buf_priv->in_use, I830_BUF_FREE, | 62 | 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 | * yet, the hardware updates in use for us once its on the ring buffer. | 72 | * yet, the hardware updates in use for us once its on the ring buffer. |
73 | */ | 73 | */ |
74 | 74 | ||
75 | static int i830_freelist_put(struct drm_device * dev, drm_buf_t * buf) | 75 | static int i830_freelist_put(struct drm_device * dev, struct drm_buf * buf) |
76 | { | 76 | { |
77 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 77 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
78 | int used; | 78 | int used; |
@@ -92,7 +92,7 @@ static int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma) | |||
92 | struct drm_file *priv = filp->private_data; | 92 | struct drm_file *priv = filp->private_data; |
93 | struct drm_device *dev; | 93 | struct drm_device *dev; |
94 | drm_i830_private_t *dev_priv; | 94 | drm_i830_private_t *dev_priv; |
95 | drm_buf_t *buf; | 95 | struct drm_buf *buf; |
96 | drm_i830_buf_priv_t *buf_priv; | 96 | drm_i830_buf_priv_t *buf_priv; |
97 | 97 | ||
98 | lock_kernel(); | 98 | lock_kernel(); |
@@ -122,7 +122,7 @@ static const struct file_operations i830_buffer_fops = { | |||
122 | .fasync = drm_fasync, | 122 | .fasync = drm_fasync, |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static int i830_map_buffer(drm_buf_t * buf, struct file *filp) | 125 | static int i830_map_buffer(struct drm_buf * buf, struct file *filp) |
126 | { | 126 | { |
127 | struct drm_file *priv = filp->private_data; | 127 | struct drm_file *priv = filp->private_data; |
128 | struct drm_device *dev = priv->head->dev; | 128 | struct drm_device *dev = priv->head->dev; |
@@ -156,7 +156,7 @@ static int i830_map_buffer(drm_buf_t * buf, struct file *filp) | |||
156 | return retcode; | 156 | return retcode; |
157 | } | 157 | } |
158 | 158 | ||
159 | static int i830_unmap_buffer(drm_buf_t * buf) | 159 | static int i830_unmap_buffer(struct drm_buf * buf) |
160 | { | 160 | { |
161 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 161 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
162 | int retcode = 0; | 162 | int retcode = 0; |
@@ -179,7 +179,7 @@ static int i830_unmap_buffer(drm_buf_t * buf) | |||
179 | static int i830_dma_get_buffer(struct drm_device * dev, drm_i830_dma_t * d, | 179 | static int i830_dma_get_buffer(struct drm_device * dev, drm_i830_dma_t * d, |
180 | struct file *filp) | 180 | struct file *filp) |
181 | { | 181 | { |
182 | drm_buf_t *buf; | 182 | struct drm_buf *buf; |
183 | drm_i830_buf_priv_t *buf_priv; | 183 | drm_i830_buf_priv_t *buf_priv; |
184 | int retcode = 0; | 184 | int retcode = 0; |
185 | 185 | ||
@@ -238,7 +238,7 @@ static int i830_dma_cleanup(struct drm_device * dev) | |||
238 | dev->dev_private = NULL; | 238 | dev->dev_private = NULL; |
239 | 239 | ||
240 | for (i = 0; i < dma->buf_count; i++) { | 240 | for (i = 0; i < dma->buf_count; i++) { |
241 | drm_buf_t *buf = dma->buflist[i]; | 241 | struct drm_buf *buf = dma->buflist[i]; |
242 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 242 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
243 | if (buf_priv->kernel_virtual && buf->total) | 243 | if (buf_priv->kernel_virtual && buf->total) |
244 | drm_core_ioremapfree(&buf_priv->map, dev); | 244 | 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 | } | 309 | } |
310 | 310 | ||
311 | for (i = 0; i < dma->buf_count; i++) { | 311 | for (i = 0; i < dma->buf_count; i++) { |
312 | drm_buf_t *buf = dma->buflist[i]; | 312 | struct drm_buf *buf = dma->buflist[i]; |
313 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 313 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
314 | 314 | ||
315 | buf_priv->in_use = hw_status++; | 315 | buf_priv->in_use = hw_status++; |
@@ -1087,7 +1087,7 @@ static void i830_dma_dispatch_flip(struct drm_device * dev) | |||
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | static void i830_dma_dispatch_vertex(struct drm_device * dev, | 1089 | static void i830_dma_dispatch_vertex(struct drm_device * dev, |
1090 | drm_buf_t * buf, int discard, int used) | 1090 | struct drm_buf * buf, int discard, int used) |
1091 | { | 1091 | { |
1092 | drm_i830_private_t *dev_priv = dev->dev_private; | 1092 | drm_i830_private_t *dev_priv = dev->dev_private; |
1093 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 1093 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
@@ -1232,7 +1232,7 @@ static int i830_flush_queue(struct drm_device * dev) | |||
1232 | i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); | 1232 | i830_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); |
1233 | 1233 | ||
1234 | for (i = 0; i < dma->buf_count; i++) { | 1234 | for (i = 0; i < dma->buf_count; i++) { |
1235 | drm_buf_t *buf = dma->buflist[i]; | 1235 | struct drm_buf *buf = dma->buflist[i]; |
1236 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 1236 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
1237 | 1237 | ||
1238 | int used = cmpxchg(buf_priv->in_use, I830_BUF_HARDWARE, | 1238 | 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 | i830_flush_queue(dev); | 1263 | i830_flush_queue(dev); |
1264 | 1264 | ||
1265 | for (i = 0; i < dma->buf_count; i++) { | 1265 | for (i = 0; i < dma->buf_count; i++) { |
1266 | drm_buf_t *buf = dma->buflist[i]; | 1266 | struct drm_buf *buf = dma->buflist[i]; |
1267 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; | 1267 | drm_i830_buf_priv_t *buf_priv = buf->dev_private; |
1268 | 1268 | ||
1269 | if (buf->filp == filp && buf_priv) { | 1269 | if (buf->filp == filp && buf_priv) { |