From: Mario Limonciello <mario.limonciello@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, <linux-kernel@vger.kernel.org>
Cc: Javier Martinez Canillas <javierm@redhat.com>,
Carlos Soriano Sanchez <csoriano@redhat.com>,
<amd-gfx@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>,
David Airlie <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>, <christian.koenig@amd.com>,
Lazar Lijo <Lijo.Lazar@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>
Subject: [PATCH v5 06/45] drm/amd: Use `amdgpu_ucode_request` helper for SDMA
Date: Wed, 4 Jan 2023 10:39:55 -0600 [thread overview]
Message-ID: <20230104164042.30271-7-mario.limonciello@amd.com> (raw)
In-Reply-To: <20230104164042.30271-1-mario.limonciello@amd.com>
The `amdgpu_ucode_request` 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@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
index ea5278f094c0..1668360bc699 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
@@ -154,16 +154,11 @@ int amdgpu_sdma_process_ecc_irq(struct amdgpu_device *adev,
static int amdgpu_sdma_init_inst_ctx(struct amdgpu_sdma_instance *sdma_inst)
{
- int err = 0;
uint16_t version_major;
const struct common_firmware_header *header = NULL;
const struct sdma_firmware_header_v1_0 *hdr;
const struct sdma_firmware_header_v2_0 *hdr_v2;
- err = amdgpu_ucode_validate(sdma_inst->fw);
- if (err)
- return err;
-
header = (const struct common_firmware_header *)
sdma_inst->fw->data;
version_major = le16_to_cpu(header->header_version_major);
@@ -195,7 +190,7 @@ void amdgpu_sdma_destroy_inst_ctx(struct amdgpu_device *adev,
int i;
for (i = 0; i < adev->sdma.num_instances; i++) {
- release_firmware(adev->sdma.instance[i].fw);
+ amdgpu_ucode_release(adev->sdma.instance[i].fw);
if (duplicate)
break;
}
@@ -214,7 +209,7 @@ int amdgpu_sdma_init_microcode(struct amdgpu_device *adev,
const struct sdma_firmware_header_v2_0 *sdma_hdr;
uint16_t version_major;
- err = request_firmware(&adev->sdma.instance[instance].fw, fw_name, adev->dev);
+ err = amdgpu_ucode_request(adev, &adev->sdma.instance[instance].fw, fw_name);
if (err)
goto out;
--
2.34.1
next prev parent reply other threads:[~2023-01-04 16:42 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 16:39 [PATCH v5 00/45] Recover from failure to probe GPU Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 01/45] drm/amd: Delay removal of the firmware framebuffer Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 02/45] drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode" Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 03/45] drm/amd: Convert SMUv11 microcode to use `amdgpu_ucode_ip_version_decode` Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 04/45] drm/amd: Convert SMUv13 " Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 05/45] drm/amd: Add a new helper for loading/validating microcode Mario Limonciello
2023-01-04 17:09 ` Alex Deucher
2023-01-04 16:39 ` Mario Limonciello [this message]
2023-01-04 16:39 ` [PATCH v5 07/45] drm/amd: Convert SDMA to use `amdgpu_ucode_ip_version_decode` Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 08/45] drm/amd: Make SDMA firmware load failures less noisy Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 09/45] drm/amd: Use `amdgpu_ucode_*` helpers for VCN Mario Limonciello
2023-01-04 16:39 ` [PATCH v5 10/45] drm/amd: Load VCN microcode during early_init Mario Limonciello
2023-01-04 17:15 ` Alex Deucher
2023-01-04 17:17 ` Limonciello, Mario
2023-01-04 16:40 ` [PATCH v5 11/45] drm/amd: Load MES " Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 12/45] drm/amd: Use `amdgpu_ucode_*` helpers for MES Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 13/45] drm/amd: Remove superfluous assignment for `adev->mes.adev` Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 14/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX9 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 15/45] drm/amd: Load GFX9 microcode during early_init Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 16/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX10 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 17/45] drm/amd: Load GFX10 microcode during early_init Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 18/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX11 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 19/45] drm/amd: Load GFX11 microcode during early_init Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 20/45] drm/amd: Parse both v1 and v2 TA microcode headers using same function Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 21/45] drm/amd: Avoid BUG() for case of SRIOV missing IP version Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 22/45] drm/amd: Load PSP microcode during early_init Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 23/45] drm/amd: Use `amdgpu_ucode_*` helpers for PSP Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 24/45] drm/amd/display: Load DMUB microcode during early_init Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 25/45] drm/amd: Use `amdgpu_ucode_release` helper for DMUB Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 26/45] drm/amd: Use `amdgpu_ucode_*` helpers for SMU Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 27/45] drm/amd: Load SMU microcode during early_init Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 28/45] drm/amd: Optimize SRIOV switch/case for PSP microcode load Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 29/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX6 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 30/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX7 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 31/45] drm/amd: Use `amdgpu_ucode_*` helpers for GFX8 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 32/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC6 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 33/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC7 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 34/45] drm/amd: Use `amdgpu_ucode_*` helpers for GMC8 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 35/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA2.4 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 36/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA3.0 Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 37/45] drm/amd: Use `amdgpu_ucode_*` helpers for SDMA on CIK Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 38/45] drm/amd: Use `amdgpu_ucode_*` helpers for UVD Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 39/45] drm/amd: Use `amdgpu_ucode_*` helpers for VCE Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 40/45] drm/amd: Use `amdgpu_ucode_*` helpers for CGS Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 41/45] drm/amd: Use `amdgpu_ucode_*` helpers for GPU info bin Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 42/45] drm/amd: Use `amdgpu_ucode_*` helpers for DMCU Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 43/45] drm/amd: Use `amdgpu_ucode_release` helper for powerplay Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 44/45] drm/amd: Use `amdgpu_ucode_release` helper for si Mario Limonciello
2023-01-04 16:40 ` [PATCH v5 45/45] drm/amd: make amdgpu_ucode_validate static Mario Limonciello
2023-01-04 17:30 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230104164042.30271-7-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=Lijo.Lazar@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=csoriano@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®