Skip to contentSkip to conversation

drm/amdgpu: enable GFX IP v11.0.4 CG support

PATCH In review Tim Huang 2 participants 5 messages Dec 5, 2022

Subsystems (2)
lore
Share & tools
lore

Tim Huang

author
#0 lore raw

PATCH 1/4 drm/amdgpu: enable GFX IP v11.0.4 CG support

Add CG support for GFX/MC/HDP/ATHUB/IH/BIF.

---
 drivers/gpu/drm/amd/amdgpu/soc21.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc21.c +17 -1
index 41b94c824717..7d5fdf450d0c 100644
@@ -647,7 +647,23 @@ static int soc21_common_early_init(void *handle)
 		adev->external_rev_id = adev->rev_id + 0x20;
 		break;
 	case IP_VERSION(11, 0, 4):
-		adev->cg_flags = AMD_CG_SUPPORT_VCN_MGCG |
+		adev->cg_flags =
+			AMD_CG_SUPPORT_GFX_CGCG |
+			AMD_CG_SUPPORT_GFX_CGLS |
+			AMD_CG_SUPPORT_GFX_MGCG |
+			AMD_CG_SUPPORT_GFX_FGCG |
+			AMD_CG_SUPPORT_REPEATER_FGCG |
+			AMD_CG_SUPPORT_GFX_PERF_CLK |
+			AMD_CG_SUPPORT_MC_MGCG |
+			AMD_CG_SUPPORT_MC_LS |
+			AMD_CG_SUPPORT_HDP_MGCG |
+			AMD_CG_SUPPORT_HDP_LS |
+			AMD_CG_SUPPORT_ATHUB_MGCG |
+			AMD_CG_SUPPORT_ATHUB_LS |
+			AMD_CG_SUPPORT_IH_CG |
+			AMD_CG_SUPPORT_BIF_MGCG |
+			AMD_CG_SUPPORT_BIF_LS |
+			AMD_CG_SUPPORT_VCN_MGCG |
 			AMD_CG_SUPPORT_JPEG_MGCG;
 		adev->pg_flags = AMD_PG_SUPPORT_VCN |
 			AMD_PG_SUPPORT_GFX_PG |
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/4 drm/amdgpu: enable GFX Power Gating for GC IP v11.0.4

Enable GFX Power Gating control for GC IP v11.0.4.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +2 -0
index bf78440e1e70..506c285d5f49 100644
@@ -5058,6 +5058,7 @@ static void gfx_v11_cntl_power_gating(struct amdgpu_device *adev, bool enable)
 	if (enable && (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
 		switch (adev->ip_versions[GC_HWIP][0]) {
 		case IP_VERSION(11, 0, 1):
+		case IP_VERSION(11, 0, 4):
 			WREG32_SOC15(GC, 0, regRLC_PG_DELAY_3, RLC_PG_DELAY_3_DEFAULT_GC_11_0_1);
 			break;
 		default:
@@ -5091,6 +5092,7 @@ static int gfx_v11_0_set_powergating_state(void *handle,
 		amdgpu_gfx_off_ctrl(adev, enable);
 		break;
 	case IP_VERSION(11, 0, 1):
+	case IP_VERSION(11, 0, 4):
 		gfx_v11_cntl_pg(adev, enable);
 		amdgpu_gfx_off_ctrl(adev, enable);
 		break;
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH 3/4 drm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.4

In reply to Tim Huang

Enable GFX IP v11.0.4 CG gate/ungate control.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -0
index 506c285d5f49..a56c6e106d00 100644
@@ -5116,6 +5116,7 @@ static int gfx_v11_0_set_clockgating_state(void *handle,
 	case IP_VERSION(11, 0, 1):
 	case IP_VERSION(11, 0, 2):
 	case IP_VERSION(11, 0, 3):
+	case IP_VERSION(11, 0, 4):
 	        gfx_v11_0_update_gfx_clock_gating(adev,
 	                        state ==  AMD_CG_STATE_GATE);
 	        break;
Signature · 1 line
2.25.1
author
#3 lore raw

PATCH 4/4 drm/amdgpu: add tmz support for GC IP v11.0.4

In reply to Tim Huang

Add tmz support for GC 11.0.4.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +1 -0
index e970e3760cec..02a4c93673ce 100644
@@ -549,6 +549,7 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
 	/* YELLOW_CARP*/
 	case IP_VERSION(10, 3, 3):
 	case IP_VERSION(11, 0, 1):
+	case IP_VERSION(11, 0, 4):
 		/* Don't enable it by default yet.
 		 */
 		if (amdgpu_tmz < 1) {
Signature · 1 line
2.25.1
Reviewed-by on v1 4/4
#4 lore raw

Re: [PATCH 4/4] drm/amdgpu: add tmz support for GC IP v11.0.4

Series is:

Quoted 23 lines · Tim Huang

Add tmz support for GC 11.0.4.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +1 -1
index e970e3760cec..02a4c93673ce 100644
@@ -549,6 +549,7 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
        /* YELLOW_CARP*/
        case IP_VERSION(10, 3, 3):
        case IP_VERSION(11, 0, 1):
+       case IP_VERSION(11, 0, 4):
                /* Don't enable it by default yet.
                 */
                if (amdgpu_tmz < 1) {
--

2.25.1