drm/amdkfd: Native mode memory partition support
authorRajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Tue, 28 Feb 2023 01:08:29 +0000 (20:08 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:57:37 +0000 (09:57 -0400)
commitfcfefd85f18a0004c7c7b499f0701fd2c76d4c68
tree3f21e22243dee380a7ba8d16a9d1b7e3675a32de
parent1e03322cfef9b83aa87ea0a508588f9f05a47dfc
drm/amdkfd: Native mode memory partition support

For native mode, after amdgpu_bo is created on CPU domain, then call
amdgpu_ttm_tt_set_mem_pool to select the TTM pool using bo->mem_id.
ttm_bo_validate will allocate the memory to the correct memory partition
before mapping to GPUs.

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_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h