]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdkfd: add hqd_sdma_get_doorbell callbacks for gfx7/8
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 25 Jun 2025 22:15:37 +0000 (18:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Jun 2025 17:57:54 +0000 (13:57 -0400)
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
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c

index ca4a6b82817f5349c8434c9aa0c1c89658853c30..df77558e03ef21fd754897440c47ca484fdb562d 100644 (file)
@@ -561,6 +561,13 @@ static uint32_t read_vmid_from_vmfault_reg(struct amdgpu_device *adev)
        return REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID);
 }
 
+static uint32_t kgd_hqd_sdma_get_doorbell(struct amdgpu_device *adev,
+                                         int engine, int queue)
+
+{
+       return 0;
+}
+
 const struct kfd2kgd_calls gfx_v7_kfd2kgd = {
        .program_sh_mem_settings = kgd_program_sh_mem_settings,
        .set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping,
@@ -578,4 +585,5 @@ const struct kfd2kgd_calls gfx_v7_kfd2kgd = {
        .set_scratch_backing_va = set_scratch_backing_va,
        .set_vm_context_page_table_base = set_vm_context_page_table_base,
        .read_vmid_from_vmfault_reg = read_vmid_from_vmfault_reg,
+       .hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell,
 };
index 0f3e2944edd7e9d4aca62d48bcfa00ab7c6b0a16..e68c0fa8d7513a3f0ee195563e454f85ff61d024 100644 (file)
@@ -582,6 +582,13 @@ static void set_vm_context_page_table_base(struct amdgpu_device *adev,
                        lower_32_bits(page_table_base));
 }
 
+static uint32_t kgd_hqd_sdma_get_doorbell(struct amdgpu_device *adev,
+                                         int engine, int queue)
+
+{
+       return 0;
+}
+
 const struct kfd2kgd_calls gfx_v8_kfd2kgd = {
        .program_sh_mem_settings = kgd_program_sh_mem_settings,
        .set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping,
@@ -599,4 +606,5 @@ const struct kfd2kgd_calls gfx_v8_kfd2kgd = {
                        get_atc_vmid_pasid_mapping_info,
        .set_scratch_backing_va = set_scratch_backing_va,
        .set_vm_context_page_table_base = set_vm_context_page_table_base,
+       .hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell,
 };