drm/amdgpu/gfx10: ignore rlc ucode validation
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/gfx10: ignore rlc ucode validation
There are apparently ucode versions in the wild with incorrect sizes specified in the header. We never checked this before, so don't start now.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +6 -1
@@ -4061,9 +4061,14 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) err =request_firmware (&adev->gfx.rlc_fw, fw_name, adev->dev);if (err) goto out; +/* don't check this. There are apparently firmwares in the wild with +* incorrect size in the header +*/ err =amdgpu_ucode_validate (adev->gfx.rlc_fw);if (err) - goto out; +dev_dbg (adev->dev, +"gfx10: amdgpu_ucode_validate() failed \"%s\"\n" , + fw_name); rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; version_major =le16_to_cpu (rlc_hdr->header.header_version_major); version_minor =le16_to_cpu (rlc_hdr->header.header_version_minor);
Signature · 1 line
2.37.3
Reviewed-by Guchun Chen <[email protected]>
Regards,
Guchun
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, September 29, 2022 3:31 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/gfx10: ignore rlc ucode validation
There are apparently ucode versions in the wild with incorrect sizes specified in the header. We never checked this before, so don't start now.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +6 -1
@@ -4061,9 +4061,14 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) err =request_firmware (&adev->gfx.rlc_fw, fw_name, adev->dev);if (err) goto out; +/* don't check this. There are apparently firmwares in the wild with +* incorrect size in the header +*/ err =amdgpu_ucode_validate (adev->gfx.rlc_fw);if (err) - goto out; +dev_dbg (adev->dev, +"gfx10: amdgpu_ucode_validate() failed \"%s\"\n" , + fw_name); rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; version_major =le16_to_cpu (rlc_hdr->header.header_version_major); version_minor =le16_to_cpu (rlc_hdr->header.header_version_minor);
--
2.37.3