diff options
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 24 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 9f50d65b350a..04d007db06f7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |||
| @@ -227,6 +227,30 @@ void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr) | |||
| 227 | } | 227 | } |
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | void amdgpu_ucode_print_psp_hdr(const struct common_firmware_header *hdr) | ||
| 231 | { | ||
| 232 | uint16_t version_major = le16_to_cpu(hdr->header_version_major); | ||
| 233 | uint16_t version_minor = le16_to_cpu(hdr->header_version_minor); | ||
| 234 | |||
| 235 | DRM_DEBUG("PSP\n"); | ||
| 236 | amdgpu_ucode_print_common_hdr(hdr); | ||
| 237 | |||
| 238 | if (version_major == 1) { | ||
| 239 | const struct psp_firmware_header_v1_0 *psp_hdr = | ||
| 240 | container_of(hdr, struct psp_firmware_header_v1_0, header); | ||
| 241 | |||
| 242 | DRM_DEBUG("ucode_feature_version: %u\n", | ||
| 243 | le32_to_cpu(psp_hdr->ucode_feature_version)); | ||
| 244 | DRM_DEBUG("sos_offset_bytes: %u\n", | ||
| 245 | le32_to_cpu(psp_hdr->sos_offset_bytes)); | ||
| 246 | DRM_DEBUG("sos_size_bytes: %u\n", | ||
| 247 | le32_to_cpu(psp_hdr->sos_size_bytes)); | ||
| 248 | } else { | ||
| 249 | DRM_ERROR("Unknown PSP ucode version: %u.%u\n", | ||
| 250 | version_major, version_minor); | ||
| 251 | } | ||
| 252 | } | ||
| 253 | |||
| 230 | void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr) | 254 | void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr) |
| 231 | { | 255 | { |
| 232 | uint16_t version_major = le16_to_cpu(hdr->header_version_major); | 256 | uint16_t version_major = le16_to_cpu(hdr->header_version_major); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h index c7a0e6e13410..3806a7957c6f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | |||
| @@ -300,6 +300,7 @@ void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr); | |||
| 300 | void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr); | 300 | void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr); |
| 301 | void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr); | 301 | void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr); |
| 302 | void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr); | 302 | void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr); |
| 303 | void amdgpu_ucode_print_psp_hdr(const struct common_firmware_header *hdr); | ||
| 303 | void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr); | 304 | void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr); |
| 304 | int amdgpu_ucode_validate(const struct firmware *fw); | 305 | int amdgpu_ucode_validate(const struct firmware *fw); |
| 305 | bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr, | 306 | bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr, |
