From: Likun Gao Date: Sat, 6 Apr 2024 22:08:25 +0000 (+0800) Subject: drm/amdgpu: enable gfx cgcg&cgls for gfx v12_0_0 X-Git-Tag: v6.11-rc1~141^2~25^2~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=73fbc3e00003fb8d84eb41f708f4b74ca9930237;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: enable gfx cgcg&cgls for gfx v12_0_0 Enable GFX CGCG and CGLS for gfx version 12.0.0. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c index 924ab4a3a0d55..045731caa624a 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 3eb6574b777a3..5c796e974252f 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;