drm/amdgpu: Avoid FRU EEPROM access on APU
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 12 Oct 2023 07:33:22 +0000 (13:03 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Oct 2023 15:32:41 +0000 (11:32 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c

index d635e61805eaec40f6e60b2a90850197dddd6c04..a08c148b13f92aa9bc0c158d0caf633c5d2043f4 100644 (file)
@@ -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.