diff options
| author | Philip Yang <Philip.Yang@amd.com> | 2025-04-22 16:30:02 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-12-16 13:28:03 -0500 |
| commit | db1882b3ff0c51d3ffdcdeee7ad1f9f01ea78453 (patch) | |
| tree | 2c65dd1c93c231e46055e3c8ccc46eca48e5fa1a /drivers/gpu/drm/amd/amdkfd | |
| parent | 6f744d7976e4910e478d1e46666aef96a71386ad (diff) | |
drm/amdkfd: Update LDS, Scratch base for 57bit address
For 5-level page tables, update compute vmid sh_mem_base LDS aperture
and Scratch aperture base address to above 57-bit, use the same setting
from gfx vmid, we can remove the duplicate macro.
Update queue pdd lds_base and scratch_base to the same value as
sh_mem_base setting. Then application get process apertures return the
correct value to access LDS and Scratch memory for 57bit address 5-level
page tables. This may pass to MES in future when mapping queue.
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd')
| -rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c index 1d170dc50df3..557a5ade329a 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c @@ -342,14 +342,20 @@ static void kfd_init_apertures_vi(struct kfd_process_device *pdd, uint8_t id) static void kfd_init_apertures_v9(struct kfd_process_device *pdd, uint8_t id) { - pdd->lds_base = MAKE_LDS_APP_BASE_V9(); + if (pdd->dev->adev->vm_manager.root_level == AMDGPU_VM_PDB3) + pdd->lds_base = pdd->dev->adev->gmc.shared_aperture_start; + else + pdd->lds_base = MAKE_LDS_APP_BASE_V9(); pdd->lds_limit = MAKE_LDS_APP_LIMIT(pdd->lds_base); pdd->gpuvm_base = AMDGPU_VA_RESERVED_BOTTOM; pdd->gpuvm_limit = pdd->dev->kfd->shared_resources.gpuvm_size - 1; - pdd->scratch_base = MAKE_SCRATCH_APP_BASE_V9(); + if (pdd->dev->adev->vm_manager.root_level == AMDGPU_VM_PDB3) + pdd->scratch_base = pdd->dev->adev->gmc.private_aperture_start; + else + pdd->scratch_base = MAKE_SCRATCH_APP_BASE_V9(); pdd->scratch_limit = MAKE_SCRATCH_APP_LIMIT(pdd->scratch_base); /* |
