Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: https://github.com/ROCm/ROCm/issues/4965
Fixes: bac38ca8c475 ("drm/amdkfd: implement per queue sdma reset for gfx 9.4+")
Cc: Jonathan Kim <jonathan.kim@amd.com>
Reported-by: Johl Brown <johlbrown@gmail.com>
Reviewed-by: Jonathan Kim <jonathan.kim@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1e9d17a5dcf1242e9518e461d8e63ad35240e49e)
Cc: stable@vger.kernel.org

+16
+8
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
··· 561 561 return REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID); 562 562 } 563 563 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 + 564 571 const struct kfd2kgd_calls gfx_v7_kfd2kgd = { 565 572 .program_sh_mem_settings = kgd_program_sh_mem_settings, 566 573 .set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping, ··· 585 578 .set_scratch_backing_va = set_scratch_backing_va, 586 579 .set_vm_context_page_table_base = set_vm_context_page_table_base, 587 580 .read_vmid_from_vmfault_reg = read_vmid_from_vmfault_reg, 581 + .hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell, 588 582 };
+8
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
··· 582 582 lower_32_bits(page_table_base)); 583 583 } 584 584 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 + 585 592 const struct kfd2kgd_calls gfx_v8_kfd2kgd = { 586 593 .program_sh_mem_settings = kgd_program_sh_mem_settings, 587 594 .set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping, ··· 606 599 get_atc_vmid_pasid_mapping_info, 607 600 .set_scratch_backing_va = set_scratch_backing_va, 608 601 .set_vm_context_page_table_base = set_vm_context_page_table_base, 602 + .hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell, 609 603 };