drm/amdgpu: skip to get 3D engine clockgating state for Arcturus
authorLe Ma <le.ma@amd.com>
Tue, 11 Sep 2018 04:33:11 +0000 (12:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jul 2019 19:18:03 +0000 (14:18 -0500)
It's because Arcturus has not 3D engine.

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index 728d121df697784d99fc6b76a5607f0118c59fe5..a421a84dcafcfed27ebfda3ccb3b58a25189b387 100644 (file)
@@ -4342,14 +4342,16 @@ static void gfx_v9_0_get_clockgating_state(void *handle, u32 *flags)
        if (data & CP_MEM_SLP_CNTL__CP_MEM_LS_EN_MASK)
                *flags |= AMD_CG_SUPPORT_GFX_CP_LS | AMD_CG_SUPPORT_GFX_MGLS;
 
-       /* AMD_CG_SUPPORT_GFX_3D_CGCG */
-       data = RREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL_3D);
-       if (data & RLC_CGCG_CGLS_CTRL_3D__CGCG_EN_MASK)
-               *flags |= AMD_CG_SUPPORT_GFX_3D_CGCG;
-
-       /* AMD_CG_SUPPORT_GFX_3D_CGLS */
-       if (data & RLC_CGCG_CGLS_CTRL_3D__CGLS_EN_MASK)
-               *flags |= AMD_CG_SUPPORT_GFX_3D_CGLS;
+       if (adev->asic_type != CHIP_ARCTURUS) {
+               /* AMD_CG_SUPPORT_GFX_3D_CGCG */
+               data = RREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL_3D);
+               if (data & RLC_CGCG_CGLS_CTRL_3D__CGCG_EN_MASK)
+                       *flags |= AMD_CG_SUPPORT_GFX_3D_CGCG;
+
+               /* AMD_CG_SUPPORT_GFX_3D_CGLS */
+               if (data & RLC_CGCG_CGLS_CTRL_3D__CGLS_EN_MASK)
+                       *flags |= AMD_CG_SUPPORT_GFX_3D_CGLS;
+       }
 }
 
 static u64 gfx_v9_0_ring_get_rptr_gfx(struct amdgpu_ring *ring)