projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/ttm: Fix a deadlock if the target BO is not idle during swap
[linux-2.6-microblaze.git]
/
drivers
/
gpu
/
drm
/
ttm
/
ttm_bo.c
diff --git
a/drivers/gpu/drm/ttm/ttm_bo.c
b/drivers/gpu/drm/ttm/ttm_bo.c
index
ea4add2
..
bb9e02c
100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_bo.c
+++ b/
drivers/gpu/drm/ttm/ttm_bo.c
@@
-1160,9
+1160,9
@@
int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
}
if (bo->deleted) {
}
if (bo->deleted) {
- ttm_bo_cleanup_refs(bo, false, false, locked);
+
ret =
ttm_bo_cleanup_refs(bo, false, false, locked);
ttm_bo_put(bo);
ttm_bo_put(bo);
- return
0
;
+ return
ret == -EBUSY ? -ENOSPC : ret
;
}
ttm_bo_del_from_lru(bo);
}
ttm_bo_del_from_lru(bo);
@@
-1216,7
+1216,7
@@
out:
if (locked)
dma_resv_unlock(bo->base.resv);
ttm_bo_put(bo);
if (locked)
dma_resv_unlock(bo->base.resv);
ttm_bo_put(bo);
- return ret;
+ return ret
== -EBUSY ? -ENOSPC : ret
;
}
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
}
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)