Skip to contentSkip to conversation

drm/amdgpu/si_dma: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

PATCH New Alex Deucher 1 participant 9 messages Mar 18

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/9 drm/amdgpu/si_dma: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/si_dma.c +1 -1
index 3e58feb2d5e4f..7cf9dfbf11196 100644
@@ -149,7 +149,7 @@ static int si_dma_start(struct amdgpu_device *adev)
 		ring = &adev->sdma.instance[i].ring;
 
 		WREG32(mmDMA_SEM_INCOMPLETE_TIMER_CNTL + sdma_offsets[i], 0);
-		WREG32(mmDMA_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 0);
+		WREG32(mmDMA_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 10);
 
 		/* Set ring buffer size in dwords */
 		rb_bufsz = order_base_2(ring->ring_size / 4);
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 2/9 drm/amdgpu/cik_sdma: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +1 -1
index 22780c09177d8..849fc68aebd47 100644
@@ -447,7 +447,7 @@ static int cik_sdma_gfx_resume(struct amdgpu_device *adev)
 		       adev->gfx.config.gb_addr_config & 0x70);
 
 		WREG32(mmSDMA0_SEM_INCOMPLETE_TIMER_CNTL + sdma_offsets[i], 0);
-		WREG32(mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 0);
+		WREG32(mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 10);
 
 		/* Set ring buffer size in dwords */
 		rb_bufsz = order_base_2(ring->ring_size / 4);
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH 3/9 drm/amdgpu/sdma_2.4: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

In reply to Alex Deucher

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +1 -1
index 0090ace49024f..ff03cbae1c59c 100644
@@ -420,7 +420,7 @@ static int sdma_v2_4_gfx_resume(struct amdgpu_device *adev)
 		WREG32(mmSDMA0_TILING_CONFIG + sdma_offsets[i],
 		       adev->gfx.config.gb_addr_config & 0x70);
 
-		WREG32(mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 0);
+		WREG32(mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 10);
 
 		/* Set ring buffer size in dwords */
 		rb_bufsz = order_base_2(ring->ring_size / 4);
Signature · 1 line
2.53.0
author maintainer
#3 lore raw

PATCH 4/9 drm/amdgpu/sdma_3.0: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

In reply to Alex Deucher

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1 -1
index 2526d393162ac..6770f5d69215f 100644
@@ -660,7 +660,7 @@ static int sdma_v3_0_gfx_resume(struct amdgpu_device *adev)
 		WREG32(mmSDMA0_TILING_CONFIG + sdma_offsets[i],
 		       adev->gfx.config.gb_addr_config & 0x70);
 
-		WREG32(mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 0);
+		WREG32(mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL + sdma_offsets[i], 10);
 
 		/* Set ring buffer size in dwords */
 		rb_bufsz = order_base_2(ring->ring_size / 4);
Signature · 1 line
2.53.0
author maintainer
#4 lore raw

PATCH 5/9 drm/amdgpu/sdma_4.0: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

In reply to Alex Deucher

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
index 44f0f23e11484..f3aad579085ea 100644
@@ -1404,7 +1404,7 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
 	for (i = 0; i < adev->sdma.num_instances; i++) {
 		uint32_t temp;
 
-		WREG32_SDMA(i, mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL, 0);
+		WREG32_SDMA(i, mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL, 10);
 		sdma_v4_0_gfx_resume(adev, i);
 		if (adev->sdma.has_page_queue)
 			sdma_v4_0_page_resume(adev, i);
Signature · 1 line
2.53.0
author maintainer
#5 lore raw

PATCH 6/9 drm/amdgpu/sdma_4.4.2: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

In reply to Alex Deucher

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +1 -1
index 78bdfed0a7fd3..cf4ad97a93652 100644
@@ -992,7 +992,7 @@ static int sdma_v4_4_2_inst_start(struct amdgpu_device *adev,
 	for_each_inst(i, tmp_mask) {
 		uint32_t temp;
 
-		WREG32_SDMA(i, regSDMA_SEM_WAIT_FAIL_TIMER_CNTL, 0);
+		WREG32_SDMA(i, regSDMA_SEM_WAIT_FAIL_TIMER_CNTL, 10);
 		sdma_v4_4_2_gfx_resume(adev, i, restore);
 		if (adev->sdma.has_page_queue)
 			sdma_v4_4_2_page_resume(adev, i, restore);
Signature · 1 line
2.53.0
author maintainer
#6 lore raw

PATCH 7/9 drm/amdgpu/sdma_5.0: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

In reply to Alex Deucher

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -1
index 52f4e9e099cbf..a1283553f0a33 100644
@@ -698,7 +698,7 @@ static int sdma_v5_0_gfx_resume_instance(struct amdgpu_device *adev, int i, bool
 	ring = &adev->sdma.instance[i].ring;
 
 	if (!amdgpu_sriov_vf(adev))
-		WREG32(sdma_v5_0_get_reg_offset(adev, i, mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 0);
+		WREG32(sdma_v5_0_get_reg_offset(adev, i, mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 10);
 
 	/* Set ring buffer size in dwords */
 	rb_bufsz = order_base_2(ring->ring_size / 4);
Signature · 1 line
2.53.0
author maintainer
#7 lore raw

PATCH 8/9 drm/amdgpu/sdma_5.2: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

In reply to Alex Deucher

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1 -1
index b4fb90cc8f7d9..bd97690f1fd28 100644
@@ -547,7 +547,7 @@ static int sdma_v5_2_gfx_resume_instance(struct amdgpu_device *adev, int i, bool
 	ring = &adev->sdma.instance[i].ring;
 
 	if (!amdgpu_sriov_vf(adev))
-		WREG32_SOC15_IP(GC, sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 0);
+		WREG32_SOC15_IP(GC, sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 10);
 
 	/* Set ring buffer size in dwords */
 	rb_bufsz = order_base_2(ring->ring_size / 4);
Signature · 1 line
2.53.0
author maintainer
#8 lore raw

PATCH 9/9 drm/amdgpu/sdma_6.0: set SEM_WAIT_FAIL_TIMER_CNTL to a non-0 value

In reply to Alex Deucher

0 waits forever. We don't actually use the HW semaphore anymore, but if someone uses the packet, set a time out value so we eventually time out and avoid a potential queue or GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +1 -1
index 3af5bf0f18426..60f897125c4c8 100644
@@ -491,7 +491,7 @@ static int sdma_v6_0_gfx_resume_instance(struct amdgpu_device *adev, int i, bool
 
 	ring = &adev->sdma.instance[i].ring;
 	if (!amdgpu_sriov_vf(adev))
-		WREG32_SOC15_IP(GC, sdma_v6_0_get_reg_offset(adev, i, regSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 0);
+		WREG32_SOC15_IP(GC, sdma_v6_0_get_reg_offset(adev, i, regSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 10);
 
 	/* Set ring buffer size in dwords */
 	rb_bufsz = order_base_2(ring->ring_size / 4);
Signature · 1 line
2.53.0