Commit bd58c48c authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/pp: Remove duplicated vega10_is_smc_ram_running calls

Avoid conflicts in reading the same register mmPCIE_INDEX2
with other clients
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 103a4b1d
...@@ -84,9 +84,6 @@ static uint32_t vega10_wait_for_response(struct pp_hwmgr *hwmgr) ...@@ -84,9 +84,6 @@ static uint32_t vega10_wait_for_response(struct pp_hwmgr *hwmgr)
{ {
uint32_t reg; uint32_t reg;
if (!vega10_is_smc_ram_running(hwmgr))
return -EINVAL;
reg = soc15_get_register_offset(MP1_HWID, 0, reg = soc15_get_register_offset(MP1_HWID, 0,
mmMP1_SMN_C2PMSG_90_BASE_IDX, mmMP1_SMN_C2PMSG_90); mmMP1_SMN_C2PMSG_90_BASE_IDX, mmMP1_SMN_C2PMSG_90);
...@@ -107,9 +104,6 @@ int vega10_send_msg_to_smc_without_waiting(struct pp_hwmgr *hwmgr, ...@@ -107,9 +104,6 @@ int vega10_send_msg_to_smc_without_waiting(struct pp_hwmgr *hwmgr,
{ {
uint32_t reg; uint32_t reg;
if (!vega10_is_smc_ram_running(hwmgr))
return -EINVAL;
reg = soc15_get_register_offset(MP1_HWID, 0, reg = soc15_get_register_offset(MP1_HWID, 0,
mmMP1_SMN_C2PMSG_66_BASE_IDX, mmMP1_SMN_C2PMSG_66); mmMP1_SMN_C2PMSG_66_BASE_IDX, mmMP1_SMN_C2PMSG_66);
cgs_write_register(hwmgr->device, reg, msg); cgs_write_register(hwmgr->device, reg, msg);
...@@ -127,9 +121,6 @@ int vega10_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg) ...@@ -127,9 +121,6 @@ int vega10_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
{ {
uint32_t reg; uint32_t reg;
if (!vega10_is_smc_ram_running(hwmgr))
return -EINVAL;
vega10_wait_for_response(hwmgr); vega10_wait_for_response(hwmgr);
reg = soc15_get_register_offset(MP1_HWID, 0, reg = soc15_get_register_offset(MP1_HWID, 0,
...@@ -156,9 +147,6 @@ int vega10_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr, ...@@ -156,9 +147,6 @@ int vega10_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr,
{ {
uint32_t reg; uint32_t reg;
if (!vega10_is_smc_ram_running(hwmgr))
return -EINVAL;
vega10_wait_for_response(hwmgr); vega10_wait_for_response(hwmgr);
reg = soc15_get_register_offset(MP1_HWID, 0, reg = soc15_get_register_offset(MP1_HWID, 0,
...@@ -581,6 +569,9 @@ static int vega10_smu_fini(struct pp_hwmgr *hwmgr) ...@@ -581,6 +569,9 @@ static int vega10_smu_fini(struct pp_hwmgr *hwmgr)
static int vega10_start_smu(struct pp_hwmgr *hwmgr) static int vega10_start_smu(struct pp_hwmgr *hwmgr)
{ {
if (!vega10_is_smc_ram_running(hwmgr))
return -EINVAL;
PP_ASSERT_WITH_CODE(!vega10_verify_smc_interface(hwmgr), PP_ASSERT_WITH_CODE(!vega10_verify_smc_interface(hwmgr),
"Failed to verify SMC interface!", "Failed to verify SMC interface!",
return -EINVAL); return -EINVAL);
......
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