Commit 6ed9ccb4 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Dave Airlie

drm/radeon: allow move_notify to be called without reservation

The few places that care should have those checks instead.
This allows destruction of bo backed memory without a reservation.
It's required for being able to rework the delayed destroy path,
as it is no longer guaranteed to hold a reservation before unlocking.

However any previous wait is still guaranteed to complete, and it's
one of the last things to be done before the buffer object is freed.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4154f051
...@@ -1237,7 +1237,6 @@ void radeon_vm_bo_invalidate(struct radeon_device *rdev, ...@@ -1237,7 +1237,6 @@ void radeon_vm_bo_invalidate(struct radeon_device *rdev,
{ {
struct radeon_bo_va *bo_va; struct radeon_bo_va *bo_va;
BUG_ON(!radeon_bo_is_reserved(bo));
list_for_each_entry(bo_va, &bo->va, bo_list) { list_for_each_entry(bo_va, &bo->va, bo_list) {
bo_va->valid = false; bo_va->valid = false;
} }
......
...@@ -530,7 +530,7 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo, ...@@ -530,7 +530,7 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo,
int radeon_bo_check_tiling(struct radeon_bo *bo, bool has_moved, int radeon_bo_check_tiling(struct radeon_bo *bo, bool has_moved,
bool force_drop) bool force_drop)
{ {
BUG_ON(!radeon_bo_is_reserved(bo)); BUG_ON(!radeon_bo_is_reserved(bo) && !force_drop);
if (!(bo->tiling_flags & RADEON_TILING_SURFACE)) if (!(bo->tiling_flags & RADEON_TILING_SURFACE))
return 0; return 0;
......
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