drm/amdgpu: fix vega10 graphic hang issue in S3 test
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix vega10 graphic hang issue in S3 test
From: Ken Wang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12 -0
@@ -1670,6 +1670,7 @@ static int gfx_v9_0_cp_gfx_resume(struct amdgpu_device *adev)u32 tmp;u32 rb_bufsz;u64 rb_addr, rptr_addr, wptr_gpu_addr; +int r;/* Set the write pointer delay */ WREG32_SOC15 (GC ,0 , mmCP_RB_WPTR_DELAY,0 );
@@ -1729,6 +1730,17 @@ static int gfx_v9_0_cp_gfx_resume(struct amdgpu_device *adev)/* start the ring */ gfx_v9_0_cp_gfx_start (adev); + + r =amdgpu_ring_alloc (ring,3 ); +if (r) { +return r; + } +amdgpu_ring_write (ring,PACKET3 (PACKET3_SET_UCONFIG_REG ,1 )); + tmp = ((2 <<28 ) | (SOC15_REG_OFFSET (GC ,0 , mmVGT_INDEX_TYPE) -PACKET3_SET_UCONFIG_REG_START )); +amdgpu_ring_write (ring, tmp); +amdgpu_ring_write (ring,0 ); +amdgpu_ring_commit (ring); + ring->ready = true;return 0 ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1502790786-14449-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org
Quoted 2 lines · Huang Rui
From: Ken Wang <[email protected]>
Please include a better description. Something like "this register has no default value and needs to be initialized by the driver."
Quoted 19 lines
Change-Id If01e32baa903c8c35991b1517c6d8bde98f5dae2Signed-off-by Ken Wang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0@@ -1670,6 +1670,7 @@ static int gfx_v9_0_cp_gfx_resume(struct amdgpu_device *adev)u32 tmp;u32 rb_bufsz;u64 rb_addr, rptr_addr, wptr_gpu_addr; +int r;/* Set the write pointer delay */ WREG32_SOC15 (GC ,0 , mmCP_RB_WPTR_DELAY,0 );
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_cp_gfx_resume(struct amdgpu_device *adev) · line 1739
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +7
-0@@ -1729,6 +1730,17 @@ static int gfx_v9_0_cp_gfx_resume(struct amdgpu_device *adev)/* start the ring */ gfx_v9_0_cp_gfx_start (adev); + + r =amdgpu_ring_alloc (ring,3 ); +if (r) { +return r; + } +amdgpu_ring_write (ring,PACKET3 (PACKET3_SET_UCONFIG_REG ,1 )); + tmp = ((2 <<28 ) | (SOC15_REG_OFFSET (GC ,0 , mmVGT_INDEX_TYPE) -PACKET3_SET_UCONFIG_REG_START ));
Why the 2 << 28? What is that for?
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_cp_gfx_resume(struct amdgpu_device *adev) · line 1743
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +4
-0+amdgpu_ring_write (ring, tmp); +amdgpu_ring_write (ring,0 ); +amdgpu_ring_commit (ring); +
Please either add this to the existing packet sequence in gfx_v9_0_cp_gfx_start() or update the register via mmio in gfx_v9_0_gpu_init().
Alex
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-1ring->ready = true;return 0 ; --2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx