drm: Wake up all lock waiters when the master disappears.
authorThomas Hellstrom <thellstrom@vmware.com>
Mon, 2 Mar 2009 10:10:55 +0000 (11:10 +0100)
committerDave Airlie <airlied@linux.ie>
Mon, 2 Mar 2009 23:49:54 +0000 (09:49 +1000)
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>
drivers/gpu/drm/drm_bufs.c
drivers/gpu/drm/drm_stub.c

index 72c667f9bee1aadbc4067687d05aca0849be751b..12715d3c078d6e9d111c265fe96b5ccc63961d3e 100644 (file)
@@ -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:
index 46bb923b097c39ad6fef2c37f29e59ae0c648f42..7b251dd708115b5a18914cd86ed43a613bcb0aa5 100644 (file)
@@ -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);