[PATCH 3/8] drm/amdgpu: enable gfx cgcg&cgls for gfx v12_0_0

Gao, Likun Likun.Gao at amd.com
Tue May 14 08:51:11 UTC 2024


[AMD Official Use Only - AMD Internal Distribution Only]

From: Likun Gao <Likun.Gao at amd.com>

Enable GFX CGCG and CGLS for gfx version 12.0.0.

Signed-off-by: Likun Gao <Likun.Gao at amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 1 +
 drivers/gpu/drm/amd/amdgpu/soc24.c     | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index 924ab4a3a0d5..045731caa624 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -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);
diff --git a/drivers/gpu/drm/amd/amdgpu/soc24.c b/drivers/gpu/drm/amd/amdgpu/soc24.c
index 3eb6574b777a..5c796e974252 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc24.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc24.c
@@ -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;
--
2.34.1



More information about the amd-gfx mailing list