Commit e44510e2 authored by Aaron Liu's avatar Aaron Liu Committed by Alex Deucher
Browse files

drm/amdgpu/pm: add set_driver_table_location implementation for yellow carp



This patch adds set_driver_table_location implementation for yellow
carp.

Signed-off-by: default avatarAaron Liu <aaron.liu@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 94adc46f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,5 +48,6 @@ int smu_v13_0_1_fini_smc_tables(struct smu_context *smu);

int smu_v13_0_1_set_default_dpm_tables(struct smu_context *smu);

int smu_v13_0_1_set_driver_table_location(struct smu_context *smu);
#endif
#endif
+23 −0
Original line number Diff line number Diff line
@@ -129,3 +129,26 @@ int smu_v13_0_1_set_default_dpm_tables(struct smu_context *smu)
	return smu_cmn_update_table(smu, SMU_TABLE_DPMCLOCKS, 0, smu_table->clocks_table, false);
}

int smu_v13_0_1_set_driver_table_location(struct smu_context *smu)
{
	struct smu_table *driver_table = &smu->smu_table.driver_table;
	int ret = 0;

	if (!driver_table->mc_address)
		return 0;

	ret = smu_cmn_send_smc_msg_with_param(smu,
			SMU_MSG_SetDriverDramAddrHigh,
			upper_32_bits(driver_table->mc_address),
			NULL);

	if (ret)
		return ret;

	ret = smu_cmn_send_smc_msg_with_param(smu,
			SMU_MSG_SetDriverDramAddrLow,
			lower_32_bits(driver_table->mc_address),
			NULL);

	return ret;
}
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ static const struct pptable_funcs yellow_carp_ppt_funcs = {
	.is_dpm_running = yellow_carp_is_dpm_running,
	.get_enabled_mask = smu_cmn_get_enabled_32_bits_mask,
	.get_pp_feature_mask = smu_cmn_get_pp_feature_mask,
	.set_driver_table_location = smu_v13_0_1_set_driver_table_location,
};

void yellow_carp_set_ppt_funcs(struct smu_context *smu)