@@ -322,17 +322,25 @@ int radeon_bo_list_validate(struct list_head *head)
list_for_each_entry(lobj, head, list) {
bo = lobj->bo;
if (!bo->pin_count) {
+ bool pinned = true;
+
+retry:
if (lobj->wdomain) {
radeon_ttm_placement_from_domain(bo,
- lobj->wdomain);
+ lobj->wdomain, pinned);
} else {
radeon_ttm_placement_from_domain(bo,
- lobj->rdomain);
+ lobj->rdomain, pinned);
}
r = ttm_bo_validate(&bo->tbo, &bo->placement,
true, false);
- if (unlikely(r))
+ if (unlikely(r)) {
+ if (pinned) {
+ pinned = false;
+ goto retry;
+ }
return r;
+ }
}
lobj->gpu_offset = radeon_bo_gpu_offset(bo);
lobj->tiling_flags = bo->tiling_flags;