Skip to content

Commit 34659c1

Browse files
committed
drm/amdkfd: add hqd_sdma_get_doorbell callbacks for gfx7/8
These were missed when support was added for other generations. The callbacks are called unconditionally so we need to make sure all generations have them. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4304 Link: ROCm/ROCm#4965 Fixes: bac38ca ("drm/amdkfd: implement per queue sdma reset for gfx 9.4+") Cc: Jonathan Kim <[email protected]> Reported-by: Johl Brown <[email protected]> Reviewed-by: Jonathan Kim <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 1e9d17a) Cc: [email protected]
1 parent f3e58d8 commit 34659c1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,13 @@ static uint32_t read_vmid_from_vmfault_reg(struct amdgpu_device *adev)
561561
return REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID);
562562
}
563563

564+
static uint32_t kgd_hqd_sdma_get_doorbell(struct amdgpu_device *adev,
565+
int engine, int queue)
566+
567+
{
568+
return 0;
569+
}
570+
564571
const struct kfd2kgd_calls gfx_v7_kfd2kgd = {
565572
.program_sh_mem_settings = kgd_program_sh_mem_settings,
566573
.set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping,
@@ -578,4 +585,5 @@ const struct kfd2kgd_calls gfx_v7_kfd2kgd = {
578585
.set_scratch_backing_va = set_scratch_backing_va,
579586
.set_vm_context_page_table_base = set_vm_context_page_table_base,
580587
.read_vmid_from_vmfault_reg = read_vmid_from_vmfault_reg,
588+
.hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell,
581589
};

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,13 @@ static void set_vm_context_page_table_base(struct amdgpu_device *adev,
582582
lower_32_bits(page_table_base));
583583
}
584584

585+
static uint32_t kgd_hqd_sdma_get_doorbell(struct amdgpu_device *adev,
586+
int engine, int queue)
587+
588+
{
589+
return 0;
590+
}
591+
585592
const struct kfd2kgd_calls gfx_v8_kfd2kgd = {
586593
.program_sh_mem_settings = kgd_program_sh_mem_settings,
587594
.set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping,
@@ -599,4 +606,5 @@ const struct kfd2kgd_calls gfx_v8_kfd2kgd = {
599606
get_atc_vmid_pasid_mapping_info,
600607
.set_scratch_backing_va = set_scratch_backing_va,
601608
.set_vm_context_page_table_base = set_vm_context_page_table_base,
609+
.hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell,
602610
};

0 commit comments

Comments
 (0)