Commit 1fb4f155 authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amd/powerplay: move the smc_if_version to asic file

each asic may be has different smc if version,
so move its to asic file to implement.
Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 96e1b2c2
...@@ -401,6 +401,8 @@ struct smu_context ...@@ -401,6 +401,8 @@ struct smu_context
uint32_t workload_setting[WORKLOAD_POLICY_MAX]; uint32_t workload_setting[WORKLOAD_POLICY_MAX];
uint32_t power_profile_mode; uint32_t power_profile_mode;
uint32_t default_power_profile_mode; uint32_t default_power_profile_mode;
uint32_t smc_if_version;
}; };
struct pptable_funcs { struct pptable_funcs {
......
...@@ -234,8 +234,8 @@ static int smu_v11_0_check_fw_version(struct smu_context *smu) ...@@ -234,8 +234,8 @@ static int smu_v11_0_check_fw_version(struct smu_context *smu)
if (ret) if (ret)
goto err; goto err;
if (smu_version == SMU11_DRIVER_IF_VERSION) if (smu_version != smu->smc_if_version)
return 0; ret = -EINVAL;
err: err:
return ret; return ret;
} }
......
...@@ -2408,4 +2408,5 @@ static const struct pptable_funcs vega20_ppt_funcs = { ...@@ -2408,4 +2408,5 @@ static const struct pptable_funcs vega20_ppt_funcs = {
void vega20_set_ppt_funcs(struct smu_context *smu) void vega20_set_ppt_funcs(struct smu_context *smu)
{ {
smu->ppt_funcs = &vega20_ppt_funcs; smu->ppt_funcs = &vega20_ppt_funcs;
smu->smc_if_version = SMU11_DRIVER_IF_VERSION;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment