]> git.proxmox.com Git - mirror_ubuntu-kernels.git/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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 9 Aug 2023 09:37:48 +0000 (11:37 +0200)
commit76e6413643d8280750c30cb69b52a1d1f4c71bc8
treec26882b41a42caeb6ff09d0d4a1923abf85f1ecc
parentf281905e0462afbfb9dc2e9025012d98ca77f22e
drm/amd: Add a new helper for loading/validating microcode

BugLink: https://bugs.launchpad.net/bugs/2028580
commit 2210af50ae7f4104269dfde7bafbbfbacdbe1a2b upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h