drm/amdgpu: Optimize TA load/unload/invoke debugfs interfaces
authorCandice Li <candice.li@amd.com>
Tue, 25 Oct 2022 10:32:15 +0000 (18:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Oct 2022 19:12:08 +0000 (15:12 -0400)
commit896b7addf2dc24908ad87f8ebeff83b2a83b8e04
treebb2cdfdd8c26fd1d390644e5e0d182a2cf192f36
parentbf7d777289d106963fd2080d298e6b88b7263b66
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.h