mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amdgpu: Add memory partition mem_id to amdgpu_bo
Add mem_id_plus1 parameter to amdgpu_gem_object_create and pass it to amdgpu_bo_create. For dGPU mode allocation, mem_id is used by VRAM manager to get the memory partition fpfn, lpfn from xcp manager. For APU native mode allocation, mem_id is used to get NUMA node id from xcp manager, then pass to TTM as numa pool id to alloc memory from the specific NUMA node. mem_id -1 means for entire VRAM or any NUMA nodes. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
4c6ce75fdd
commit
f24e924b7e
@@ -56,6 +56,8 @@ struct amdgpu_bo_param {
|
||||
bool no_wait_gpu;
|
||||
struct dma_resv *resv;
|
||||
void (*destroy)(struct ttm_buffer_object *bo);
|
||||
/* memory partition number plus 1, 0 means any partition */
|
||||
int8_t mem_id_plus1;
|
||||
};
|
||||
|
||||
/* bo virtual addresses in a vm */
|
||||
@@ -108,6 +110,9 @@ struct amdgpu_bo {
|
||||
struct mmu_interval_notifier notifier;
|
||||
#endif
|
||||
struct kgd_mem *kfd_bo;
|
||||
|
||||
/* memory partition number, -1 means any partition */
|
||||
int8_t mem_id;
|
||||
};
|
||||
|
||||
struct amdgpu_bo_user {
|
||||
|
||||
Reference in New Issue
Block a user