drm/amdgpu: fix S3 failure on specific platform
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix S3 failure on specific platform
Change-Id Ie932508ad6949f8bfc7c8db1f5874d3440d09fc6
Signed-off-by Ken Wang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +3 -0
@@ -1702,6 +1702,9 @@ struct amdgpu_device {/* record hw reset is performed */ bool has_hw_reset; +/* record last mm index being written through WREG32*/ +unsigned long last_mm_index; + };static inline struct amdgpu_device *amdgpu_ttm_adev (struct ttm_bo_device *bdev)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -0
@@ -124,6 +124,10 @@ void amdgpu_mm_wreg(struct amdgpu_device *adev, uint32_t reg, uint32_t v, {trace_amdgpu_mm_wreg (adev->pdev->device, reg, v); +if (adev->asic_type >=CHIP_VEGA10 && reg ==0 ) { + adev->last_mm_index = v; + } +if (!(acc_flags &AMDGPU_REGS_NO_KIQ ) &&amdgpu_sriov_runtime (adev)) {BUG_ON (in_interrupt ());return amdgpu_virt_kiq_wreg (adev, reg, v);
@@ -139,6 +143,10 @@ void amdgpu_mm_wreg(struct amdgpu_device *adev, uint32_t reg, uint32_t v,writel (v, ((void __iomem *)adev->rmmio) + (mmMM_DATA *4 ));spin_unlock_irqrestore (&adev->mmio_idx_lock, flags); } + +if (adev->asic_type >=CHIP_VEGA10 && reg ==1 && adev->last_mm_index ==0x5702C ) { +udelay (500 ); + } }u32 amdgpu_io_rreg (struct amdgpu_device *adev,u32 reg)
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx