Re: [PATCH] drm/amdgpu: Set FRU bus for Aldebaran and Vega 20

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 4, 2022 at 1:56 PM Luben Tuikov <luben.tuikov@xxxxxxx> wrote:
>
> On 2022-02-04 13:53, Alex Deucher wrote:
> > On Fri, Feb 4, 2022 at 1:48 PM Luben Tuikov <luben.tuikov@xxxxxxx> wrote:
> >>
> >> 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@xxxxxxx>
> >> Cc: Alex Deucher <Alexander.Deucher@xxxxxxx>
> >> Fixes: 9c6d2ba7057abb ("drm/amd: Expose the FRU SMU I2C bus")
> >> Signed-off-by: Luben Tuikov <luben.tuikov@xxxxxxx>
> >> ---
> >>  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;
> >
> > Does this need to be set to NULL in control_fini() for consistency?
> > Other than that, looks good to me.
>
> It already is--I didn't need to add it as I did above for Vega20.

In that case:
Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

>
> Regards,
> Luben
>
> >
> > Alex
> >
> >
> >>
> >>         return 0;
> >>  Out_err:
> >>
> >> base-commit: 24b54e10043609a55194badff58bf91189c49793
> >> prerequisite-patch-id: d694f05bfcdf100c1d6957afa209e304dad98404
> >> prerequisite-patch-id: b106a5bd7e0d3a7c225a767ca4384162353cca9a
> >> prerequisite-patch-id: 77d04393fc872e4f4dd158659bd44ba40b749883
> >> --
> >> 2.35.0.3.gb23dac905b
> >>
>
> Regards,
> --
> Luben



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux