Commit d7e4d671 authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/qxl: Remove release_lock stupidity

The locking of release_lock was stupid; t should have been be called with
fence_lock_irq if it was legitimately used. Unfortunately it never protected
anything except the fence implementation correctly.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
parent 47c12968
...@@ -57,7 +57,6 @@ qxl_debugfs_buffers_info(struct seq_file *m, void *data) ...@@ -57,7 +57,6 @@ qxl_debugfs_buffers_info(struct seq_file *m, void *data)
struct qxl_device *qdev = node->minor->dev->dev_private; struct qxl_device *qdev = node->minor->dev->dev_private;
struct qxl_bo *bo; struct qxl_bo *bo;
spin_lock(&qdev->release_lock);
list_for_each_entry(bo, &qdev->gem.objects, list) { list_for_each_entry(bo, &qdev->gem.objects, list) {
struct reservation_object_list *fobj; struct reservation_object_list *fobj;
int rel; int rel;
...@@ -71,7 +70,6 @@ qxl_debugfs_buffers_info(struct seq_file *m, void *data) ...@@ -71,7 +70,6 @@ qxl_debugfs_buffers_info(struct seq_file *m, void *data)
(unsigned long)bo->gem_base.size, (unsigned long)bo->gem_base.size,
bo->pin_count, rel); bo->pin_count, rel);
} }
spin_unlock(&qdev->release_lock);
return 0; return 0;
} }
......
...@@ -71,7 +71,7 @@ static long qxl_fence_wait(struct fence *fence, bool intr, signed long timeout) ...@@ -71,7 +71,7 @@ static long qxl_fence_wait(struct fence *fence, bool intr, signed long timeout)
retry: retry:
sc++; sc++;
if (fence_is_signaled_locked(fence)) if (fence_is_signaled(fence))
goto signaled; goto signaled;
qxl_io_notify_oom(qdev); qxl_io_notify_oom(qdev);
...@@ -80,11 +80,11 @@ static long qxl_fence_wait(struct fence *fence, bool intr, signed long timeout) ...@@ -80,11 +80,11 @@ static long qxl_fence_wait(struct fence *fence, bool intr, signed long timeout)
if (!qxl_queue_garbage_collect(qdev, true)) if (!qxl_queue_garbage_collect(qdev, true))
break; break;
if (fence_is_signaled_locked(fence)) if (fence_is_signaled(fence))
goto signaled; goto signaled;
} }
if (fence_is_signaled_locked(fence)) if (fence_is_signaled(fence))
goto signaled; goto signaled;
if (have_drawable_releases || sc < 4) { if (have_drawable_releases || sc < 4) {
...@@ -457,8 +457,6 @@ void qxl_release_fence_buffer_objects(struct qxl_release *release) ...@@ -457,8 +457,6 @@ void qxl_release_fence_buffer_objects(struct qxl_release *release)
glob = bo->glob; glob = bo->glob;
spin_lock(&glob->lru_lock); spin_lock(&glob->lru_lock);
/* acquire release_lock to protect bo->resv->fence and its contents */
spin_lock(&qdev->release_lock);
list_for_each_entry(entry, &release->bos, head) { list_for_each_entry(entry, &release->bos, head) {
bo = entry->bo; bo = entry->bo;
...@@ -468,7 +466,6 @@ void qxl_release_fence_buffer_objects(struct qxl_release *release) ...@@ -468,7 +466,6 @@ void qxl_release_fence_buffer_objects(struct qxl_release *release)
ttm_bo_add_to_lru(bo); ttm_bo_add_to_lru(bo);
__ttm_bo_unreserve(bo); __ttm_bo_unreserve(bo);
} }
spin_unlock(&qdev->release_lock);
spin_unlock(&glob->lru_lock); spin_unlock(&glob->lru_lock);
ww_acquire_fini(&release->ticket); ww_acquire_fini(&release->ticket);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment