From: Lijo Lazar Date: Thu, 12 Oct 2023 07:33:22 +0000 (+0530) Subject: drm/amdgpu: Avoid FRU EEPROM access on APU X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a8558fce7ad0c60be5f652ad76adef9a387465bb;p=linux.git drm/amdgpu: Avoid FRU EEPROM access on APU FRU EEPROM access is not valid for APU devices. Signed-off-by: Lijo Lazar Reviewed-by: Yang Wang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c index d635e61805eae..a08c148b13f92 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c @@ -42,8 +42,9 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev, u32 *fru_addr) /* The i2c access is blocked on VF * TODO: Need other way to get the info + * Also, FRU not valid for APU devices. */ - if (amdgpu_sriov_vf(adev)) + if (amdgpu_sriov_vf(adev) || (adev->flags & AMD_IS_APU)) return false; /* The default I2C EEPROM address of the FRU.