diff options
author | Shirish S <shirish.s@amd.com> | 2020-09-14 10:11:23 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-09-17 17:49:04 -0400 |
commit | 0eaa80124271966c595322ec0ac4b9c54f6aa7ee (patch) | |
tree | d79ad0e86724f7d0d3c10672010d8a5c6e26bafd /drivers | |
parent | 92e005936e8a34b16d6e40be114ad263cded49bc (diff) | |
download | linux-stable-0eaa80124271966c595322ec0ac4b9c54f6aa7ee.tar.gz linux-stable-0eaa80124271966c595322ec0ac4b9c54f6aa7ee.tar.bz2 linux-stable-0eaa80124271966c595322ec0ac4b9c54f6aa7ee.zip |
amdgpu/gmc_v9: Warn if SDPIF_MMIO_CNTRL_0 is not set
With IOMMU enabled, if SDPIF_MMIO_CNTRL_0 is not set
appropriately the system hangs without any trace
during S3.
To ease debug and to ensure that the failure, if any,
was caused by a race conditions that disabled write access to
SDPIF_MMIO_CNTRL_0 register, warn the user about it.
Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index c605a1885374..5400cac02087 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -1545,8 +1545,11 @@ static void gmc_v9_0_init_golden_registers(struct amdgpu_device *adev) */ void gmc_v9_0_restore_registers(struct amdgpu_device *adev) { - if (adev->asic_type == CHIP_RAVEN) + if (adev->asic_type == CHIP_RAVEN) { WREG32_SOC15(DCE, 0, mmDCHUBBUB_SDPIF_MMIO_CNTRL_0, adev->gmc.sdpif_register); + WARN_ON(adev->gmc.sdpif_register != + RREG32_SOC15(DCE, 0, mmDCHUBBUB_SDPIF_MMIO_CNTRL_0)); + } } /** |