Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad76c65e authored by Felix Kuehling's avatar Felix Kuehling Committed by Alex Deucher
Browse files

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: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fd5002d6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1780,7 +1780,7 @@ int ttm_bo_swapout(struct ttm_bo_global *glob, struct ttm_operation_ctx *ctx)
	 * Unreserve without putting on LRU to avoid swapping out an
	 * already swapped buffer.
	 */

	if (locked)
		reservation_object_unlock(bo->resv);
	kref_put(&bo->list_kref, ttm_bo_release_list);
	return ret;