drm/amdgpu: Set TTM pools for memory partitions
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 27 Feb 2023 16:16:09 +0000 (11:16 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:57:31 +0000 (09:57 -0400)
commit1e03322cfef9b83aa87ea0a508588f9f05a47dfc
tree02b6d4daf50328a66db36b4f15340e1fefe2c2cd
parent6b43e1a05cb764196c5158b2447a9bfad1f2b531
drm/amdgpu: Set TTM pools for memory partitions

For native mode only, create TTM pool for each memory partition to store
the NUMA node id, then the TTM pool will be selected using memory
partition id to allocate memory from the correct partition.

Acked-by: Christian König <christian.koenig@amd.com>
(rajneesh: changed need_swiotlb and need_dma32 to false for pool init)
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-and-tested-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h