aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2018-01-17 23:54:07 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-01-18 16:14:32 -0500
commitad76c65ec39f20139885ecd4e5830f2c2a643dcb (patch)
treeab56885a0f12f07714e80e92a2c1b040cd93ecdd
parentfd5002d6a3c602664b07668a24df4ef7a43bf078 (diff)
drm/ttm: Don't unreserve swapped BOs that were previously reserved
If ttm_bo_swapout doesn't own the lock, don't release it. Someone else probably depends on it still being locked. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 62518b669ca1..893003fc76a1 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1780,8 +1780,8 @@ out:
1780 * Unreserve without putting on LRU to avoid swapping out an 1780 * Unreserve without putting on LRU to avoid swapping out an
1781 * already swapped buffer. 1781 * already swapped buffer.
1782 */ 1782 */
1783 1783 if (locked)
1784 reservation_object_unlock(bo->resv); 1784 reservation_object_unlock(bo->resv);
1785 kref_put(&bo->list_kref, ttm_bo_release_list); 1785 kref_put(&bo->list_kref, ttm_bo_release_list);
1786 return ret; 1786 return ret;
1787} 1787}