diff options
author | Le Ma <le.ma@amd.com> | 2019-11-26 17:56:58 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-12-11 15:22:07 -0500 |
commit | feffbaac36d333096ad12ee50a7235481123161f (patch) | |
tree | f014062d416bf32fd19d8e5744793e926bafd9f6 /drivers/gpu/drm/amd/amdgpu/soc15.c | |
parent | fcb1fe9c9e0031ff02aaa7532822807d27968044 (diff) | |
download | talos-op-linux-feffbaac36d333096ad12ee50a7235481123161f.tar.gz talos-op-linux-feffbaac36d333096ad12ee50a7235481123161f.zip |
drm/amdgpu: add condition to enable baco for ras recovery
Switch to baco reset method for ras recovery if the PMFW supported.
If not, keep the original reset method.
v2: revise the condition
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/soc15.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/soc15.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 863c88be055f..09dca499a880 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -557,7 +557,8 @@ static int soc15_mode2_reset(struct amdgpu_device *adev) static enum amd_reset_method soc15_asic_reset_method(struct amdgpu_device *adev) { - bool baco_reset; + bool baco_reset = false; + struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); switch (adev->asic_type) { case CHIP_RAVEN: @@ -571,18 +572,15 @@ soc15_asic_reset_method(struct amdgpu_device *adev) case CHIP_VEGA20: if (adev->psp.sos_fw_version >= 0x80067) soc15_asic_get_baco_capability(adev, &baco_reset); - else - baco_reset = false; - if (baco_reset) { - struct amdgpu_hive_info *hive = amdgpu_get_xgmi_hive(adev, 0); - struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); - if (hive || (ras && ras->supported)) - baco_reset = false; - } + /* + * 1. PMFW version > 0x284300: all cases use baco + * 2. PMFW version <= 0x284300: only sGPU w/o RAS use baco + */ + if ((ras && ras->supported) && adev->pm.fw_version <= 0x283400) + baco_reset = false; break; default: - baco_reset = false; break; } |