Skip to contentSkip to conversation

drm/amdgpu: Disable sdma wptr polling memory for sriov

PATCH In review Emily Deng 2 participants 3 messages Mar 6, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Emily Deng

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Disable sdma wptr polling memory for sriov

The sdma wptr polling memory will introduce serious issue sdma hang for sriov environment on sdma v3.
And the sdma wptr polling memory is only to fix the FLR cornner case, the issue's probabity is very low.

Change-Id I2c447533aac6b16d541f58644d141228dd75dfb3
---
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1 -4
index ec885ff..44d7d08 100644
@@ -716,10 +716,7 @@ static int sdma_v3_0_gfx_resume(struct amdgpu_device *adev)
 		WREG32(mmSDMA0_GFX_RB_WPTR_POLL_ADDR_HI + sdma_offsets[i],
 		       upper_32_bits(wptr_gpu_addr));
 		wptr_poll_cntl = RREG32(mmSDMA0_GFX_RB_WPTR_POLL_CNTL + sdma_offsets[i]);
-		if (amdgpu_sriov_vf(adev))
-			wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl, SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 1);
-		else
-			wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl, SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 0);
+		wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl, SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 0);
 		WREG32(mmSDMA0_GFX_RB_WPTR_POLL_CNTL + sdma_offsets[i], wptr_poll_cntl);
 
 		/* enable DMA RB */
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): 1520302493-20759-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org

#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Emily Deng <[email protected]>
Sent: Monday, March 5, 2018 9:14 PM
To: [email protected]
Cc: Deng, Emily
Subject: [PATCH] drm/amdgpu: Disable sdma wptr polling memory for sriov

The sdma wptr polling memory will introduce serious issue sdma hang for sriov environment on sdma v3.
And the sdma wptr polling memory is only to fix the FLR cornner case, the issue's probabity is very low.

Change-Id I2c447533aac6b16d541f58644d141228dd75dfb3
---
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1 -4
index ec885ff..44d7d08 100644
@@ -716,10 +716,7 @@ static int sdma_v3_0_gfx_resume(struct amdgpu_device *adev)
                 WREG32(mmSDMA0_GFX_RB_WPTR_POLL_ADDR_HI + sdma_offsets[i],
                        upper_32_bits(wptr_gpu_addr));
                 wptr_poll_cntl = RREG32(mmSDMA0_GFX_RB_WPTR_POLL_CNTL + sdma_offsets[i]);
-               if (amdgpu_sriov_vf(adev))
-                       wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl, SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 1);
-               else
-                       wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl, SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 0);
+               wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl, SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 0);
                 WREG32(mmSDMA0_GFX_RB_WPTR_POLL_CNTL + sdma_offsets[i], wptr_poll_cntl);
 
                 /* enable DMA RB */

--
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

#3 lore raw
In reply to a message not in the archive

Hi all,
Please ignore this patch, the root cause about the sdma hang introduced by sdma wptr polling
has been found, will submit another patch.

Best Wishes,
Emily Deng

Quoted 41 lines

-----Original Message-----
From: Emily Deng [mailto:[email protected]]
Sent: Tuesday, March 06, 2018 10:15 AM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu: Disable sdma wptr polling memory for sriov

The sdma wptr polling memory will introduce serious issue sdma hang for sriov environment on sdma v3.
And the sdma wptr polling memory is only to fix the FLR cornner case, the issue's probabity is very low.

Change-Id I2c447533aac6b16d541f58644d141228dd75dfb3
---
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +0 -4
index ec885ff..44d7d08 100644
@@ -716,10 +716,7 @@ static int sdma_v3_0_gfx_resume(struct
 amdgpu_device *adev)
 		WREG32(mmSDMA0_GFX_RB_WPTR_POLL_ADDR_HI +
 sdma_offsets[i],
 		       upper_32_bits(wptr_gpu_addr));
 		wptr_poll_cntl =
 RREG32(mmSDMA0_GFX_RB_WPTR_POLL_CNTL + sdma_offsets[i]);
-		if (amdgpu_sriov_vf(adev))
-			wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl,
 SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 1);
-		else
-			wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl,

SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 0);

drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +2 -0
+		wptr_poll_cntl = REG_SET_FIELD(wptr_poll_cntl,
+SDMA0_GFX_RB_WPTR_POLL_CNTL, F32_POLL_ENABLE, 0);
 		WREG32(mmSDMA0_GFX_RB_WPTR_POLL_CNTL +

sdma_offsets[i], wptr_poll_cntl);

Quoted 3 lines

/* enable DMA RB */
--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx