]> git.itanic.dy.fi Git - linux-stable/commit
drm/amd: Add a new helper for loading/validating microcode
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 3 Jan 2023 19:18:19 +0000 (13:18 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Jan 2023 21:27:58 +0000 (16:27 -0500)
commit2210af50ae7f4104269dfde7bafbbfbacdbe1a2b
tree8342abad383f0271de18ee779c5e868a5c644993
parent755f32a39e19b5ade9353dc9beaca72853ac4862
drm/amd: Add a new helper for loading/validating microcode

All microcode runs a basic validation after it's been loaded. Each
IP block as part of init will run both.

Introduce a wrapper for request_firmware and amdgpu_ucode_validate.
This wrapper will also remap any error codes from request_firmware
to -ENODEV.  This is so that early_init will fail if firmware couldn't
be loaded instead of the IP block being disabled.

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h