mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00: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 <christian.koenig@amd.com> Reported-by: Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer@amd.com> Tested-by: Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20230707120826.3701-1-christian.koenig@amd.com
This commit is contained in:
parent
15008052b3
commit
a2848d0874
@ -517,6 +517,12 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
|
|||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
|
if (bo->pin_count) {
|
||||||
|
*locked = false;
|
||||||
|
*busy = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (bo->base.resv == ctx->resv) {
|
if (bo->base.resv == ctx->resv) {
|
||||||
dma_resv_assert_held(bo->base.resv);
|
dma_resv_assert_held(bo->base.resv);
|
||||||
if (ctx->allow_res_evict)
|
if (ctx->allow_res_evict)
|
||||||
|
Loading…
Reference in New Issue
Block a user