On 9/12/2024 2:42 AM, Russell, Kent wrote: > [AMD Official Use Only - AMD Internal Distribution Only] > > [AMD Official Use Only - AMD Internal Distribution Only] > > Fixed the typo locally. > >> -----Original Message----- >> From: Russell, Kent <Kent.Russell@xxxxxxx> >> Sent: Wednesday, September 11, 2024 2:06 PM >> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx >> Cc: Russell, Kent <Kent.Russell@xxxxxxx> >> Subject: [PATCH] drm/amdgpu: Retry i2c transfer once if it fails on SMU13.0.6 >> >> During init, there can be some collisions on the i2c bus that result in >> the EEPROM read failing. This has been mitigated in the PMFW to a >> degree, but there is still a small chance that the bus will be busy. >> When the read fails during RAS init, that disables page retirement >> altogether, which is obviously not ideal. To try to avoid that >> situation, set the eeprom_read function to retry once if the first read >> fails, specifically for smu_v13_0_6. >> >> Signed-off-by: Kent Russell <kent.russell@xxxxxxx> Reviewed-by: Lijo Lazar <lijo.lazar@xxxxxxx> Thanks, Lijo >> --- >> drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c >> b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c >> index 9974c9f8135e..65d24c2f7e24 100644 >> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c >> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c >> @@ -2107,8 +2107,12 @@ static int smu_v13_0_6_i2c_xfer(struct i2c_adapter >> *i2c_adap, >> } >> mutex_lock(&adev->pm.mutex); >> r = smu_v13_0_6_request_i2c_xfer(smu, req); >> - if (r) >> - goto fail; >> + if (r) { >> + /* Rrtry once, in case of an i2c collision */ > Rrtry->Retry >> + r = smu_v13_0_6_request_i2c_xfer(smu, req); >> + if (r) >> + goto fail; >> + } >> >> for (c = i = 0; i < num_msgs; i++) { >> if (!(msg[i].flags & I2C_M_RD)) { >> -- >> 2.34.1 >