diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4278-drm-amd-powerplay-Add-interface-for-I2C-transactions.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4278-drm-amd-powerplay-Add-interface-for-I2C-transactions.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4278-drm-amd-powerplay-Add-interface-for-I2C-transactions.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4278-drm-amd-powerplay-Add-interface-for-I2C-transactions.patch new file mode 100644 index 00000000..ba17c20f --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4278-drm-amd-powerplay-Add-interface-for-I2C-transactions.patch @@ -0,0 +1,53 @@ +From e1a4c575f55bd3eccc3d1a079b47fe553008e0fd Mon Sep 17 00:00:00 2001 +From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Date: Fri, 11 Oct 2019 13:48:24 -0400 +Subject: [PATCH 4278/4736] drm/amd/powerplay: Add interface for I2C + transactions to SMU. + +Will be used by Arcturus support for RAS page retirement. + +Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +reviewed-by: Evan Quan <evan.quan@amd.com> +Reviewed-by: Guchun Chen <guchun.chen@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 402a021f237b..8120e7587585 100644 +--- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h ++++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +@@ -393,6 +393,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); +@@ -469,6 +471,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); + int (*init_microcode)(struct smu_context *smu); + int (*load_microcode)(struct smu_context *smu); +@@ -552,6 +556,11 @@ int smu_check_fw_status(struct smu_context *smu); + + int smu_set_gfx_cgpg(struct smu_context *smu, bool enabled); + ++#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) ++ + int smu_set_fan_speed_rpm(struct smu_context *smu, uint32_t speed); + + int smu_get_power_limit(struct smu_context *smu, +-- +2.17.1 + |