From: Thomas Hellstrom Date: Mon, 2 Mar 2009 10:10:55 +0000 (+0100) Subject: drm: Wake up all lock waiters when the master disappears. X-Git-Tag: 2.1b_release~13887^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=171901d15deeef61aa8e1b0d0772404f39691b73;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git drm: Wake up all lock waiters when the master disappears. Currently only one waiter is woken up, leaving other waiters hanging waiting for the DRM lock. Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 72c667f..12715d3 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -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: diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 46bb923..7b251dd 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -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);