diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-10-09 02:22:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-10-10 15:49:01 -0400 |
commit | 735f654e5dd1c55d28aa04d49a9b7fcd3d5cccd0 (patch) | |
tree | 21a6da17f3b9c1681d390c7e694dc40eecfeceb0 | |
parent | c8963ea4ce1783034e1f9cf0d702fa490eb77836 (diff) |
drm/amdgpu: Remove amdgpu_ucode_fini_bo
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>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 19 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3 |
4 files changed, 1 insertions, 26 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index bd397d2916fb..25d2f3e757f1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |||
@@ -452,8 +452,6 @@ static int psp_hw_fini(void *handle) | |||
452 | if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) | 452 | if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) |
453 | return 0; | 453 | return 0; |
454 | 454 | ||
455 | amdgpu_ucode_fini_bo(adev); | ||
456 | |||
457 | psp_ring_destroy(psp, PSP_RING_TYPE__KM); | 455 | psp_ring_destroy(psp, PSP_RING_TYPE__KM); |
458 | 456 | ||
459 | amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf); | 457 | amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 57ed38422089..971549f5833d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |||
@@ -490,22 +490,3 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev) | |||
490 | } | 490 | } |
491 | return 0; | 491 | return 0; |
492 | } | 492 | } |
493 | |||
494 | int amdgpu_ucode_fini_bo(struct amdgpu_device *adev) | ||
495 | { | ||
496 | int i; | ||
497 | struct amdgpu_firmware_info *ucode = NULL; | ||
498 | |||
499 | if (!adev->firmware.fw_size) | ||
500 | return 0; | ||
501 | |||
502 | for (i = 0; i < adev->firmware.max_ucodes; i++) { | ||
503 | ucode = &adev->firmware.ucode[i]; | ||
504 | if (ucode->fw) { | ||
505 | ucode->mc_addr = 0; | ||
506 | ucode->kaddr = NULL; | ||
507 | } | ||
508 | } | ||
509 | |||
510 | return 0; | ||
511 | } | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h index 651529645200..aa6641b944a0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | |||
@@ -276,9 +276,8 @@ void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr); | |||
276 | int amdgpu_ucode_validate(const struct firmware *fw); | 276 | int amdgpu_ucode_validate(const struct firmware *fw); |
277 | bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr, | 277 | bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr, |
278 | uint16_t hdr_major, uint16_t hdr_minor); | 278 | uint16_t hdr_major, uint16_t hdr_minor); |
279 | int amdgpu_ucode_init_bo(struct amdgpu_device *adev); | ||
280 | int amdgpu_ucode_fini_bo(struct amdgpu_device *adev); | ||
281 | 279 | ||
280 | int amdgpu_ucode_init_bo(struct amdgpu_device *adev); | ||
282 | int amdgpu_ucode_create_bo(struct amdgpu_device *adev); | 281 | int amdgpu_ucode_create_bo(struct amdgpu_device *adev); |
283 | void amdgpu_ucode_free_bo(struct amdgpu_device *adev); | 282 | void amdgpu_ucode_free_bo(struct amdgpu_device *adev); |
284 | 283 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 6bc8e9c08b0c..75b56ae032ce 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c | |||
@@ -109,9 +109,6 @@ static int pp_sw_fini(void *handle) | |||
109 | 109 | ||
110 | hwmgr_sw_fini(hwmgr); | 110 | hwmgr_sw_fini(hwmgr); |
111 | 111 | ||
112 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) | ||
113 | amdgpu_ucode_fini_bo(adev); | ||
114 | |||
115 | release_firmware(adev->pm.fw); | 112 | release_firmware(adev->pm.fw); |
116 | adev->pm.fw = NULL; | 113 | adev->pm.fw = NULL; |
117 | 114 | ||