Skip to contentSkip to conversation

drm/amdgpu: Avoid FRU EEPROM access on APU

PATCH In review Lijo Lazar 2 participants 2 messages Oct 12, 2023

Subsystems (2)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Avoid FRU EEPROM access on APU

FRU EEPROM access is not valid for APU devices.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +2 -1
index d635e61805ea..a08c148b13f9 100644
@@ -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.
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Best Regards
Kevin
________________________________
发件人: Lazar, Lijo <[email protected]>
发送时间: 星期四, 十月 12, 2023 15:36
收件人: [email protected] <[email protected]>
抄送: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Wang, Yang(Kevin) <[email protected]> 主题: [PATCH] drm/amdgpu: Avoid FRU EEPROM access on APU

FRU EEPROM access is not valid for APU devices.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +2 -1
index d635e61805ea..a08c148b13f9 100644
@@ -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.

--
2.25.1