Skip to contentSkip to conversation

drm/amdgpu/sdma5.0: enable ctxempty interrupt

PATCH New Alex Deucher 1 participant 2 messages Dec 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu/sdma5.0: enable ctxempty interrupt

This is may be required for proper gfxoff operation with SDMA workloads.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +9 -0
index b208b81005bb..2699b8ea82ed 100644
@@ -810,6 +810,15 @@ static int sdma_v5_0_gfx_resume(struct amdgpu_device *adev)
  */
 static int sdma_v5_0_rlc_resume(struct amdgpu_device *adev)
 {
+	int i;
+	u32 sdma_cntl;
+
+	for (i = 0; i < adev->sdma.num_instances; i++) {
+		sdma_cntl = RREG32(sdma_v5_0_get_reg_offset(adev, i, mmSDMA0_CNTL));
+		sdma_cntl = REG_SET_FIELD(sdma_cntl, SDMA0_CNTL, CTXEMPTY_INT_ENABLE, 1);
+		WREG32(sdma_v5_0_get_reg_offset(adev, i, mmSDMA0_CNTL), sdma_cntl);
+	}
+
 	return 0;
 }
 
Signature · 6 lines
2.25.4

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

PATCH 2/2 drm/amdgpu/sdma5.2: enable ctxempty interrupt

This is may be required for proper gfxoff operation with SDMA workloads.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +9 -0
index ca8d93ebd7f9..3043569665c5 100644
@@ -760,6 +760,15 @@ static int sdma_v5_2_gfx_resume(struct amdgpu_device *adev)
  */
 static int sdma_v5_2_rlc_resume(struct amdgpu_device *adev)
 {
+	int i;
+	u32 sdma_cntl;
+
+	for (i = 0; i < adev->sdma.num_instances; i++) {
+		sdma_cntl = RREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_CNTL));
+		sdma_cntl = REG_SET_FIELD(sdma_cntl, SDMA0_CNTL, CTXEMPTY_INT_ENABLE, 1);
+		WREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_CNTL), sdma_cntl);
+	}
+
 	return 0;
 }
 
Signature · 6 lines
2.25.4

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