mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
drm/ttm: never consider pinned BOs for eviction&swap
There is a small window where we have already incremented the pin count but not yet moved the bo from the lru to the pinned list. Signed-off-by: Christian König <[email protected]> Reported-by: Pelloux-Prayer, Pierre-Eric <[email protected]> Tested-by: Pelloux-Prayer, Pierre-Eric <[email protected]> Acked-by: Alex Deucher <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
@@ -517,6 +517,12 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (bo->pin_count) {
|
||||
*locked = false;
|
||||
*busy = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bo->base.resv == ctx->resv) {
|
||||
dma_resv_assert_held(bo->base.resv);
|
||||
if (ctx->allow_res_evict)
|
||||
|
||||
Reference in New Issue
Block a user