[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230103221852.22813-13-mario.limonciello@amd.com>
Date: Tue, 3 Jan 2023 16:18:31 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: Alex Deucher <alexander.deucher@....com>,
<linux-kernel@...r.kernel.org>
CC: Javier Martinez Canillas <javierm@...hat.com>,
Carlos Soriano Sanchez <csoriano@...hat.com>,
<amd-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
David Airlie <airlied@...il.com>,
"Daniel Vetter" <daniel@...ll.ch>, <christian.koenig@....com>,
Lazar Lijo <Lijo.Lazar@....com>,
Mario Limonciello <mario.limonciello@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>
Subject: [PATCH v4 12/27] drm/amd: Use `amdgpu_ucode_load` helper for MES
The `amdgpu_ucode_load` helper will ensure that the return code for
missing firmware is -ENODEV so that early_init can fail.
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
v3->v4:
* New patch
---
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
index dd8f35234507..df9efbca0f70 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
@@ -1438,11 +1438,7 @@ int amdgpu_mes_init_microcode(struct amdgpu_device *adev, int pipe)
snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin",
ucode_prefix,
pipe == AMDGPU_MES_SCHED_PIPE ? "" : "1");
- r = request_firmware(&adev->mes.fw[pipe], fw_name, adev->dev);
- if (r)
- goto out;
-
- r = amdgpu_ucode_validate(adev->mes.fw[pipe]);
+ r = amdgpu_ucode_load(adev, &adev->mes.fw[pipe], fw_name);
if (r)
goto out;
@@ -1482,7 +1478,6 @@ int amdgpu_mes_init_microcode(struct amdgpu_device *adev, int pipe)
}
return 0;
-
out:
release_firmware(adev->mes.fw[pipe]);
adev->mes.fw[pipe] = NULL;
--
2.34.1
Powered by blists - more mailing lists