diff options
| author | Philip Yang <[email protected]> | 2023-01-26 23:25:28 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-06-09 14:00:00 +0000 |
| commit | f24e924b7e8aba7b62671e7e1a19d83301a08597 (patch) | |
| tree | 44f1fbfb946e168df782376dd576955eb08d6e92 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | |
| parent | drm/amdkfd: Show KFD node memory partition info (diff) | |
| download | kernel-f24e924b7e8aba7b62671e7e1a19d83301a08597.tar.gz kernel-f24e924b7e8aba7b62671e7e1a19d83301a08597.zip | |
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 <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h index 637bf51dbf06..646c4fcc8e40 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h @@ -43,8 +43,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, int alignment, u32 initial_domain, u64 flags, enum ttm_bo_type type, struct dma_resv *resv, - struct drm_gem_object **obj); - + struct drm_gem_object **obj, int8_t mem_id_plus1); int amdgpu_mode_dumb_create(struct drm_file *file_priv, struct drm_device *dev, struct drm_mode_create_dumb *args); |
