drm/amdgpu: enable gfx cgcg&cgls for gfx v12_0_0
authorLikun Gao <Likun.Gao@amd.com>
Sat, 6 Apr 2024 22:08:25 +0000 (06:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 May 2024 21:11:02 +0000 (17:11 -0400)
Enable GFX CGCG and CGLS for gfx version 12.0.0.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
drivers/gpu/drm/amd/amdgpu/soc24.c

index 924ab4a3a0d558d1ed35b6c18f19720b08fd5c35..045731caa624afd66330ac83fe748419ffbc5d53 100644 (file)
@@ -3857,6 +3857,7 @@ static int gfx_v12_0_set_clockgating_state(void *handle,
                return 0;
 
        switch (adev->ip_versions[GC_HWIP][0]) {
+       case IP_VERSION(12, 0, 0):
        case IP_VERSION(12, 0, 1):
                gfx_v12_0_update_gfx_clock_gating(adev,
                                                  state == AMD_CG_STATE_GATE);
index 3eb6574b777a3f413f5d6b943dfd607d41ae3f0f..5c796e974252f6047cf0413488bcdcff3b9455e9 100644 (file)
@@ -397,7 +397,8 @@ static int soc24_common_early_init(void *handle)
 
        switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
        case IP_VERSION(12, 0, 0):
-               adev->cg_flags = 0;
+               adev->cg_flags = AMD_CG_SUPPORT_GFX_CGCG |
+                       AMD_CG_SUPPORT_GFX_CGLS;
                adev->pg_flags = AMD_PG_SUPPORT_VCN |
                        AMD_PG_SUPPORT_JPEG;
                adev->external_rev_id = adev->rev_id + 0x40;