diff options
author | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-01-22 09:42:37 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-01-22 09:42:37 -0800 |
commit | 0cd4cbc9a6330bd619608f274592082de7c05bcf (patch) | |
tree | 4e0b682a24e448d17abf8b2fadc75ccee2cd5b57 /linux-core/drm_fops.c | |
parent | 128a8f7ea20af2549e448157b431d5c1f90f37c3 (diff) | |
parent | 5231a524f53babd127a576d7567671dafb29651b (diff) |
Merge branch 'master' into vblank-rework, including mach64 support
Conflicts:
linux-core/drmP.h
linux-core/drm_drv.c
shared-core/i915_drv.h
shared-core/i915_irq.c
shared-core/mga_irq.c
shared-core/radeon_irq.c
shared-core/via_irq.c
Mostly trivial conflicts.
mach64 support from Mathieu BĂ©rard.
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r-- | linux-core/drm_fops.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index 0ccaed5b..0e1c486c 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -85,7 +85,6 @@ static int drm_setup(struct drm_device * dev) dev->queue_reserved = 0; dev->queue_slots = 0; dev->queuelist = NULL; - dev->irq_enabled = 0; dev->context_flag = 0; dev->interrupt_flag = 0; dev->dma_flag = 0; @@ -153,7 +152,7 @@ int drm_open(struct inode *inode, struct file *filp) spin_unlock(&dev->count_lock); } - out: +out: mutex_lock(&dev->struct_mutex); BUG_ON((dev->dev_mapping != NULL) && (dev->dev_mapping != inode->i_mapping)); @@ -237,7 +236,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp, int minor = iminor(inode); struct drm_file *priv; int ret; - int i,j; + int i, j; if (filp->f_flags & O_EXCL) return -EBUSY; /* No exclusive opens */ @@ -265,16 +264,16 @@ static int drm_open_helper(struct inode *inode, struct file *filp, INIT_LIST_HEAD(&priv->lhead); INIT_LIST_HEAD(&priv->refd_objects); - for (i=0; i<_DRM_NO_REF_TYPES; ++i) { - ret = drm_ht_create(&priv->refd_object_hash[i], DRM_FILE_HASH_ORDER); + for (i = 0; i < _DRM_NO_REF_TYPES; ++i) { + ret = drm_ht_create(&priv->refd_object_hash[i], + DRM_FILE_HASH_ORDER); if (ret) break; } if (ret) { - for(j=0; j<i; ++j) { + for (j = 0; j < i; ++j) drm_ht_remove(&priv->refd_object_hash[j]); - } goto out_free; } @@ -333,8 +332,8 @@ int drm_fasync(int fd, struct file *filp, int on) } EXPORT_SYMBOL(drm_fasync); -static void drm_object_release(struct file *filp) { - +static void drm_object_release(struct file *filp) +{ struct drm_file *priv = filp->private_data; struct list_head *head; struct drm_ref_object *ref_object; @@ -342,8 +341,9 @@ static void drm_object_release(struct file *filp) { /* * Free leftover ref objects created by me. Note that we cannot use - * list_for_each() here, as the struct_mutex may be temporarily released - * by the remove_() functions, and thus the lists may be altered. + * list_for_each() here, as the struct_mutex may be temporarily + * released by the remove_() functions, and thus the lists may be + * altered. * Also, a drm_remove_ref_object() will not remove it * from the list unless its refcount is 1. */ @@ -355,9 +355,8 @@ static void drm_object_release(struct file *filp) { head = &priv->refd_objects; } - for(i=0; i<_DRM_NO_REF_TYPES; ++i) { + for (i = 0; i < _DRM_NO_REF_TYPES; ++i) drm_ht_remove(&priv->refd_object_hash[i]); - } } /** @@ -528,4 +527,3 @@ unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait) return 0; } EXPORT_SYMBOL(drm_poll); - |