mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/amdkfd: add kgd control interface for ptl
Add kgd->ptl_ctrl() callback so KFD can query/enable/disable PTL state through the PSP performance monitor interface. Signed-off-by: Perry Yuan <perry.yuan@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f9f9fe3a7e
commit
c2396ee614
|
|
@ -520,6 +520,16 @@ static uint32_t kgd_gfx_v9_4_3_hqd_sdma_get_doorbell(struct amdgpu_device *adev,
|
|||
return is_active ? doorbell_off >> 2 : 0;
|
||||
}
|
||||
|
||||
static uint32_t kgd_v9_4_3_ptl_ctrl(struct amdgpu_device *adev,
|
||||
uint32_t cmd,
|
||||
uint32_t *ptl_state,
|
||||
enum amdgpu_ptl_fmt *fmt1,
|
||||
enum amdgpu_ptl_fmt *fmt2)
|
||||
{
|
||||
return amdgpu_ptl_perf_monitor_ctrl(adev, cmd,
|
||||
ptl_state, fmt1, fmt2);
|
||||
}
|
||||
|
||||
const struct kfd2kgd_calls gc_9_4_3_kfd2kgd = {
|
||||
.program_sh_mem_settings = kgd_gfx_v9_program_sh_mem_settings,
|
||||
.set_pasid_vmid_mapping = kgd_gfx_v9_4_3_set_pasid_vmid_mapping,
|
||||
|
|
@ -555,5 +565,6 @@ const struct kfd2kgd_calls gc_9_4_3_kfd2kgd = {
|
|||
.clear_address_watch = kgd_gfx_v9_4_3_clear_address_watch,
|
||||
.hqd_get_pq_addr = kgd_gfx_v9_hqd_get_pq_addr,
|
||||
.hqd_reset = kgd_gfx_v9_hqd_reset,
|
||||
.hqd_sdma_get_doorbell = kgd_gfx_v9_4_3_hqd_sdma_get_doorbell
|
||||
.hqd_sdma_get_doorbell = kgd_gfx_v9_4_3_hqd_sdma_get_doorbell,
|
||||
.ptl_ctrl = kgd_v9_4_3_ptl_ctrl
|
||||
};
|
||||
|
|
|
|||
|
|
@ -334,6 +334,11 @@ struct kfd2kgd_calls {
|
|||
uint32_t inst, unsigned int utimeout);
|
||||
uint32_t (*hqd_sdma_get_doorbell)(struct amdgpu_device *adev,
|
||||
int engine, int queue);
|
||||
uint32_t (*ptl_ctrl)(struct amdgpu_device *adev,
|
||||
uint32_t cmd,
|
||||
uint32_t *ptl_state,
|
||||
enum amdgpu_ptl_fmt *fmt1,
|
||||
enum amdgpu_ptl_fmt *fmt2);
|
||||
};
|
||||
|
||||
#endif /* KGD_KFD_INTERFACE_H_INCLUDED */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user