summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2023-10-12 10:33:22 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-10-13 18:32:41 +0300
commita8558fce7ad0c60be5f652ad76adef9a387465bb (patch)
tree0445af602a53e4c12a8c9ac3d1a6ec982834458d
parentf74f19c4407f4ebd2a98a1d23eb75c7c4b05f272 (diff)
downloadlinux-a8558fce7ad0c60be5f652ad76adef9a387465bb.tar.xz
drm/amdgpu: Avoid FRU EEPROM access on APU
FRU EEPROM access is not valid for APU devices. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
index d635e61805ea..a08c148b13f9 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.