diff options
author | Le Ma <le.ma@amd.com> | 2019-10-11 18:21:16 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-10-15 15:49:14 -0400 |
commit | 956f670509df28e94147e2fc1ee756c491af4d8a (patch) | |
tree | e39d083c2084c407928c55b913b46c9b48d56543 /drivers/gpu/drm/amd/amdgpu/soc15.c | |
parent | 402c60d7b076548511a95330fefdcca9523901c7 (diff) | |
download | lwn-956f670509df28e94147e2fc1ee756c491af4d8a.tar.gz lwn-956f670509df28e94147e2fc1ee756c491af4d8a.zip |
drm/amdgpu/soc15: disable doorbell interrupt as part of BACO entry sequence
Workaround to make RAS recovery work in BACO reset.
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index fc6cfbced170..5cf5f111931d 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -493,10 +493,15 @@ static int soc15_asic_baco_reset(struct amdgpu_device *adev) { void *pp_handle = adev->powerplay.pp_handle; const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; + struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); if (!pp_funcs ||!pp_funcs->get_asic_baco_state ||!pp_funcs->set_asic_baco_state) return -ENOENT; + /* avoid NBIF got stuck when do RAS recovery in BACO reset */ + if (ras && ras->supported) + adev->nbio.funcs->enable_doorbell_interrupt(adev, false); + /* enter BACO state */ if (pp_funcs->set_asic_baco_state(pp_handle, 1)) return -EIO; @@ -505,6 +510,10 @@ static int soc15_asic_baco_reset(struct amdgpu_device *adev) if (pp_funcs->set_asic_baco_state(pp_handle, 0)) return -EIO; + /* re-enable doorbell interrupt after BACO exit */ + if (ras && ras->supported) + adev->nbio.funcs->enable_doorbell_interrupt(adev, true); + dev_info(adev->dev, "GPU BACO reset\n"); adev->in_baco_reset = 1; |