diff options
author | Huang Rui <ray.huang@amd.com> | 2019-02-20 06:43:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-21 19:59:24 -0400 |
commit | 336a1c825e362aeee402e832ec276e35e0b48cda (patch) | |
tree | f2c54c0d45e127e364a062bbbdcd4d9338326891 | |
parent | 9e8a163d9bd472af6c61784215d5ba58bd7baebf (diff) |
drm/amdgpu: bump smc firmware header version to v2 (v2)
This patch bumps smc firmware header version to v2 for storing soft pptable.
v2: fix the typo, and add prints for v2 header
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 09f384ce8cd7..7081ad9f93e3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |||
@@ -77,6 +77,14 @@ void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr) | |||
77 | container_of(hdr, struct smc_firmware_header_v1_0, header); | 77 | container_of(hdr, struct smc_firmware_header_v1_0, header); |
78 | 78 | ||
79 | DRM_DEBUG("ucode_start_addr: %u\n", le32_to_cpu(smc_hdr->ucode_start_addr)); | 79 | DRM_DEBUG("ucode_start_addr: %u\n", le32_to_cpu(smc_hdr->ucode_start_addr)); |
80 | } else if (version_major == 2) { | ||
81 | const struct smc_firmware_header_v1_0 *v1_hdr = | ||
82 | container_of(hdr, struct smc_firmware_header_v1_0, header); | ||
83 | const struct smc_firmware_header_v2_0 *v2_hdr = | ||
84 | container_of(v1_hdr, struct smc_firmware_header_v2_0, v1_0); | ||
85 | |||
86 | DRM_INFO("ppt_offset_bytes: %u\n", le32_to_cpu(v2_hdr->ppt_offset_bytes)); | ||
87 | DRM_INFO("ppt_size_bytes: %u\n", le32_to_cpu(v2_hdr->ppt_size_bytes)); | ||
80 | } else { | 88 | } else { |
81 | DRM_ERROR("Unknown SMC ucode version: %u.%u\n", version_major, version_minor); | 89 | DRM_ERROR("Unknown SMC ucode version: %u.%u\n", version_major, version_minor); |
82 | } | 90 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h index 3806a7957c6f..9b096228a02f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | |||
@@ -49,6 +49,13 @@ struct smc_firmware_header_v1_0 { | |||
49 | uint32_t ucode_start_addr; | 49 | uint32_t ucode_start_addr; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | /* version_major=2, version_minor=0 */ | ||
53 | struct smc_firmware_header_v2_0 { | ||
54 | struct smc_firmware_header_v1_0 v1_0; | ||
55 | uint32_t ppt_offset_bytes; /* soft pptable offset */ | ||
56 | uint32_t ppt_size_bytes; /* soft pptable size */ | ||
57 | }; | ||
58 | |||
52 | /* version_major=1, version_minor=0 */ | 59 | /* version_major=1, version_minor=0 */ |
53 | struct psp_firmware_header_v1_0 { | 60 | struct psp_firmware_header_v1_0 { |
54 | struct common_firmware_header header; | 61 | struct common_firmware_header header; |
@@ -194,6 +201,7 @@ union amdgpu_firmware_header { | |||
194 | struct common_firmware_header common; | 201 | struct common_firmware_header common; |
195 | struct mc_firmware_header_v1_0 mc; | 202 | struct mc_firmware_header_v1_0 mc; |
196 | struct smc_firmware_header_v1_0 smc; | 203 | struct smc_firmware_header_v1_0 smc; |
204 | struct smc_firmware_header_v2_0 smc_v2_0; | ||
197 | struct psp_firmware_header_v1_0 psp; | 205 | struct psp_firmware_header_v1_0 psp; |
198 | struct psp_firmware_header_v1_1 psp_v1_1; | 206 | struct psp_firmware_header_v1_1 psp_v1_1; |
199 | struct ta_firmware_header_v1_0 ta; | 207 | struct ta_firmware_header_v1_0 ta; |