Commit df9331e5 authored by Le Ma's avatar Le Ma Committed by Alex Deucher

drm/amd/powerplay: avoid disabling ECC if RAS is enabled for VEGA20

Program THM_BACO_CNTL.SOC_DOMAIN_IDLE=1 will tell VBIOS to disable ECC when
BACO exit. This can save BACO exit time by PSP on none-ECC SKU. Drop the setting
for ECC supported SKU.
Signed-off-by: default avatarLe Ma <le.ma@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 956f6705
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "vega20_baco.h" #include "vega20_baco.h"
#include "vega20_smumgr.h" #include "vega20_smumgr.h"
#include "amdgpu_ras.h"
static const struct soc15_baco_cmd_entry clean_baco_tbl[] = static const struct soc15_baco_cmd_entry clean_baco_tbl[] =
{ {
...@@ -74,6 +74,7 @@ int vega20_baco_get_state(struct pp_hwmgr *hwmgr, enum BACO_STATE *state) ...@@ -74,6 +74,7 @@ int vega20_baco_get_state(struct pp_hwmgr *hwmgr, enum BACO_STATE *state)
int vega20_baco_set_state(struct pp_hwmgr *hwmgr, enum BACO_STATE state) int vega20_baco_set_state(struct pp_hwmgr *hwmgr, enum BACO_STATE state)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev); struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
enum BACO_STATE cur_state; enum BACO_STATE cur_state;
uint32_t data; uint32_t data;
...@@ -84,10 +85,11 @@ int vega20_baco_set_state(struct pp_hwmgr *hwmgr, enum BACO_STATE state) ...@@ -84,10 +85,11 @@ int vega20_baco_set_state(struct pp_hwmgr *hwmgr, enum BACO_STATE state)
return 0; return 0;
if (state == BACO_STATE_IN) { if (state == BACO_STATE_IN) {
if (!ras || !ras->supported) {
data = RREG32_SOC15(THM, 0, mmTHM_BACO_CNTL); data = RREG32_SOC15(THM, 0, mmTHM_BACO_CNTL);
data |= 0x80000000; data |= 0x80000000;
WREG32_SOC15(THM, 0, mmTHM_BACO_CNTL, data); WREG32_SOC15(THM, 0, mmTHM_BACO_CNTL, data);
}
if(smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_EnterBaco, 0)) if(smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_EnterBaco, 0))
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