aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index af65c24cefe3..d0e87102e1b9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -713,6 +713,7 @@ static int amdgpu_cgs_rel_firmware(struct cgs_device *cgs_device, enum cgs_ucode
713 CGS_FUNC_ADEV; 713 CGS_FUNC_ADEV;
714 if ((CGS_UCODE_ID_SMU == type) || (CGS_UCODE_ID_SMU_SK == type)) { 714 if ((CGS_UCODE_ID_SMU == type) || (CGS_UCODE_ID_SMU_SK == type)) {
715 release_firmware(adev->pm.fw); 715 release_firmware(adev->pm.fw);
716 adev->pm.fw = NULL;
716 return 0; 717 return 0;
717 } 718 }
718 /* cannot release other firmware because they are not created by cgs */ 719 /* cannot release other firmware because they are not created by cgs */
@@ -808,6 +809,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
808 const uint8_t *src; 809 const uint8_t *src;
809 const struct smc_firmware_header_v1_0 *hdr; 810 const struct smc_firmware_header_v1_0 *hdr;
810 811
812 if (CGS_UCODE_ID_SMU_SK == type)
813 amdgpu_cgs_rel_firmware(cgs_device, CGS_UCODE_ID_SMU);
814
811 if (!adev->pm.fw) { 815 if (!adev->pm.fw) {
812 switch (adev->asic_type) { 816 switch (adev->asic_type) {
813 case CHIP_TOPAZ: 817 case CHIP_TOPAZ: