diff options
author | Candice Li <candice.li@amd.com> | 2022-10-25 18:32:15 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-10-27 15:12:08 -0400 |
commit | 896b7addf2dc24908ad87f8ebeff83b2a83b8e04 (patch) | |
tree | bb2cdfdd8c26fd1d390644e5e0d182a2cf192f36 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h | |
parent | bf7d777289d106963fd2080d298e6b88b7263b66 (diff) |
drm/amdgpu: Optimize TA load/unload/invoke debugfs interfaces
1. Add a function pointer structure ta_funcs to psp context
2. Make the interfaces generic to all TAs
3. Leverage exisitng TA context and remove unused functions
4. Fix return code bugs
v2: Add comments for ta funcs macros and correct typo
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Candice Li <candice.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h index cfc1542f63ef..14cd1c81c3e6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h @@ -24,6 +24,11 @@ #ifndef __AMDGPU_PSP_TA_H__ #define __AMDGPU_PSP_TA_H__ +/* Calling set_ta_context_funcs is required before using the following macros */ +#define psp_fn_ta_initialize(psp) ((psp)->ta_funcs->fn_ta_initialize((psp))) +#define psp_fn_ta_invoke(psp, ta_cmd_id) ((psp)->ta_funcs->fn_ta_invoke((psp), (ta_cmd_id))) +#define psp_fn_ta_terminate(psp) ((psp)->ta_funcs->fn_ta_terminate((psp))) + void amdgpu_ta_if_debugfs_init(struct amdgpu_device *adev); #endif |