]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: optimize pool allocations a bit v2
authorChristian König <christian.koenig@amd.com>
Mon, 7 Nov 2022 19:40:11 +0000 (20:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:13 +0000 (23:03 +0900)
commit5522e8b24bc3b68c4044c0a6b6719b5678a8ad2f
tree7b042f6f2b3bc130524828b712fae287eb8156d5
parentc67dff5078e640af5fd6c23967a5157ca7f5d110
drm/ttm: optimize pool allocations a bit v2

[ Upstream commit 735c466465eba51deaee3012d8403c10fc7c8c03 ]

If we got a page pool use it as much as possible.

If we can't get more pages from the pool allocate as much as possible.

Only if that still doesn't work reduce the order and try again.

v2: minor cleanups

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221107195808.1873-1-christian.koenig@amd.com
Stable-dep-of: 379989e7cbdc ("drm/ttm/pool: Fix ttm_pool_alloc error path")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/ttm/ttm_pool.c