mirror of https://gitee.com/openkylin/linux.git
drm/amdgpu: add helper function to print psp hdr
print the psp header data like we do for other firmwares. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Le Ma <Le.Ma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4a94ba8f37
commit
6fa405646d
|
@ -227,6 +227,30 @@ void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void amdgpu_ucode_print_psp_hdr(const struct common_firmware_header *hdr)
|
||||||
|
{
|
||||||
|
uint16_t version_major = le16_to_cpu(hdr->header_version_major);
|
||||||
|
uint16_t version_minor = le16_to_cpu(hdr->header_version_minor);
|
||||||
|
|
||||||
|
DRM_DEBUG("PSP\n");
|
||||||
|
amdgpu_ucode_print_common_hdr(hdr);
|
||||||
|
|
||||||
|
if (version_major == 1) {
|
||||||
|
const struct psp_firmware_header_v1_0 *psp_hdr =
|
||||||
|
container_of(hdr, struct psp_firmware_header_v1_0, header);
|
||||||
|
|
||||||
|
DRM_DEBUG("ucode_feature_version: %u\n",
|
||||||
|
le32_to_cpu(psp_hdr->ucode_feature_version));
|
||||||
|
DRM_DEBUG("sos_offset_bytes: %u\n",
|
||||||
|
le32_to_cpu(psp_hdr->sos_offset_bytes));
|
||||||
|
DRM_DEBUG("sos_size_bytes: %u\n",
|
||||||
|
le32_to_cpu(psp_hdr->sos_size_bytes));
|
||||||
|
} else {
|
||||||
|
DRM_ERROR("Unknown PSP ucode version: %u.%u\n",
|
||||||
|
version_major, version_minor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr)
|
void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr)
|
||||||
{
|
{
|
||||||
uint16_t version_major = le16_to_cpu(hdr->header_version_major);
|
uint16_t version_major = le16_to_cpu(hdr->header_version_major);
|
||||||
|
|
|
@ -300,6 +300,7 @@ void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr);
|
||||||
void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr);
|
void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr);
|
||||||
void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr);
|
void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr);
|
||||||
void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr);
|
void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr);
|
||||||
|
void amdgpu_ucode_print_psp_hdr(const struct common_firmware_header *hdr);
|
||||||
void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr);
|
void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr);
|
||||||
int amdgpu_ucode_validate(const struct firmware *fw);
|
int amdgpu_ucode_validate(const struct firmware *fw);
|
||||||
bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr,
|
bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr,
|
||||||
|
|
Loading…
Reference in New Issue