drm/amdgpu: Remove amdgpu_ucode_fini_bo
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 9 Oct 2018 06:22:04 +0000 (14:22 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Oct 2018 19:49:01 +0000 (14:49 -0500)
The variable clean is unnecessary.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
drivers/gpu/drm/amd/powerplay/amd_powerplay.c

index bd397d2916fb7a739576b6ef8a4755f179a63315..25d2f3e757f1bdac06054172f3ad9db6ef5ea8fa 100644 (file)
@@ -452,8 +452,6 @@ static int psp_hw_fini(void *handle)
        if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
                return 0;
 
-       amdgpu_ucode_fini_bo(adev);
-
        psp_ring_destroy(psp, PSP_RING_TYPE__KM);
 
        amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf);
index 57ed38422089a8a5325f6d21a39d4431cfbc4d62..971549f5833d702c1886db17b7dda991a36a383a 100644 (file)
@@ -490,22 +490,3 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
        }
        return 0;
 }
-
-int amdgpu_ucode_fini_bo(struct amdgpu_device *adev)
-{
-       int i;
-       struct amdgpu_firmware_info *ucode = NULL;
-
-       if (!adev->firmware.fw_size)
-               return 0;
-
-       for (i = 0; i < adev->firmware.max_ucodes; i++) {
-               ucode = &adev->firmware.ucode[i];
-               if (ucode->fw) {
-                       ucode->mc_addr = 0;
-                       ucode->kaddr = NULL;
-               }
-       }
-
-       return 0;
-}
index 651529645200e3f772d8befe8451ac93657d29a6..aa6641b944a085de9f70638e9d68410995de6680 100644 (file)
@@ -276,9 +276,8 @@ void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr);
 int amdgpu_ucode_validate(const struct firmware *fw);
 bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr,
                                uint16_t hdr_major, uint16_t hdr_minor);
-int amdgpu_ucode_init_bo(struct amdgpu_device *adev);
-int amdgpu_ucode_fini_bo(struct amdgpu_device *adev);
 
+int amdgpu_ucode_init_bo(struct amdgpu_device *adev);
 int amdgpu_ucode_create_bo(struct amdgpu_device *adev);
 void amdgpu_ucode_free_bo(struct amdgpu_device *adev);
 
index 6bc8e9c08b0c5e7f7aabb22cd9e8cd2349be1313..75b56ae032ce77e495f8549c0ca49e0a350f2090 100644 (file)
@@ -109,9 +109,6 @@ static int pp_sw_fini(void *handle)
 
        hwmgr_sw_fini(hwmgr);
 
-       if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
-               amdgpu_ucode_fini_bo(adev);
-
        release_firmware(adev->pm.fw);
        adev->pm.fw = NULL;