Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131987
b: refs/heads/master
c: fda714c
h: refs/heads/master
i:
  131985: 7a63783
  131983: d1c6e30
v: v3
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Mar 2, 2009
1 parent f65c41c commit e0d4bae
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 171901d15deeef61aa8e1b0d0772404f39691b73
refs/heads/master: fda714c29cdf360464059044b221450decb4b913
14 changes: 14 additions & 0 deletions trunk/drivers/gpu/drm/drm_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,27 @@ int drm_release(struct inode *inode, struct file *filp)
mutex_lock(&dev->struct_mutex);

if (file_priv->is_master) {
struct drm_master *master = file_priv->master;
struct drm_file *temp;
list_for_each_entry(temp, &dev->filelist, lhead) {
if ((temp->master == file_priv->master) &&
(temp != file_priv))
temp->authenticated = 0;
}

/**
* Since the master is disappearing, so is the
* possibility to lock.
*/

if (master->lock.hw_lock) {
if (dev->sigdata.lock == master->lock.hw_lock)
dev->sigdata.lock = NULL;
master->lock.hw_lock = NULL;
master->lock.file_priv = NULL;
wake_up_interruptible_all(&master->lock.lock_queue);
}

if (file_priv->minor->master == file_priv->master) {
/* drop the reference held my the minor */
drm_master_put(&file_priv->minor->master);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/drm_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
__set_current_state(TASK_INTERRUPTIBLE);
if (!master->lock.hw_lock) {
/* Device has been unregistered */
send_sig(SIGTERM, current, 0);
ret = -EINTR;
break;
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ static void drm_master_destroy(struct kref *kref)

drm_ht_remove(&master->magiclist);

if (master->lock.hw_lock) {
if (dev->sigdata.lock == master->lock.hw_lock)
dev->sigdata.lock = NULL;
master->lock.hw_lock = NULL;
master->lock.file_priv = NULL;
wake_up_interruptible_all(&master->lock.lock_queue);
}

drm_free(master, sizeof(*master), DRM_MEM_DRIVER);
}

Expand Down

0 comments on commit e0d4bae

Please sign in to comment.