mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/amd/swSMU: add callback to set AC/DC power source (v2)
This is needed to tell the SMU firmware what state is in in certain cases. DC mode does not allow overclocking for example. v2: split Evan's original patch (Alex) Bug: https://gitlab.freedesktop.org/drm/amd/issues/1043 Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
77bb2f204f
commit
2c02b38a10
@ -570,6 +570,7 @@ struct pptable_funcs {
|
|||||||
int (*override_pcie_parameters)(struct smu_context *smu);
|
int (*override_pcie_parameters)(struct smu_context *smu);
|
||||||
uint32_t (*get_pptable_power_limit)(struct smu_context *smu);
|
uint32_t (*get_pptable_power_limit)(struct smu_context *smu);
|
||||||
int (*disable_umc_cdr_12gbps_workaround)(struct smu_context *smu);
|
int (*disable_umc_cdr_12gbps_workaround)(struct smu_context *smu);
|
||||||
|
int (*set_power_source)(struct smu_context *smu, enum smu_power_src_type power_src);
|
||||||
};
|
};
|
||||||
|
|
||||||
int smu_load_microcode(struct smu_context *smu);
|
int smu_load_microcode(struct smu_context *smu);
|
||||||
|
@ -211,4 +211,7 @@ static inline int smu_send_smc_msg(struct smu_context *smu, enum smu_message_typ
|
|||||||
#define smu_disable_umc_cdr_12gbps_workaround(smu) \
|
#define smu_disable_umc_cdr_12gbps_workaround(smu) \
|
||||||
((smu)->ppt_funcs->disable_umc_cdr_12gbps_workaround ? (smu)->ppt_funcs->disable_umc_cdr_12gbps_workaround((smu)) : 0)
|
((smu)->ppt_funcs->disable_umc_cdr_12gbps_workaround ? (smu)->ppt_funcs->disable_umc_cdr_12gbps_workaround((smu)) : 0)
|
||||||
|
|
||||||
|
#define smu_set_power_source(smu, power_src) \
|
||||||
|
((smu)->ppt_funcs->set_power_source ? (smu)->ppt_funcs->set_power_source((smu), (power_src)) : 0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user