drm/amdgpu: disable FRU access on special SIENNA CICHLID card
authorGuchun Chen <guchun.chen@amd.com>
Wed, 24 Aug 2022 15:00:02 +0000 (23:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Aug 2022 20:56:00 +0000 (16:56 -0400)
Below driver load error will be printed, not friendly to end user.

amdgpu: ATOM BIOS: 113-D603GLXE-077
[drm] FRU: Failed to get size field
[drm:amdgpu_fru_get_product_info [amdgpu]] *ERROR* Failed to read FRU Manufacturer, ret:-5

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c

index ecada5e..e325150 100644 (file)
@@ -66,10 +66,15 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev)
                return true;
        case CHIP_SIENNA_CICHLID:
                if (strnstr(atom_ctx->vbios_version, "D603",
+                   sizeof(atom_ctx->vbios_version))) {
+                       if (strnstr(atom_ctx->vbios_version, "D603GLXE",
                            sizeof(atom_ctx->vbios_version)))
-                       return true;
-               else
+                               return false;
+                       else
+                               return true;
+               } else {
                        return false;
+               }
        default:
                return false;
        }