From: Lijo Lazar <[email protected]>

v1: The interrupts need to be enabled to move to DS clocks.
v2: Don't enable GFX IDLE interrupts if there are no GFX rings.

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index d30e60fdf596..95e97f564f2a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -2666,17 +2666,15 @@ static void gfx_v9_0_enable_gui_idle_interrupt(struct 
amdgpu_device *adev,
 {
        u32 tmp;
 
-       /* don't toggle interrupts that are only applicable
-        * to me0 pipe0 on AISCs that have me0 removed */
-       if (!adev->gfx.num_gfx_rings)
-               return;
+       /* These interrupts should be enabled to drive DS clock */
 
        tmp= RREG32_SOC15(GC, 0, mmCP_INT_CNTL_RING0);
 
        tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_BUSY_INT_ENABLE, 
enable ? 1 : 0);
        tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_EMPTY_INT_ENABLE, 
enable ? 1 : 0);
        tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CMP_BUSY_INT_ENABLE, enable 
? 1 : 0);
-       tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, GFX_IDLE_INT_ENABLE, enable 
? 1 : 0);
+       if(adev->gfx.num_gfx_rings)
+               tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, 
GFX_IDLE_INT_ENABLE, enable ? 1 : 0);
 
        WREG32_SOC15(GC, 0, mmCP_INT_CNTL_RING0, tmp);
 }
-- 
2.29.2

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

Reply via email to