Skip to contentSkip to conversation

drm/amdgpu: fix vega10 graphic hang issue in S3 test

PATCH New Ken Wang 1 participant 1 message Aug 15, 2017

Subsystems (2)
lore
Share & tools
lore

Ken Wang

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix vega10 graphic hang issue in S3 test

Change-Id If01e32baa903c8c35991b1517c6d8bde98f5dae2
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +13 -0
index 68a0d40..f47ee5c 100644
@@ -230,6 +230,7 @@ static int gfx_v9_0_ring_test_ring(struct amdgpu_ring *ring)
 		r = -EINVAL;
 	}
 	amdgpu_gfx_scratch_free(adev, scratch);
+
 	return r;
 }
 
@@ -1670,6 +1671,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 +1731,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