Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Configure max beneficial TTM pool allocation order

Let the TTM pool allocator know that we can afford for it to expend less
effort for satisfying contiguous allocations larger than 2MiB. The latter
is the maximum relevant PTE entry size and the driver and hardware are
happy to get larger blocks only opportunistically.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20251020115411.36818-6-tvrtko.ursulin@igalia.com

authored by

Tvrtko Ursulin and committed by
Tvrtko Ursulin
ccbadd9e 7e9c548d

+3 -2
+3 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
··· 1837 1837 for (i = 0; i < adev->gmc.num_mem_partitions; i++) { 1838 1838 ttm_pool_init(&adev->mman.ttm_pools[i], adev->dev, 1839 1839 adev->gmc.mem_partitions[i].numa.node, 1840 - 0); 1840 + TTM_ALLOCATION_POOL_BENEFICIAL_ORDER(get_order(SZ_2M))); 1841 1841 } 1842 1842 return 0; 1843 1843 } ··· 1933 1933 (adev->need_swiotlb ? 1934 1934 TTM_ALLOCATION_POOL_USE_DMA_ALLOC : 0) | 1935 1935 (dma_addressing_limited(adev->dev) ? 1936 - TTM_ALLOCATION_POOL_USE_DMA32 : 0)); 1936 + TTM_ALLOCATION_POOL_USE_DMA32 : 0) | 1937 + TTM_ALLOCATION_POOL_BENEFICIAL_ORDER(get_order(SZ_2M))); 1937 1938 if (r) { 1938 1939 dev_err(adev->dev, 1939 1940 "failed initializing buffer object driver(%d).\n", r);