diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2023-01-03 14:41:33 -0600 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-01-10 14:32:56 -0500 |
commit | 2d39c7ae37a5033c7eeff690b29a404b2cbffffb (patch) | |
tree | 950d9ba126e9622f26c9711e15b429543fa29285 /drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | |
parent | 93fec4f8c158584065134b4d45e875499bf517c8 (diff) | |
download | linux-2d39c7ae37a5033c7eeff690b29a404b2cbffffb.tar.gz linux-2d39c7ae37a5033c7eeff690b29a404b2cbffffb.tar.bz2 linux-2d39c7ae37a5033c7eeff690b29a404b2cbffffb.zip |
drm/amd: Load PSP microcode during early_init
Simplifies the code so that all PSP versions will get the firmware
name from `amdgpu_ucode_ip_version_decode` and then use this filename
to load microcode as part of the early_init process.
Any failures will cause the driver to fail to probe before the firmware
framebuffer has been removed.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/psp_v12_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c index 2a6df3680436..fcd708eae75c 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c @@ -48,24 +48,13 @@ MODULE_FIRMWARE("amdgpu/green_sardine_ta.bin"); static int psp_v12_0_init_microcode(struct psp_context *psp) { struct amdgpu_device *adev = psp->adev; - const char *chip_name; char ucode_prefix[30]; int err = 0; DRM_DEBUG("\n"); - switch (adev->asic_type) { - case CHIP_RENOIR: - if (adev->apu_flags & AMD_APU_IS_RENOIR) - chip_name = "renoir"; - else - chip_name = "green_sardine"; - break; - default: - BUG(); - } amdgpu_ucode_ip_version_decode(adev, MP0_HWIP, ucode_prefix, sizeof(ucode_prefix)); - err = psp_init_asd_microcode(psp, chip_name); + err = psp_init_asd_microcode(psp, ucode_prefix); if (err) return err; |