Commit 2c02b38a authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher
Browse files

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: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 77bb2f20
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -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);
+3 −0
Original line number Original line Diff line number Diff line
@@ -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