[PATCH 1/4] drm/amd/powerplay: Add interface for I2C transactions to SMU.
Deucher, Alexander
Alexander.Deucher at amd.com
Mon Oct 21 13:21:49 UTC 2019
> -----Original Message-----
> From: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> Sent: Friday, October 18, 2019 4:48 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Chen, Guchun <Guchun.Chen at amd.com>; Zhou1, Tao
> <Tao.Zhou1 at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>; noreply-confluence at amd.com; Quan,
> Evan <Evan.Quan at amd.com>; Grodzovsky, Andrey
> <Andrey.Grodzovsky at amd.com>
> Subject: [PATCH 1/4] drm/amd/powerplay: Add interface for I2C transactions
> to SMU.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
Please add a patch description. With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> index bf13bf3..24244eb 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
> @@ -394,6 +394,8 @@ struct smu_context
>
> };
>
> +struct i2c_adapter;
> +
> struct pptable_funcs {
> int (*alloc_dpm_context)(struct smu_context *smu);
> int (*store_powerplay_table)(struct smu_context *smu); @@ -470,6
> +472,8 @@ struct pptable_funcs {
> uint32_t dpm_level, uint32_t *freq);
> int (*set_df_cstate)(struct smu_context *smu, enum pp_df_cstate
> state);
> int (*update_pcie_parameters)(struct smu_context *smu, uint32_t
> pcie_gen_cap, uint32_t pcie_width_cap);
> + int (*i2c_eeprom_init)(struct i2c_adapter *control);
> + void (*i2c_eeprom_fini)(struct i2c_adapter *control);
> int (*get_dpm_clock_table)(struct smu_context *smu, struct
> dpm_clocks *clock_table); };
>
> @@ -782,6 +786,11 @@ struct smu_funcs
> #define smu_override_pcie_parameters(smu) \
> ((smu)->funcs->override_pcie_parameters ? (smu)->funcs-
> >override_pcie_parameters((smu)) : 0)
>
> +#define smu_i2c_eeprom_init(smu, control) \
> + ((smu)->ppt_funcs->i2c_eeprom_init ?
> +(smu)->ppt_funcs->i2c_eeprom_init((control)) : -EINVAL) #define
> smu_i2c_eeprom_fini(smu, control) \
> + ((smu)->ppt_funcs->i2c_eeprom_fini ?
> +(smu)->ppt_funcs->i2c_eeprom_fini((control)) : -EINVAL)
> +
> #define smu_update_pcie_parameters(smu, pcie_gen_cap,
> pcie_width_cap) \
> ((smu)->ppt_funcs->update_pcie_parameters ? (smu)-
> >ppt_funcs->update_pcie_parameters((smu), (pcie_gen_cap),
> (pcie_width_cap)) : 0)
>
> --
> 2.7.4
More information about the amd-gfx
mailing list