summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
diff options
context:
space:
mode:
authorLikun Gao <Likun.Gao@amd.com>2021-12-08 16:19:52 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-05-04 09:55:30 -0400
commita6b6d38ed873bb4f105cde4b91f6d4cb5aa41efa (patch)
treeb7289e23f436611c338fc9b1549d243548bc2e01 /drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
parent911a75043f9e062fe232eb9fb428948afd80219b (diff)
downloadlinux-a6b6d38ed873bb4f105cde4b91f6d4cb5aa41efa.tar.bz2
drm/amdgpu: rework psp firmware name
Use the new helper for deriving the fw name from the IP version. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/psp_v13_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/psp_v13_0.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
index 024853eb1cd7..8d3cdfe17f56 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
@@ -53,6 +53,7 @@ static int psp_v13_0_init_microcode(struct psp_context *psp)
{
struct amdgpu_device *adev = psp->adev;
const char *chip_name;
+ char ucode_prefix[30];
int err = 0;
switch (adev->ip_versions[MP0_HWIP][0]) {
@@ -63,18 +64,12 @@ static int psp_v13_0_init_microcode(struct psp_context *psp)
case IP_VERSION(13, 0, 3):
chip_name = "yellow_carp";
break;
- case IP_VERSION(13, 0, 5):
- chip_name = "psp_13_0_5";
- break;
- case IP_VERSION(13, 0, 8):
- chip_name = "psp_13_0_8";
- break;
- case IP_VERSION(13, 0, 0):
- chip_name = "psp_13_0_0";
- break;
default:
- BUG();
+ amdgpu_ucode_ip_version_decode(adev, MP0_HWIP, ucode_prefix, sizeof(ucode_prefix));
+ chip_name = ucode_prefix;
+ break;
}
+
switch (adev->ip_versions[MP0_HWIP][0]) {
case IP_VERSION(13, 0, 2):
err = psp_init_sos_microcode(psp, chip_name);