Skip to content

Commit

Permalink
drm: Wake up all lock waiters when the master disappears.
Browse files Browse the repository at this point in the history
Currently only one waiter is woken up, leaving other waiters
hanging waiting for the DRM lock.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Mar 2, 2009
1 parent 4d77c88 commit 171901d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_bufs.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ int drm_rmmap_locked(struct drm_device *dev, drm_local_map_t *map)
dev->sigdata.lock = NULL;
master->lock.hw_lock = NULL; /* SHM removed */
master->lock.file_priv = NULL;
wake_up_interruptible(&master->lock.lock_queue);
wake_up_interruptible_all(&master->lock.lock_queue);
}
break;
case _DRM_AGP:
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void drm_master_destroy(struct kref *kref)
dev->sigdata.lock = NULL;
master->lock.hw_lock = NULL;
master->lock.file_priv = NULL;
wake_up_interruptible(&master->lock.lock_queue);
wake_up_interruptible_all(&master->lock.lock_queue);
}

drm_free(master, sizeof(*master), DRM_MEM_DRIVER);
Expand Down

0 comments on commit 171901d

Please sign in to comment.