]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: add debugfs for spirom IFWI dump
authorShiwu Zhang <shiwu.zhang@amd.com>
Fri, 21 Mar 2025 13:48:16 +0000 (21:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 May 2025 15:30:15 +0000 (11:30 -0400)
commit72ea78335e782d7991934e39f2a998a3d134e4fd
tree8f50ec459d05928c307e84e1930340177ae584aa
parent64db76701351913a07fe3032210ef5e6ab13dea8
drm/amdgpu: add debugfs for spirom IFWI dump

Expose the debugfs file node for user space to dump the IFWI image
on spirom.

For one transaction between PSP and host, it will read out the
images on both active and inactive partitions so a buffer with two
times the size of maximum IFWI image (currently 16MByte) is needed.

v2: move the vbios gfl macros to the common header and rename the
    bo triplet struct to spirom_bo for this specific usage (Hawking)

v3: return directly the result of last command execution (Lijo)

Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c