diff options
author | Christian König <christian.koenig@amd.com> | 2020-11-27 12:51:33 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-12-15 17:01:55 +0100 |
commit | fde1403eeaa62a0bc04d490d93cd62e459cdaf6b (patch) | |
tree | a58674a7f3fb4750f29a26c5ec937aaac78c017c | |
parent | drm: require a non_NULL drm_crtc.primary (diff) | |
download | linux-fde1403eeaa62a0bc04d490d93cd62e459cdaf6b.tar.xz linux-fde1403eeaa62a0bc04d490d93cd62e459cdaf6b.zip |
drm/ttm: use pin_count more extensively
Check the pin_count instead of the lru list is empty here.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Link: https://patchwork.freedesktop.org/patch/404617/
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 2196e3d3ef29..c702ec5445f7 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -938,9 +938,8 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, } error: - if (bo->mem.mem_type == TTM_PL_SYSTEM && !list_empty(&bo->lru)) { + if (bo->mem.mem_type == TTM_PL_SYSTEM && !bo->pin_count) ttm_bo_move_to_lru_tail_unlocked(bo); - } return ret; } |