[PATCH] drm/amdgpu: Set FRU bus for Aldebaran and Vega 20
Luben Tuikov
luben.tuikov at amd.com
Fri Feb 4 18:47:56 UTC 2022
The FRU and RAS EEPROMs share the same I2C bus on Aldebaran and Vega 20
ASICs. Set the FRU bus "pointer" to this single bus, as access to the FRU
is sought through that bus "pointer" and not through the RAS bus "pointer".
Cc: Roy Sun <Roy.Sun at amd.com>
Cc: Alex Deucher <Alexander.Deucher at amd.com>
Fixes: 9c6d2ba7057abb ("drm/amd: Expose the FRU SMU I2C bus")
Signed-off-by: Luben Tuikov <luben.tuikov at amd.com>
---
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 3 ++-
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
index 87acb089cfccd5..dd2d66090d2374 100644
--- a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
@@ -741,7 +741,7 @@ int smu_v11_0_i2c_control_init(struct amdgpu_device *adev)
i2c_set_adapdata(control, smu_i2c);
adev->pm.ras_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
- adev->pm.fru_eeprom_i2c_bus = NULL;
+ adev->pm.fru_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
res = i2c_add_adapter(control);
if (res)
@@ -756,6 +756,7 @@ void smu_v11_0_i2c_control_fini(struct amdgpu_device *adev)
i2c_del_adapter(control);
adev->pm.ras_eeprom_i2c_bus = NULL;
+ adev->pm.fru_eeprom_i2c_bus = NULL;
}
/*
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index ba4c9771ffc56b..3d96d4af92d97f 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -1583,6 +1583,7 @@ static int aldebaran_i2c_control_init(struct smu_context *smu)
}
adev->pm.ras_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
+ adev->pm.fru_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
return 0;
Out_err:
base-commit: 24b54e10043609a55194badff58bf91189c49793
prerequisite-patch-id: d694f05bfcdf100c1d6957afa209e304dad98404
prerequisite-patch-id: b106a5bd7e0d3a7c225a767ca4384162353cca9a
prerequisite-patch-id: 77d04393fc872e4f4dd158659bd44ba40b749883
--
2.35.0.3.gb23dac905b
More information about the amd-gfx
mailing list