Skip to content

Commit 3eebfd5

Browse files
Feifei Xualexdeucher
authored andcommitted
drm/amdkfd:Add kfd function to config sq perfmon
Expose the interface for kfd to config sq perfmon. Signed-off-by: Feifei Xu <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: James Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent f0b19b8 commit 3eebfd5

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,3 +889,18 @@ int amdgpu_amdkfd_start_sched(struct amdgpu_device *adev, uint32_t node_id)
889889

890890
return kgd2kfd_start_sched(adev->kfd.dev, node_id);
891891
}
892+
893+
/* Config CGTT_SQ_CLK_CTRL */
894+
int amdgpu_amdkfd_config_sq_perfmon(struct amdgpu_device *adev, uint32_t xcp_id,
895+
bool core_override_enable, bool reg_override_enable, bool perfmon_override_enable)
896+
{
897+
int r;
898+
899+
if (!adev->kfd.init_complete)
900+
return 0;
901+
902+
r = psp_config_sq_perfmon(&adev->psp, xcp_id, core_override_enable,
903+
reg_override_enable, perfmon_override_enable);
904+
905+
return r;
906+
}

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ int amdgpu_amdkfd_unmap_hiq(struct amdgpu_device *adev, u32 doorbell_off,
266266
u32 inst);
267267
int amdgpu_amdkfd_start_sched(struct amdgpu_device *adev, uint32_t node_id);
268268
int amdgpu_amdkfd_stop_sched(struct amdgpu_device *adev, uint32_t node_id);
269+
int amdgpu_amdkfd_config_sq_perfmon(struct amdgpu_device *adev, uint32_t xcp_id,
270+
bool core_override_enable, bool reg_override_enable, bool perfmon_override_enable);
271+
269272

270273
/* Read user wptr from a specified user address space with page fault
271274
* disabled. The memory must be pinned and mapped to the hardware when

0 commit comments

Comments
 (0)