Commit 1e9d17a5 authored by Alex Deucher's avatar Alex Deucher
Browse files

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: bac38ca8 ("drm/amdkfd: implement per queue sdma reset for gfx 9.4+")
Cc: Jonathan Kim <jonathan.kim@amd.com>
Reported-by: default avatarJohl Brown <johlbrown@gmail.com>
Reviewed-by: default avatarJonathan Kim <jonathan.kim@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8cf66089
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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,
};
+8 −0
Original line number Diff line number Diff line
@@ -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,
};