diff options
| author | Mario Limonciello <mario.limonciello@amd.com> | 2023-01-03 14:12:37 -0600 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2023-01-09 17:02:18 -0500 |
| commit | 11e0b0067ec0707e8e598a5f9a547ab618ae7982 (patch) | |
| tree | 5a86dddf3191f4b0c9bae93fe30e47989c2f077f /drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | |
| parent | drm/amd: Load MES microcode during early_init (diff) | |
| download | linux-11e0b0067ec0707e8e598a5f9a547ab618ae7982.tar.gz linux-11e0b0067ec0707e8e598a5f9a547ab618ae7982.zip | |
drm/amd: Use `amdgpu_ucode_*` helpers for MES
The `amdgpu_ucode_request` helper will ensure that the return code for
missing firmware is -ENODEV so that early_init can fail.
The `amdgpu_ucode_release` helper provides symmetry for releasing firmware.
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/mes_v11_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c index ea615c914ef5..e0c394d1ed4e 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c @@ -459,13 +459,6 @@ static const struct amdgpu_mes_funcs mes_v11_0_funcs = { .misc_op = mes_v11_0_misc_op, }; -static void mes_v11_0_free_microcode(struct amdgpu_device *adev, - enum admgpu_mes_pipe pipe) -{ - release_firmware(adev->mes.fw[pipe]); - adev->mes.fw[pipe] = NULL; -} - static int mes_v11_0_allocate_ucode_buffer(struct amdgpu_device *adev, enum admgpu_mes_pipe pipe) { @@ -1073,8 +1066,7 @@ static int mes_v11_0_sw_fini(void *handle) amdgpu_bo_free_kernel(&adev->mes.eop_gpu_obj[pipe], &adev->mes.eop_gpu_addr[pipe], NULL); - - mes_v11_0_free_microcode(adev, pipe); + amdgpu_ucode_release(&adev->mes.fw[pipe]); } amdgpu_bo_free_kernel(&adev->gfx.kiq.ring.mqd_obj, |
