diff options
author | Maarten Lankhorst <m.b.lankhorst@gmail.com> | 2012-11-28 12:25:39 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-12-10 20:09:58 +1000 |
commit | 4154f051e74e6a5db174c8f4fc8a2f9c8a6b2541 (patch) | |
tree | 6bdfc3dc7fd144bf5cbe23c908649afff6183448 /drivers/gpu/drm/ttm/ttm_execbuf_util.c | |
parent | 1a1494def7eacbd25db05185aa2e81ef90892460 (diff) | |
download | op-kernel-dev-4154f051e74e6a5db174c8f4fc8a2f9c8a6b2541.zip op-kernel-dev-4154f051e74e6a5db174c8f4fc8a2f9c8a6b2541.tar.gz |
drm/ttm: change fence_lock to inner lock
This requires changing the order in ttm_bo_cleanup_refs_or_queue to
take the reservation first, as there is otherwise no race free way to
take lru lock before fence_lock.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_execbuf_util.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_execbuf_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c index 1986d00..cd9e452 100644 --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c @@ -213,8 +213,8 @@ void ttm_eu_fence_buffer_objects(struct list_head *list, void *sync_obj) driver = bdev->driver; glob = bo->glob; - spin_lock(&bdev->fence_lock); spin_lock(&glob->lru_lock); + spin_lock(&bdev->fence_lock); list_for_each_entry(entry, list, head) { bo = entry->bo; @@ -223,8 +223,8 @@ void ttm_eu_fence_buffer_objects(struct list_head *list, void *sync_obj) ttm_bo_unreserve_locked(bo); entry->reserved = false; } - spin_unlock(&glob->lru_lock); spin_unlock(&bdev->fence_lock); + spin_unlock(&glob->lru_lock); list_for_each_entry(entry, list, head) { if (entry->old_sync_obj) |