On 2023-11-10 14:08, Yat Sin, David wrote:
[AMD Official Use Only - General]

I would merge this with patch 14 of the series
[JZ] it is better to keep two ASIC patches separately.

-----Original Message-----
From: Zhu, James <[email protected]>
Sent: Friday, November 3, 2023 9:12 AM
To: [email protected]
Cc: Kuehling, Felix <[email protected]>; Greathouse, Joseph
<[email protected]>; Yat Sin, David <[email protected]>; Zhu,
James <[email protected]>
Subject: [PATCH 15/24] drm/amdkfd: trigger pc sampling trap for aldebaran

Implement trigger pc sampling trap for aldebaran.

Signed-off-by: James Zhu <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 11
+++++++++++
  1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c
index aff08321e976..27eda75ceecb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c
@@ -163,6 +163,16 @@ static uint32_t
kgd_gfx_aldebaran_set_address_watch(
       return watch_address_cntl;
  }

+static uint32_t kgd_aldebaran_trigger_pc_sample_trap(struct amdgpu_device
*adev,
+                                         uint32_t vmid,
+                                         uint32_t *target_simd,
+                                         uint32_t *target_wave_slot,
+                                         enum kfd_ioctl_pc_sample_method
method) {
+     return kgd_gfx_v9_trigger_pc_sample_trap(adev, vmid, 8, 4,
+                                     target_simd, target_wave_slot,
method); }
+
  const struct kfd2kgd_calls aldebaran_kfd2kgd = {
       .program_sh_mem_settings = kgd_gfx_v9_program_sh_mem_settings,
       .set_pasid_vmid_mapping = kgd_gfx_v9_set_pasid_vmid_mapping,
@@ -191,4 +201,5 @@ const struct kfd2kgd_calls aldebaran_kfd2kgd = {
       .get_iq_wait_times = kgd_gfx_v9_get_iq_wait_times,
       .build_grace_period_packet_info =
kgd_gfx_v9_build_grace_period_packet_info,
       .program_trap_handler_settings =
kgd_gfx_v9_program_trap_handler_settings,
+     .trigger_pc_sample_trap = kgd_aldebaran_trigger_pc_sample_trap,
  };
--
2.25.1

Reply via email to