Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: rename psp_execute_non_psp_fw_load and make it global

This will make this function more general, and then serve other IPs.

Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lang Yu and committed by
Alex Deucher
45b51acb 41b8a081

+9 -6
+6 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
··· 2448 2448 return ret; 2449 2449 } 2450 2450 2451 - static int psp_execute_non_psp_fw_load(struct psp_context *psp, 2452 - struct amdgpu_firmware_info *ucode) 2451 + int psp_execute_ip_fw_load(struct psp_context *psp, 2452 + struct amdgpu_firmware_info *ucode) 2453 2453 { 2454 2454 int ret = 0; 2455 2455 struct psp_gfx_cmd_resp *cmd = acquire_psp_cmd_buf(psp); ··· 2492 2492 DRM_WARN("Failed to set MP1 state prepare for reload\n"); 2493 2493 } 2494 2494 2495 - ret = psp_execute_non_psp_fw_load(psp, ucode); 2495 + ret = psp_execute_ip_fw_load(psp, ucode); 2496 2496 2497 2497 if (ret) 2498 2498 DRM_ERROR("PSP load smu failed!\n"); ··· 2534 2534 for (i = 0; i < ucode_count; ++i) { 2535 2535 ucode = ucode_list[i]; 2536 2536 psp_print_fw_hdr(psp, ucode); 2537 - ret = psp_execute_non_psp_fw_load(psp, ucode); 2537 + ret = psp_execute_ip_fw_load(psp, ucode); 2538 2538 if (ret) 2539 2539 return ret; 2540 2540 } ··· 2581 2581 2582 2582 psp_print_fw_hdr(psp, ucode); 2583 2583 2584 - ret = psp_execute_non_psp_fw_load(psp, ucode); 2584 + ret = psp_execute_ip_fw_load(psp, ucode); 2585 2585 if (ret) 2586 2586 return ret; 2587 2587 ··· 2930 2930 ucode.mc_addr = cmd_gpu_addr; 2931 2931 ucode.ucode_size = cmd_size; 2932 2932 2933 - return psp_execute_non_psp_fw_load(&adev->psp, &ucode); 2933 + return psp_execute_ip_fw_load(&adev->psp, &ucode); 2934 2934 } 2935 2935 2936 2936 int psp_ring_cmd_submit(struct psp_context *psp,
+3
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
··· 462 462 extern int psp_wait_for_spirom_update(struct psp_context *psp, uint32_t reg_index, 463 463 uint32_t field_val, uint32_t mask, uint32_t msec_timeout); 464 464 465 + int psp_execute_ip_fw_load(struct psp_context *psp, 466 + struct amdgpu_firmware_info *ucode); 467 + 465 468 int psp_gpu_reset(struct amdgpu_device *adev); 466 469 int psp_update_vcn_sram(struct amdgpu_device *adev, int inst_idx, 467 470 uint64_t cmd_gpu_addr, int cmd_size);