aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_context.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-07-11 01:53:27 -0400
committerDave Airlie <airlied@linux.ie>2007-07-11 01:53:27 -0400
commit84b1fd103dbbe01b5905db1444d3fc8afa9a7207 (patch)
tree2088f4c8e68553e2d4f5d55fa7a714eb3fa09f9e /drivers/char/drm/drm_context.c
parentc60ce623bd16137627009d05e311d877729f2ad6 (diff)
drm: remove drm_file_t, drm_device_t and drm_head_t typedefs
some drivers still todo. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_context.c')
-rw-r--r--drivers/char/drm/drm_context.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c
index 283f8f2895cb..767103cae09a 100644
--- a/drivers/char/drm/drm_context.c
+++ b/drivers/char/drm/drm_context.c
@@ -56,7 +56,7 @@
56 * in drm_device::context_sareas, while holding the drm_device::struct_mutex 56 * in drm_device::context_sareas, while holding the drm_device::struct_mutex
57 * lock. 57 * lock.
58 */ 58 */
59void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle) 59void drm_ctxbitmap_free(struct drm_device * dev, int ctx_handle)
60{ 60{
61 if (ctx_handle < 0) 61 if (ctx_handle < 0)
62 goto failed; 62 goto failed;
@@ -85,7 +85,7 @@ void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle)
85 * drm_device::context_sareas to accommodate the new entry while holding the 85 * drm_device::context_sareas to accommodate the new entry while holding the
86 * drm_device::struct_mutex lock. 86 * drm_device::struct_mutex lock.
87 */ 87 */
88static int drm_ctxbitmap_next(drm_device_t * dev) 88static int drm_ctxbitmap_next(struct drm_device * dev)
89{ 89{
90 int bit; 90 int bit;
91 91
@@ -147,7 +147,7 @@ static int drm_ctxbitmap_next(drm_device_t * dev)
147 * Allocates and initialize drm_device::ctx_bitmap and drm_device::context_sareas, while holding 147 * Allocates and initialize drm_device::ctx_bitmap and drm_device::context_sareas, while holding
148 * the drm_device::struct_mutex lock. 148 * the drm_device::struct_mutex lock.
149 */ 149 */
150int drm_ctxbitmap_init(drm_device_t * dev) 150int drm_ctxbitmap_init(struct drm_device * dev)
151{ 151{
152 int i; 152 int i;
153 int temp; 153 int temp;
@@ -180,7 +180,7 @@ int drm_ctxbitmap_init(drm_device_t * dev)
180 * Frees drm_device::ctx_bitmap and drm_device::context_sareas, while holding 180 * Frees drm_device::ctx_bitmap and drm_device::context_sareas, while holding
181 * the drm_device::struct_mutex lock. 181 * the drm_device::struct_mutex lock.
182 */ 182 */
183void drm_ctxbitmap_cleanup(drm_device_t * dev) 183void drm_ctxbitmap_cleanup(struct drm_device * dev)
184{ 184{
185 mutex_lock(&dev->struct_mutex); 185 mutex_lock(&dev->struct_mutex);
186 if (dev->context_sareas) 186 if (dev->context_sareas)
@@ -212,8 +212,8 @@ void drm_ctxbitmap_cleanup(drm_device_t * dev)
212int drm_getsareactx(struct inode *inode, struct file *filp, 212int drm_getsareactx(struct inode *inode, struct file *filp,
213 unsigned int cmd, unsigned long arg) 213 unsigned int cmd, unsigned long arg)
214{ 214{
215 drm_file_t *priv = filp->private_data; 215 struct drm_file *priv = filp->private_data;
216 drm_device_t *dev = priv->head->dev; 216 struct drm_device *dev = priv->head->dev;
217 struct drm_ctx_priv_map __user *argp = (void __user *)arg; 217 struct drm_ctx_priv_map __user *argp = (void __user *)arg;
218 struct drm_ctx_priv_map request; 218 struct drm_ctx_priv_map request;
219 struct drm_map *map; 219 struct drm_map *map;
@@ -263,8 +263,8 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
263int drm_setsareactx(struct inode *inode, struct file *filp, 263int drm_setsareactx(struct inode *inode, struct file *filp,
264 unsigned int cmd, unsigned long arg) 264 unsigned int cmd, unsigned long arg)
265{ 265{
266 drm_file_t *priv = filp->private_data; 266 struct drm_file *priv = filp->private_data;
267 drm_device_t *dev = priv->head->dev; 267 struct drm_device *dev = priv->head->dev;
268 struct drm_ctx_priv_map request; 268 struct drm_ctx_priv_map request;
269 struct drm_map *map = NULL; 269 struct drm_map *map = NULL;
270 drm_map_list_t *r_list = NULL; 270 drm_map_list_t *r_list = NULL;
@@ -313,7 +313,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
313 * 313 *
314 * Attempt to set drm_device::context_flag. 314 * Attempt to set drm_device::context_flag.
315 */ 315 */
316static int drm_context_switch(drm_device_t * dev, int old, int new) 316static int drm_context_switch(struct drm_device * dev, int old, int new)
317{ 317{
318 if (test_and_set_bit(0, &dev->context_flag)) { 318 if (test_and_set_bit(0, &dev->context_flag)) {
319 DRM_ERROR("Reentering -- FIXME\n"); 319 DRM_ERROR("Reentering -- FIXME\n");
@@ -341,7 +341,7 @@ static int drm_context_switch(drm_device_t * dev, int old, int new)
341 * hardware lock is held, clears the drm_device::context_flag and wakes up 341 * hardware lock is held, clears the drm_device::context_flag and wakes up
342 * drm_device::context_wait. 342 * drm_device::context_wait.
343 */ 343 */
344static int drm_context_switch_complete(drm_device_t * dev, int new) 344static int drm_context_switch_complete(struct drm_device * dev, int new)
345{ 345{
346 dev->last_context = new; /* PRE/POST: This is the _only_ writer. */ 346 dev->last_context = new; /* PRE/POST: This is the _only_ writer. */
347 dev->last_switch = jiffies; 347 dev->last_switch = jiffies;
@@ -408,8 +408,8 @@ int drm_resctx(struct inode *inode, struct file *filp,
408int drm_addctx(struct inode *inode, struct file *filp, 408int drm_addctx(struct inode *inode, struct file *filp,
409 unsigned int cmd, unsigned long arg) 409 unsigned int cmd, unsigned long arg)
410{ 410{
411 drm_file_t *priv = filp->private_data; 411 struct drm_file *priv = filp->private_data;
412 drm_device_t *dev = priv->head->dev; 412 struct drm_device *dev = priv->head->dev;
413 drm_ctx_list_t *ctx_entry; 413 drm_ctx_list_t *ctx_entry;
414 struct drm_ctx __user *argp = (void __user *)arg; 414 struct drm_ctx __user *argp = (void __user *)arg;
415 struct drm_ctx ctx; 415 struct drm_ctx ctx;
@@ -504,8 +504,8 @@ int drm_getctx(struct inode *inode, struct file *filp,
504int drm_switchctx(struct inode *inode, struct file *filp, 504int drm_switchctx(struct inode *inode, struct file *filp,
505 unsigned int cmd, unsigned long arg) 505 unsigned int cmd, unsigned long arg)
506{ 506{
507 drm_file_t *priv = filp->private_data; 507 struct drm_file *priv = filp->private_data;
508 drm_device_t *dev = priv->head->dev; 508 struct drm_device *dev = priv->head->dev;
509 struct drm_ctx ctx; 509 struct drm_ctx ctx;
510 510
511 if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) 511 if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))
@@ -529,8 +529,8 @@ int drm_switchctx(struct inode *inode, struct file *filp,
529int drm_newctx(struct inode *inode, struct file *filp, 529int drm_newctx(struct inode *inode, struct file *filp,
530 unsigned int cmd, unsigned long arg) 530 unsigned int cmd, unsigned long arg)
531{ 531{
532 drm_file_t *priv = filp->private_data; 532 struct drm_file *priv = filp->private_data;
533 drm_device_t *dev = priv->head->dev; 533 struct drm_device *dev = priv->head->dev;
534 struct drm_ctx ctx; 534 struct drm_ctx ctx;
535 535
536 if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) 536 if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))
@@ -556,8 +556,8 @@ int drm_newctx(struct inode *inode, struct file *filp,
556int drm_rmctx(struct inode *inode, struct file *filp, 556int drm_rmctx(struct inode *inode, struct file *filp,
557 unsigned int cmd, unsigned long arg) 557 unsigned int cmd, unsigned long arg)
558{ 558{
559 drm_file_t *priv = filp->private_data; 559 struct drm_file *priv = filp->private_data;
560 drm_device_t *dev = priv->head->dev; 560 struct drm_device *dev = priv->head->dev;
561 struct drm_ctx ctx; 561 struct drm_ctx ctx;
562 562
563 if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx))) 563 if (copy_from_user(&ctx, (struct drm_ctx __user *) arg, sizeof(ctx)))