Skip to contentSkip to conversation

drm/amdgpu: add support for GC IP version 11.7.0

PATCH In review Granthali Vinodkumar Dhandar 2 participants 10 messages Jun 30

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/5 drm/amdgpu: add support for GC IP version 11.7.0

From: Granthali Vinodkumar Dhandar <[email protected]>

Initialize GC IP 11_7_0

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |  6 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c       |  1 +
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c        | 12 +++++++-
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c        |  2 ++
 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c        |  1 +
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        |  2 ++
 drivers/gpu/drm/amd/amdgpu/soc21.c            | 28 +++++++++++++++++++
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c         |  1 +
 drivers/gpu/drm/amd/amdkfd/kfd_device.c       |  5 ++++
 9 files changed, 57 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +6 -0
index a229fe9d043b..249b2d556bb3 100644
@@ -2336,6 +2336,7 @@ static int amdgpu_discovery_set_common_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		amdgpu_device_ip_block_add(adev, &soc21_common_ip_block);
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -2397,6 +2398,7 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		amdgpu_device_ip_block_add(adev, &gmc_v11_0_ip_block);
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -2723,6 +2725,7 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		amdgpu_device_ip_block_add(adev, &gfx_v11_0_ip_block);
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -2941,6 +2944,7 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		amdgpu_device_ip_block_add(adev, &mes_v11_0_ip_block);
 		adev->enable_mes = true;
 		adev->enable_mes_kiq = true;
@@ -3349,6 +3353,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		adev->family = AMDGPU_FAMILY_GC_11_5_0;
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -3378,6 +3383,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		adev->flags |= AMD_IS_APU;
 		break;
 	default:
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +1 -0
index 2b557c9096df..46b9a477fb42 100644
@@ -977,6 +977,7 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		/* Don't enable it by default yet.
 		 */
 		if (amdgpu_tmz < 1) {
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +11 -1
index 6346f16c4e61..26c02bcb05fa 100644
@@ -133,6 +133,10 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_6_pfp.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_me.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_mec.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_rlc.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_pfp.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_me.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_mec.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_rlc.bin");
 
 static const struct amdgpu_hwip_reg_entry gc_reg_list_11_0[] = {
 	SOC15_REG_ENTRY_STR(GC, 0, regGRBM_STATUS),
@@ -1128,6 +1132,7 @@ static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		adev->gfx.config.max_hw_contexts = 8;
 		adev->gfx.config.sc_prim_fifo_size_frontend = 0x20;
 		adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
@@ -1612,6 +1617,7 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		adev->gfx.me.num_me = 1;
 		adev->gfx.me.num_pipe_per_me = 1;
 		adev->gfx.me.num_queue_per_pipe = 2;
@@ -3090,7 +3096,8 @@ static int gfx_v11_0_wait_for_rlc_autoload_complete(struct amdgpu_device *adev)
 		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 2) ||
 		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 3) ||
 		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 4) ||
-		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 6))
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 6) ||
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 0))
 			bootload_status = RREG32_SOC15(GC, 0,
 					regRLC_RLCS_BOOTLOAD_STATUS_gc_11_0_1);
 		else
@@ -5765,6 +5772,7 @@ static void gfx_v11_cntl_power_gating(struct amdgpu_device *adev, bool enable)
 		case IP_VERSION(11, 5, 3):
 	        case IP_VERSION(11, 5, 4):
 		case IP_VERSION(11, 5, 6):
+		case IP_VERSION(11, 7, 0):
 			WREG32_SOC15(GC, 0, regRLC_PG_DELAY_3, RLC_PG_DELAY_3_DEFAULT_GC_11_0_1);
 			break;
 		default:
@@ -5805,6 +5813,7 @@ static int gfx_v11_0_set_powergating_state(struct amdgpu_ip_block *ip_block,
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		if (!enable)
 			amdgpu_gfx_off_ctrl(adev, false);
 
@@ -5841,6 +5850,7 @@ static int gfx_v11_0_set_clockgating_state(struct amdgpu_ip_block *ip_block,
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 	        gfx_v11_0_update_gfx_clock_gating(adev,
 	                        state ==  AMD_CG_STATE_GATE);
 	        break;
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -0
index 8eb9847d9e1e..8a0a88551461 100644
@@ -606,6 +606,7 @@ static void gmc_v11_0_set_gfxhub_funcs(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		adev->gfxhub.funcs = &gfxhub_v11_5_0_funcs;
 		break;
 	default:
@@ -781,6 +782,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		set_bit(AMDGPU_GFXHUB(0), adev->vmhubs_mask);
 		set_bit(AMDGPU_MMHUB0(0), adev->vmhubs_mask);
 		/*
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +1 -0
index f5927c3553ce..177d702e612a 100644
@@ -43,6 +43,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_2_imu.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_3_imu.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_4_imu.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_imu.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_imu.bin");
 
 static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
 {
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -0
index 9e27d01cbfa3..3ee0c9ee262b 100644
@@ -60,6 +60,8 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_4_mes_2.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_4_mes1.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes_2.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes1.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes_2.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes1.bin");
 
 static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block);
 static int mes_v11_0_hw_fini(struct amdgpu_ip_block *ip_block);
drivers/gpu/drm/amd/amdgpu/soc21.c +28 -0
index 963659deeaff..9b9b13e327d8 100644
@@ -838,6 +838,34 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
 		adev->pg_flags = 0;
 		adev->external_rev_id = adev->rev_id + 0xd0;
 		break;
+	case IP_VERSION(11, 7, 0):
+		adev->cg_flags = AMD_CG_SUPPORT_VCN_MGCG |
+			AMD_CG_SUPPORT_JPEG_MGCG |
+			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_GFX_3D_CGCG |
+			AMD_CG_SUPPORT_GFX_3D_CGLS |
+			AMD_CG_SUPPORT_MC_MGCG |
+			AMD_CG_SUPPORT_MC_LS |
+			AMD_CG_SUPPORT_HDP_LS |
+			AMD_CG_SUPPORT_HDP_DS |
+			AMD_CG_SUPPORT_HDP_SD |
+			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;
+		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
+			AMD_PG_SUPPORT_VCN |
+			AMD_PG_SUPPORT_JPEG_DPG |
+			AMD_PG_SUPPORT_JPEG |
+			AMD_PG_SUPPORT_GFX_PG;
+		adev->external_rev_id = adev->rev_id + 0xF;
+		break;
 	default:
 		/* FIXME: not supported yet */
 		return -EINVAL;
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -0
index f28259d13818..a6a7888c7a8d 100644
@@ -1715,6 +1715,7 @@ int kfd_get_gpu_cache_info(struct kfd_node *kdev, struct kfd_gpu_cache_info **pc
 		case IP_VERSION(11, 5, 3):
 		case IP_VERSION(11, 5, 4):
 		case IP_VERSION(11, 5, 6):
+		case IP_VERSION(11, 7, 0):
 			/* Cacheline size not available in IP discovery for gc11.
 			 * kfd_fill_gpu_cache_info_from_gfx_config to hard code it
 			 */
drivers/gpu/drm/amd/amdkfd/kfd_device.c +5 -0
index 67a17458f4e9..bc05ae15c1cc 100644
@@ -169,6 +169,7 @@ static void kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd)
 	case IP_VERSION(11, 5, 3):
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
 		kfd->device_info.event_interrupt_class = &event_interrupt_class_v11;
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -451,6 +452,10 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
                         gfx_target_version = 110504;
                         f2g = &gfx_v11_kfd2kgd;
                         break;
+		case IP_VERSION(11, 7, 0):
+			gfx_target_version = 110700;
+			f2g = &gfx_v11_kfd2kgd;
+			break;
 		case IP_VERSION(12, 0, 0):
 			gfx_target_version = 120000;
 			f2g = &gfx_v12_kfd2kgd;
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 2/5 drm/amdgpu: add support for GC IP version 11.7.1

From: Granthali Vinodkumar Dhandar <[email protected]>

Initialize GC IP 11_7_1

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |  6 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c       |  1 +
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c        | 12 +++++++-
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c        |  2 ++
 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c        |  1 +
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        |  2 ++
 drivers/gpu/drm/amd/amdgpu/psp_v15_0.c        |  2 ++
 drivers/gpu/drm/amd/amdgpu/soc21.c            | 28 +++++++++++++++++++
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c         |  1 +
 drivers/gpu/drm/amd/amdkfd/kfd_device.c       |  5 ++++
 10 files changed, 59 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +6 -0
index 249b2d556bb3..d345bea4f390 100644
@@ -2337,6 +2337,7 @@ static int amdgpu_discovery_set_common_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		amdgpu_device_ip_block_add(adev, &soc21_common_ip_block);
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -2399,6 +2400,7 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		amdgpu_device_ip_block_add(adev, &gmc_v11_0_ip_block);
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -2726,6 +2728,7 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		amdgpu_device_ip_block_add(adev, &gfx_v11_0_ip_block);
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -2945,6 +2948,7 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		amdgpu_device_ip_block_add(adev, &mes_v11_0_ip_block);
 		adev->enable_mes = true;
 		adev->enable_mes_kiq = true;
@@ -3354,6 +3358,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		adev->family = AMDGPU_FAMILY_GC_11_5_0;
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -3384,6 +3389,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		adev->flags |= AMD_IS_APU;
 		break;
 	default:
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +1 -0
index 46b9a477fb42..61c528c5db5c 100644
@@ -978,6 +978,7 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		/* Don't enable it by default yet.
 		 */
 		if (amdgpu_tmz < 1) {
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +11 -1
index 26c02bcb05fa..64e58cf15c1f 100644
@@ -137,6 +137,10 @@ MODULE_FIRMWARE("amdgpu/gc_11_7_0_pfp.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_7_0_me.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_7_0_mec.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_7_0_rlc.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_pfp.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_me.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_mec.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_rlc.bin");
 
 static const struct amdgpu_hwip_reg_entry gc_reg_list_11_0[] = {
 	SOC15_REG_ENTRY_STR(GC, 0, regGRBM_STATUS),
@@ -1133,6 +1137,7 @@ static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		adev->gfx.config.max_hw_contexts = 8;
 		adev->gfx.config.sc_prim_fifo_size_frontend = 0x20;
 		adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
@@ -1618,6 +1623,7 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		adev->gfx.me.num_me = 1;
 		adev->gfx.me.num_pipe_per_me = 1;
 		adev->gfx.me.num_queue_per_pipe = 2;
@@ -3097,7 +3103,8 @@ static int gfx_v11_0_wait_for_rlc_autoload_complete(struct amdgpu_device *adev)
 		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 3) ||
 		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 4) ||
 		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 6) ||
-		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 0))
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 0) ||
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 1))
 			bootload_status = RREG32_SOC15(GC, 0,
 					regRLC_RLCS_BOOTLOAD_STATUS_gc_11_0_1);
 		else
@@ -5773,6 +5780,7 @@ static void gfx_v11_cntl_power_gating(struct amdgpu_device *adev, bool enable)
 	        case IP_VERSION(11, 5, 4):
 		case IP_VERSION(11, 5, 6):
 		case IP_VERSION(11, 7, 0):
+		case IP_VERSION(11, 7, 1):
 			WREG32_SOC15(GC, 0, regRLC_PG_DELAY_3, RLC_PG_DELAY_3_DEFAULT_GC_11_0_1);
 			break;
 		default:
@@ -5814,6 +5822,7 @@ static int gfx_v11_0_set_powergating_state(struct amdgpu_ip_block *ip_block,
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		if (!enable)
 			amdgpu_gfx_off_ctrl(adev, false);
 
@@ -5851,6 +5860,7 @@ static int gfx_v11_0_set_clockgating_state(struct amdgpu_ip_block *ip_block,
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 	        gfx_v11_0_update_gfx_clock_gating(adev,
 	                        state ==  AMD_CG_STATE_GATE);
 	        break;
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -0
index 8a0a88551461..c40d9c467204 100644
@@ -607,6 +607,7 @@ static void gmc_v11_0_set_gfxhub_funcs(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		adev->gfxhub.funcs = &gfxhub_v11_5_0_funcs;
 		break;
 	default:
@@ -783,6 +784,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		set_bit(AMDGPU_GFXHUB(0), adev->vmhubs_mask);
 		set_bit(AMDGPU_MMHUB0(0), adev->vmhubs_mask);
 		/*
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +1 -0
index 177d702e612a..05b164f38c97 100644
@@ -44,6 +44,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_3_imu.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_4_imu.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_imu.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_7_0_imu.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_imu.bin");
 
 static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
 {
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -0
index 3ee0c9ee262b..73c1525ad289 100644
@@ -62,6 +62,8 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes_2.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes1.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes_2.bin");
 MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes1.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_mes_2.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_mes1.bin");
 
 static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block);
 static int mes_v11_0_hw_fini(struct amdgpu_ip_block *ip_block);
drivers/gpu/drm/amd/amdgpu/psp_v15_0.c +2 -0
index 2a8582e87f2b..2a4d91368ac6 100644
@@ -33,6 +33,8 @@
 
 MODULE_FIRMWARE("amdgpu/psp_15_0_0_toc.bin");
 MODULE_FIRMWARE("amdgpu/psp_15_0_0_ta.bin");
+MODULE_FIRMWARE("amdgpu/psp_15_0_9_toc.bin");
+MODULE_FIRMWARE("amdgpu/psp_15_0_9_ta.bin");
 
 static int psp_v15_0_0_init_microcode(struct psp_context *psp)
 {
drivers/gpu/drm/amd/amdgpu/soc21.c +28 -0
index 9b9b13e327d8..1677e88a4e36 100644
@@ -866,6 +866,34 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
 			AMD_PG_SUPPORT_GFX_PG;
 		adev->external_rev_id = adev->rev_id + 0xF;
 		break;
+	case IP_VERSION(11, 7, 1):
+		adev->cg_flags = AMD_CG_SUPPORT_VCN_MGCG |
+			AMD_CG_SUPPORT_JPEG_MGCG |
+			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_GFX_3D_CGCG |
+			AMD_CG_SUPPORT_GFX_3D_CGLS |
+			AMD_CG_SUPPORT_MC_MGCG |
+			AMD_CG_SUPPORT_MC_LS |
+			AMD_CG_SUPPORT_HDP_LS |
+			AMD_CG_SUPPORT_HDP_DS |
+			AMD_CG_SUPPORT_HDP_SD |
+			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;
+		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
+			AMD_PG_SUPPORT_VCN |
+			AMD_PG_SUPPORT_JPEG_DPG |
+			AMD_PG_SUPPORT_JPEG |
+			AMD_PG_SUPPORT_GFX_PG;
+		adev->external_rev_id = adev->rev_id + 0x40;
+		break;
 	default:
 		/* FIXME: not supported yet */
 		return -EINVAL;
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -0
index a6a7888c7a8d..2a239f45fc24 100644
@@ -1716,6 +1716,7 @@ int kfd_get_gpu_cache_info(struct kfd_node *kdev, struct kfd_gpu_cache_info **pc
 		case IP_VERSION(11, 5, 4):
 		case IP_VERSION(11, 5, 6):
 		case IP_VERSION(11, 7, 0):
+		case IP_VERSION(11, 7, 1):
 			/* Cacheline size not available in IP discovery for gc11.
 			 * kfd_fill_gpu_cache_info_from_gfx_config to hard code it
 			 */
drivers/gpu/drm/amd/amdkfd/kfd_device.c +5 -0
index bc05ae15c1cc..1c3e8b61d4f8 100644
@@ -170,6 +170,7 @@ static void kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd)
 	case IP_VERSION(11, 5, 4):
 	case IP_VERSION(11, 5, 6):
 	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
 		kfd->device_info.event_interrupt_class = &event_interrupt_class_v11;
 		break;
 	case IP_VERSION(12, 0, 0):
@@ -456,6 +457,10 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
 			gfx_target_version = 110700;
 			f2g = &gfx_v11_kfd2kgd;
 			break;
+		case IP_VERSION(11, 7, 1):
+			gfx_target_version = 110701;
+			f2g = &gfx_v11_kfd2kgd;
+			break;
 		case IP_VERSION(12, 0, 0):
 			gfx_target_version = 120000;
 			f2g = &gfx_v12_kfd2kgd;
Signature · 1 line
2.43.0
Reviewed-by on v2 2/5
#2 lore raw

Re: [PATCH v2 2/5] drm/amdgpu: add support for GC IP version 11.7.1

Quoted 5 lines · Granthali Vinodkumar Dhandar

From: Granthali Vinodkumar Dhandar <[email protected]>

Initialize GC IP 11_7_1

Quoted 274 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |  6 ++++
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c       |  1 +
  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c        | 12 +++++++-
  drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c        |  2 ++
  drivers/gpu/drm/amd/amdgpu/imu_v11_0.c        |  1 +
  drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        |  2 ++
  drivers/gpu/drm/amd/amdgpu/psp_v15_0.c        |  2 ++
  drivers/gpu/drm/amd/amdgpu/soc21.c            | 28 +++++++++++++++++++
  drivers/gpu/drm/amd/amdkfd/kfd_crat.c         |  1 +
  drivers/gpu/drm/amd/amdkfd/kfd_device.c       |  5 ++++
  10 files changed, 59 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +6 -0
index 249b2d556bb3..d345bea4f390 100644
@@ -2337,6 +2337,7 @@ static int amdgpu_discovery_set_common_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		amdgpu_device_ip_block_add(adev, &soc21_common_ip_block);
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -2399,6 +2400,7 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		amdgpu_device_ip_block_add(adev, &gmc_v11_0_ip_block);
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -2726,6 +2728,7 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		amdgpu_device_ip_block_add(adev, &gfx_v11_0_ip_block);
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -2945,6 +2948,7 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		amdgpu_device_ip_block_add(adev, &mes_v11_0_ip_block);
  		adev->enable_mes = true;
  		adev->enable_mes_kiq = true;
@@ -3354,6 +3358,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		adev->family = AMDGPU_FAMILY_GC_11_5_0;
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -3384,6 +3389,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		adev->flags |= AMD_IS_APU;
  		break;
  	default:
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +1 -0
index 46b9a477fb42..61c528c5db5c 100644
@@ -978,6 +978,7 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		/* Don't enable it by default yet.
  		 */
  		if (amdgpu_tmz < 1) {
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +11 -1
index 26c02bcb05fa..64e58cf15c1f 100644
@@ -137,6 +137,10 @@ MODULE_FIRMWARE("amdgpu/gc_11_7_0_pfp.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_7_0_me.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_7_0_mec.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_7_0_rlc.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_pfp.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_me.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_mec.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_rlc.bin");
 
  static const struct amdgpu_hwip_reg_entry gc_reg_list_11_0[] = {
  	SOC15_REG_ENTRY_STR(GC, 0, regGRBM_STATUS),
@@ -1133,6 +1137,7 @@ static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		adev->gfx.config.max_hw_contexts = 8;
  		adev->gfx.config.sc_prim_fifo_size_frontend = 0x20;
  		adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
@@ -1618,6 +1623,7 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		adev->gfx.me.num_me = 1;
  		adev->gfx.me.num_pipe_per_me = 1;
  		adev->gfx.me.num_queue_per_pipe = 2;
@@ -3097,7 +3103,8 @@ static int gfx_v11_0_wait_for_rlc_autoload_complete(struct amdgpu_device *adev)
  		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 3) ||
  		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 4) ||
  		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 6) ||
-		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 0))
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 0) ||
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 1))
  			bootload_status = RREG32_SOC15(GC, 0,
  					regRLC_RLCS_BOOTLOAD_STATUS_gc_11_0_1);
  		else
@@ -5773,6 +5780,7 @@ static void gfx_v11_cntl_power_gating(struct amdgpu_device *adev, bool enable)
  	        case IP_VERSION(11, 5, 4):
  		case IP_VERSION(11, 5, 6):
  		case IP_VERSION(11, 7, 0):
+		case IP_VERSION(11, 7, 1):
  			WREG32_SOC15(GC, 0, regRLC_PG_DELAY_3, RLC_PG_DELAY_3_DEFAULT_GC_11_0_1);
  			break;
  		default:
@@ -5814,6 +5822,7 @@ static int gfx_v11_0_set_powergating_state(struct amdgpu_ip_block *ip_block,
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		if (!enable)
  			amdgpu_gfx_off_ctrl(adev, false);
 
@@ -5851,6 +5860,7 @@ static int gfx_v11_0_set_clockgating_state(struct amdgpu_ip_block *ip_block,
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  	        gfx_v11_0_update_gfx_clock_gating(adev,
  	                        state ==  AMD_CG_STATE_GATE);
  	        break;
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -0
index 8a0a88551461..c40d9c467204 100644
@@ -607,6 +607,7 @@ static void gmc_v11_0_set_gfxhub_funcs(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		adev->gfxhub.funcs = &gfxhub_v11_5_0_funcs;
  		break;
  	default:
@@ -783,6 +784,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		set_bit(AMDGPU_GFXHUB(0), adev->vmhubs_mask);
  		set_bit(AMDGPU_MMHUB0(0), adev->vmhubs_mask);
  		/*
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +1 -0
index 177d702e612a..05b164f38c97 100644
@@ -44,6 +44,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_3_imu.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_4_imu.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_imu.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_7_0_imu.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_imu.bin");
 
  static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
  {
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -0
index 3ee0c9ee262b..73c1525ad289 100644
@@ -62,6 +62,8 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes_2.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes1.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes_2.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes1.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_mes_2.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_1_mes1.bin");
 
  static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block);
  static int mes_v11_0_hw_fini(struct amdgpu_ip_block *ip_block);
drivers/gpu/drm/amd/amdgpu/psp_v15_0.c +2 -0
index 2a8582e87f2b..2a4d91368ac6 100644
@@ -33,6 +33,8 @@
 
  MODULE_FIRMWARE("amdgpu/psp_15_0_0_toc.bin");
  MODULE_FIRMWARE("amdgpu/psp_15_0_0_ta.bin");
+MODULE_FIRMWARE("amdgpu/psp_15_0_9_toc.bin");
+MODULE_FIRMWARE("amdgpu/psp_15_0_9_ta.bin");
 
  static int psp_v15_0_0_init_microcode(struct psp_context *psp)
  {
drivers/gpu/drm/amd/amdgpu/soc21.c +28 -0
index 9b9b13e327d8..1677e88a4e36 100644
@@ -866,6 +866,34 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
  			AMD_PG_SUPPORT_GFX_PG;
  		adev->external_rev_id = adev->rev_id + 0xF;
  		break;
+	case IP_VERSION(11, 7, 1):
+		adev->cg_flags = AMD_CG_SUPPORT_VCN_MGCG |
+			AMD_CG_SUPPORT_JPEG_MGCG |
+			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_GFX_3D_CGCG |
+			AMD_CG_SUPPORT_GFX_3D_CGLS |
+			AMD_CG_SUPPORT_MC_MGCG |
+			AMD_CG_SUPPORT_MC_LS |
+			AMD_CG_SUPPORT_HDP_LS |
+			AMD_CG_SUPPORT_HDP_DS |
+			AMD_CG_SUPPORT_HDP_SD |
+			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;
+		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
+			AMD_PG_SUPPORT_VCN |
+			AMD_PG_SUPPORT_JPEG_DPG |
+			AMD_PG_SUPPORT_JPEG |
+			AMD_PG_SUPPORT_GFX_PG;
+		adev->external_rev_id = adev->rev_id + 0x40;
+		break;
  	default:
  		/* FIXME: not supported yet */
  		return -EINVAL;
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -0
index a6a7888c7a8d..2a239f45fc24 100644
@@ -1716,6 +1716,7 @@ int kfd_get_gpu_cache_info(struct kfd_node *kdev, struct kfd_gpu_cache_info **pc
  		case IP_VERSION(11, 5, 4):
  		case IP_VERSION(11, 5, 6):
  		case IP_VERSION(11, 7, 0):
+		case IP_VERSION(11, 7, 1):
  			/* Cacheline size not available in IP discovery for gc11.
  			 * kfd_fill_gpu_cache_info_from_gfx_config to hard code it
  			 */
drivers/gpu/drm/amd/amdkfd/kfd_device.c +5 -0
index bc05ae15c1cc..1c3e8b61d4f8 100644
@@ -170,6 +170,7 @@ static void kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd)
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
  	case IP_VERSION(11, 7, 0):
+	case IP_VERSION(11, 7, 1):
  		kfd->device_info.event_interrupt_class = &event_interrupt_class_v11;
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -456,6 +457,10 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
  			gfx_target_version = 110700;
  			f2g = &gfx_v11_kfd2kgd;
  			break;
+		case IP_VERSION(11, 7, 1):
+			gfx_target_version = 110701;
+			f2g = &gfx_v11_kfd2kgd;
+			break;
  		case IP_VERSION(12, 0, 0):
  			gfx_target_version = 120000;
  			f2g = &gfx_v12_kfd2kgd;
#3 lore raw

PATCH v2 3/5 drm/amdgpu: add support for PSP version 15.0.9

In reply to Granthali Vinodkumar Dhandar

From: Kanala Ramalingeswara Reddy <[email protected]>

Initialize PSP Version 15_0_9

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c       | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index d345bea4f390..16606155a92e 100644
@@ -2521,6 +2521,7 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)
 		amdgpu_device_ip_block_add(adev, &psp_v14_0_ip_block);
 		break;
 	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
 		amdgpu_device_ip_block_add(adev, &psp_v15_0_ip_block);
 		break;
 	case IP_VERSION(15, 0, 8):
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -1
index 4b91a22701dc..a36cbfc1f6f1 100644
@@ -275,6 +275,7 @@ static int psp_early_init(struct amdgpu_ip_block *ip_block)
 		psp->boot_time_tmr = false;
 		break;
 	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
 		psp_v15_0_0_set_psp_funcs(psp);
 		psp->boot_time_tmr = false;
 		break;
@@ -3475,7 +3476,9 @@ static int psp_load_non_psp_fw(struct psp_context *psp)
 		     amdgpu_ip_version(adev, MP0_HWIP, 0) ==
 			     IP_VERSION(15, 0, 0) ||
 		     amdgpu_ip_version(adev, MP0_HWIP, 0) ==
-			     IP_VERSION(15, 0, 8)) &&
+			     IP_VERSION(15, 0, 8) ||
+		     amdgpu_ip_version(adev, MP0_HWIP, 0) ==
+			     IP_VERSION(15, 0, 9)) &&
 		    (ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1 ||
 		     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2 ||
 		     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3))
Signature · 1 line
2.43.0
Reviewed-by on v2 3/5
#4 lore raw

Re: [PATCH v2 3/5] drm/amdgpu: add support for PSP version 15.0.9

Quoted 6 lines · Granthali Vinodkumar Dhandar

From: Kanala Ramalingeswara Reddy <[email protected]>

Initialize PSP Version 15_0_9

Quoted 40 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c       | 5 ++++-
  2 files changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index d345bea4f390..16606155a92e 100644
@@ -2521,6 +2521,7 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)
  		amdgpu_device_ip_block_add(adev, &psp_v14_0_ip_block);
  		break;
  	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
  		amdgpu_device_ip_block_add(adev, &psp_v15_0_ip_block);
  		break;
  	case IP_VERSION(15, 0, 8):
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -1
index 4b91a22701dc..a36cbfc1f6f1 100644
@@ -275,6 +275,7 @@ static int psp_early_init(struct amdgpu_ip_block *ip_block)
  		psp->boot_time_tmr = false;
  		break;
  	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
  		psp_v15_0_0_set_psp_funcs(psp);
  		psp->boot_time_tmr = false;
  		break;
@@ -3475,7 +3476,9 @@ static int psp_load_non_psp_fw(struct psp_context *psp)
  		     amdgpu_ip_version(adev, MP0_HWIP, 0) ==
  			     IP_VERSION(15, 0, 0) ||
  		     amdgpu_ip_version(adev, MP0_HWIP, 0) ==
-			     IP_VERSION(15, 0, 8)) &&
+			     IP_VERSION(15, 0, 8) ||
+		     amdgpu_ip_version(adev, MP0_HWIP, 0) ==
+			     IP_VERSION(15, 0, 9)) &&
  		    (ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1 ||
  		     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2 ||
  		     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3))
#5 lore raw

PATCH v2 4/5 drm/amdgpu: add support for SMU version 15.0.9

In reply to Granthali Vinodkumar Dhandar

From: Kanala Ramalingeswara Reddy <[email protected]>

Initialize SMU Version 15_0_9

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c        | 1 +
 drivers/gpu/drm/amd/amdgpu/soc21.c                   | 1 +
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c            | 1 +
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c       | 1 +
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c | 3 ++-
 5 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index 16606155a92e..b309c9fabeaf 100644
@@ -2593,6 +2593,7 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(15, 0, 0):
 	case IP_VERSION(15, 0, 5):
 	case IP_VERSION(15, 0, 8):
+	case IP_VERSION(15, 0, 9):
 		amdgpu_device_ip_block_add(adev, &smu_v15_0_ip_block);
 		break;
 	default:
drivers/gpu/drm/amd/amdgpu/soc21.c +1 -0
index 1677e88a4e36..a2733d1637f0 100644
@@ -406,6 +406,7 @@ soc21_asic_reset_method(struct amdgpu_device *adev)
 	case IP_VERSION(14, 0, 4):
 	case IP_VERSION(14, 0, 5):
 	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
 		return AMD_RESET_METHOD_MODE2;
 	default:
 		if (amdgpu_dpm_is_baco_supported(adev))
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -0
index ae44437af86b..c0699741e711 100644
@@ -802,6 +802,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
 		break;
 	case IP_VERSION(15, 0, 0):
 	case IP_VERSION(15, 0, 5):
+	case IP_VERSION(15, 0, 9):
 		smu_v15_0_0_set_ppt_funcs(smu);
 		break;
 	case IP_VERSION(15, 0, 8):
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c +1 -0
index 4a61e900131f..ec7c72983224 100644
@@ -665,6 +665,7 @@ int smu_v15_0_gfx_off_control(struct smu_context *smu, bool enable)
 
 	switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
 	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
 		if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
 			return 0;
 		if (enable)
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c +2 -1
index 3cf47ecdffda..4033012fa39c 100644
@@ -1177,7 +1177,8 @@ static int smu_v15_0_common_get_dpm_profile_freq(struct smu_context *smu,
 			smu_v15_0_common_get_dpm_ultimate_freq(smu, SMU_SOCCLK, NULL, &clk_limit);
 		break;
 	case SMU_FCLK:
-		if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 0))
+		if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 0) ||
+			amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 9))
 			smu_v15_0_common_get_dpm_ultimate_freq(smu, SMU_FCLK, NULL, &clk_limit);
 		else
 			clk_limit = SMU_15_0_UMD_PSTATE_FCLK;
Signature · 1 line
2.43.0
Reviewed-by on v2 4/5
#6 lore raw

Re: [PATCH v2 4/5] drm/amdgpu: add support for SMU version 15.0.9

Quoted 6 lines · Granthali Vinodkumar Dhandar

From: Kanala Ramalingeswara Reddy <[email protected]>

Initialize SMU Version 15_0_9

Quoted 70 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c        | 1 +
  drivers/gpu/drm/amd/amdgpu/soc21.c                   | 1 +
  drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c            | 1 +
  drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c       | 1 +
  drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c | 3 ++-
  5 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index 16606155a92e..b309c9fabeaf 100644
@@ -2593,6 +2593,7 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(15, 0, 0):
  	case IP_VERSION(15, 0, 5):
  	case IP_VERSION(15, 0, 8):
+	case IP_VERSION(15, 0, 9):
  		amdgpu_device_ip_block_add(adev, &smu_v15_0_ip_block);
  		break;
  	default:
drivers/gpu/drm/amd/amdgpu/soc21.c +1 -0
index 1677e88a4e36..a2733d1637f0 100644
@@ -406,6 +406,7 @@ soc21_asic_reset_method(struct amdgpu_device *adev)
  	case IP_VERSION(14, 0, 4):
  	case IP_VERSION(14, 0, 5):
  	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
  		return AMD_RESET_METHOD_MODE2;
  	default:
  		if (amdgpu_dpm_is_baco_supported(adev))
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -0
index ae44437af86b..c0699741e711 100644
@@ -802,6 +802,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
  		break;
  	case IP_VERSION(15, 0, 0):
  	case IP_VERSION(15, 0, 5):
+	case IP_VERSION(15, 0, 9):
  		smu_v15_0_0_set_ppt_funcs(smu);
  		break;
  	case IP_VERSION(15, 0, 8):
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c +1 -0
index 4a61e900131f..ec7c72983224 100644
@@ -665,6 +665,7 @@ int smu_v15_0_gfx_off_control(struct smu_context *smu, bool enable)
 
  	switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
  	case IP_VERSION(15, 0, 0):
+	case IP_VERSION(15, 0, 9):
  		if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
  			return 0;
  		if (enable)
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c +2 -1
index 3cf47ecdffda..4033012fa39c 100644
@@ -1177,7 +1177,8 @@ static int smu_v15_0_common_get_dpm_profile_freq(struct smu_context *smu,
  			smu_v15_0_common_get_dpm_ultimate_freq(smu, SMU_SOCCLK, NULL, &clk_limit);
  		break;
  	case SMU_FCLK:
-		if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 0))
+		if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 0) ||
+			amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 9))
  			smu_v15_0_common_get_dpm_ultimate_freq(smu, SMU_FCLK, NULL, &clk_limit);
  		else
  			clk_limit = SMU_15_0_UMD_PSTATE_FCLK;
#7 lore raw

PATCH v2 5/5 drm/amdgpu: Disable JDPG on VCN5_3

In reply to Granthali Vinodkumar Dhandar

From: Suresh Guttula <[email protected]>

JDPG does not support on VCN5

This patch will disable JDPG, because DPG is not correctly copying the JRBC Read/Write Pointers (R/WPTR) from the PG (Power Gating) block to JRBC.

---
 drivers/gpu/drm/amd/amdgpu/soc21.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc21.c +0 -2
index a2733d1637f0..e0b80abcd075 100644
@@ -862,7 +862,6 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
 			AMD_CG_SUPPORT_BIF_LS;
 		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
 			AMD_PG_SUPPORT_VCN |
-			AMD_PG_SUPPORT_JPEG_DPG |
 			AMD_PG_SUPPORT_JPEG |
 			AMD_PG_SUPPORT_GFX_PG;
 		adev->external_rev_id = adev->rev_id + 0xF;
@@ -890,7 +889,6 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
 			AMD_CG_SUPPORT_BIF_LS;
 		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
 			AMD_PG_SUPPORT_VCN |
-			AMD_PG_SUPPORT_JPEG_DPG |
 			AMD_PG_SUPPORT_JPEG |
 			AMD_PG_SUPPORT_GFX_PG;
 		adev->external_rev_id = adev->rev_id + 0x40;
Signature · 1 line
2.43.0
Reviewed-by on v2 5/5
#8 lore raw

Re: [PATCH v2 5/5] drm/amdgpu: Disable JDPG on VCN5_3

Quoted 9 lines · Granthali Vinodkumar Dhandar

From: Suresh Guttula <[email protected]>

JDPG does not support on VCN5

This patch will disable JDPG, because DPG is not correctly copying the JRBC Read/Write Pointers (R/WPTR) from the PG (Power Gating) block to JRBC.

Quoted 24 lines
---
  drivers/gpu/drm/amd/amdgpu/soc21.c | 2 --
  1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc21.c +0 -2
index a2733d1637f0..e0b80abcd075 100644
@@ -862,7 +862,6 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
  			AMD_CG_SUPPORT_BIF_LS;
  		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
  			AMD_PG_SUPPORT_VCN |
-			AMD_PG_SUPPORT_JPEG_DPG |
  			AMD_PG_SUPPORT_JPEG |
  			AMD_PG_SUPPORT_GFX_PG;
  		adev->external_rev_id = adev->rev_id + 0xF;
@@ -890,7 +889,6 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
  			AMD_CG_SUPPORT_BIF_LS;
  		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
  			AMD_PG_SUPPORT_VCN |
-			AMD_PG_SUPPORT_JPEG_DPG |
  			AMD_PG_SUPPORT_JPEG |
  			AMD_PG_SUPPORT_GFX_PG;
  		adev->external_rev_id = adev->rev_id + 0x40;
Reviewed-by on v2 1/5
#9 lore raw
In reply to Granthali Vinodkumar Dhandar
Quoted 5 lines · Granthali Vinodkumar Dhandar

From: Granthali Vinodkumar Dhandar <[email protected]>

Initialize GC IP 11_7_0

Quoted 260 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |  6 ++++
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c       |  1 +
  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c        | 12 +++++++-
  drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c        |  2 ++
  drivers/gpu/drm/amd/amdgpu/imu_v11_0.c        |  1 +
  drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        |  2 ++
  drivers/gpu/drm/amd/amdgpu/soc21.c            | 28 +++++++++++++++++++
  drivers/gpu/drm/amd/amdkfd/kfd_crat.c         |  1 +
  drivers/gpu/drm/amd/amdkfd/kfd_device.c       |  5 ++++
  9 files changed, 57 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +6 -0
index a229fe9d043b..249b2d556bb3 100644
@@ -2336,6 +2336,7 @@ static int amdgpu_discovery_set_common_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		amdgpu_device_ip_block_add(adev, &soc21_common_ip_block);
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -2397,6 +2398,7 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		amdgpu_device_ip_block_add(adev, &gmc_v11_0_ip_block);
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -2723,6 +2725,7 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		amdgpu_device_ip_block_add(adev, &gfx_v11_0_ip_block);
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -2941,6 +2944,7 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		amdgpu_device_ip_block_add(adev, &mes_v11_0_ip_block);
  		adev->enable_mes = true;
  		adev->enable_mes_kiq = true;
@@ -3349,6 +3353,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		adev->family = AMDGPU_FAMILY_GC_11_5_0;
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -3378,6 +3383,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		adev->flags |= AMD_IS_APU;
  		break;
  	default:
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +1 -0
index 2b557c9096df..46b9a477fb42 100644
@@ -977,6 +977,7 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		/* Don't enable it by default yet.
  		 */
  		if (amdgpu_tmz < 1) {
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +11 -1
index 6346f16c4e61..26c02bcb05fa 100644
@@ -133,6 +133,10 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_6_pfp.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_me.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_mec.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_rlc.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_pfp.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_me.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_mec.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_rlc.bin");
 
  static const struct amdgpu_hwip_reg_entry gc_reg_list_11_0[] = {
  	SOC15_REG_ENTRY_STR(GC, 0, regGRBM_STATUS),
@@ -1128,6 +1132,7 @@ static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		adev->gfx.config.max_hw_contexts = 8;
  		adev->gfx.config.sc_prim_fifo_size_frontend = 0x20;
  		adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
@@ -1612,6 +1617,7 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		adev->gfx.me.num_me = 1;
  		adev->gfx.me.num_pipe_per_me = 1;
  		adev->gfx.me.num_queue_per_pipe = 2;
@@ -3090,7 +3096,8 @@ static int gfx_v11_0_wait_for_rlc_autoload_complete(struct amdgpu_device *adev)
  		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 2) ||
  		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 3) ||
  		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 4) ||
-		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 6))
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 6) ||
+		    amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 7, 0))
  			bootload_status = RREG32_SOC15(GC, 0,
  					regRLC_RLCS_BOOTLOAD_STATUS_gc_11_0_1);
  		else
@@ -5765,6 +5772,7 @@ static void gfx_v11_cntl_power_gating(struct amdgpu_device *adev, bool enable)
  		case IP_VERSION(11, 5, 3):
  	        case IP_VERSION(11, 5, 4):
  		case IP_VERSION(11, 5, 6):
+		case IP_VERSION(11, 7, 0):
  			WREG32_SOC15(GC, 0, regRLC_PG_DELAY_3, RLC_PG_DELAY_3_DEFAULT_GC_11_0_1);
  			break;
  		default:
@@ -5805,6 +5813,7 @@ static int gfx_v11_0_set_powergating_state(struct amdgpu_ip_block *ip_block,
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		if (!enable)
  			amdgpu_gfx_off_ctrl(adev, false);
 
@@ -5841,6 +5850,7 @@ static int gfx_v11_0_set_clockgating_state(struct amdgpu_ip_block *ip_block,
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  	        gfx_v11_0_update_gfx_clock_gating(adev,
  	                        state ==  AMD_CG_STATE_GATE);
  	        break;
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -0
index 8eb9847d9e1e..8a0a88551461 100644
@@ -606,6 +606,7 @@ static void gmc_v11_0_set_gfxhub_funcs(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		adev->gfxhub.funcs = &gfxhub_v11_5_0_funcs;
  		break;
  	default:
@@ -781,6 +782,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		set_bit(AMDGPU_GFXHUB(0), adev->vmhubs_mask);
  		set_bit(AMDGPU_MMHUB0(0), adev->vmhubs_mask);
  		/*
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +1 -0
index f5927c3553ce..177d702e612a 100644
@@ -43,6 +43,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_2_imu.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_3_imu.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_4_imu.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_imu.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_imu.bin");
 
  static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
  {
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -0
index 9e27d01cbfa3..3ee0c9ee262b 100644
@@ -60,6 +60,8 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_4_mes_2.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_4_mes1.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes_2.bin");
  MODULE_FIRMWARE("amdgpu/gc_11_5_6_mes1.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes_2.bin");
+MODULE_FIRMWARE("amdgpu/gc_11_7_0_mes1.bin");
 
  static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block);
  static int mes_v11_0_hw_fini(struct amdgpu_ip_block *ip_block);
drivers/gpu/drm/amd/amdgpu/soc21.c +28 -0
index 963659deeaff..9b9b13e327d8 100644
@@ -838,6 +838,34 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
  		adev->pg_flags = 0;
  		adev->external_rev_id = adev->rev_id + 0xd0;
  		break;
+	case IP_VERSION(11, 7, 0):
+		adev->cg_flags = AMD_CG_SUPPORT_VCN_MGCG |
+			AMD_CG_SUPPORT_JPEG_MGCG |
+			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_GFX_3D_CGCG |
+			AMD_CG_SUPPORT_GFX_3D_CGLS |
+			AMD_CG_SUPPORT_MC_MGCG |
+			AMD_CG_SUPPORT_MC_LS |
+			AMD_CG_SUPPORT_HDP_LS |
+			AMD_CG_SUPPORT_HDP_DS |
+			AMD_CG_SUPPORT_HDP_SD |
+			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;
+		adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
+			AMD_PG_SUPPORT_VCN |
+			AMD_PG_SUPPORT_JPEG_DPG |
+			AMD_PG_SUPPORT_JPEG |
+			AMD_PG_SUPPORT_GFX_PG;
+		adev->external_rev_id = adev->rev_id + 0xF;
+		break;
  	default:
  		/* FIXME: not supported yet */
  		return -EINVAL;
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -0
index f28259d13818..a6a7888c7a8d 100644
@@ -1715,6 +1715,7 @@ int kfd_get_gpu_cache_info(struct kfd_node *kdev, struct kfd_gpu_cache_info **pc
  		case IP_VERSION(11, 5, 3):
  		case IP_VERSION(11, 5, 4):
  		case IP_VERSION(11, 5, 6):
+		case IP_VERSION(11, 7, 0):
  			/* Cacheline size not available in IP discovery for gc11.
  			 * kfd_fill_gpu_cache_info_from_gfx_config to hard code it
  			 */
drivers/gpu/drm/amd/amdkfd/kfd_device.c +5 -0
index 67a17458f4e9..bc05ae15c1cc 100644
@@ -169,6 +169,7 @@ static void kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd)
  	case IP_VERSION(11, 5, 3):
  	case IP_VERSION(11, 5, 4):
  	case IP_VERSION(11, 5, 6):
+	case IP_VERSION(11, 7, 0):
  		kfd->device_info.event_interrupt_class = &event_interrupt_class_v11;
  		break;
  	case IP_VERSION(12, 0, 0):
@@ -451,6 +452,10 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
                          gfx_target_version = 110504;
                          f2g = &gfx_v11_kfd2kgd;
                          break;
+		case IP_VERSION(11, 7, 0):
+			gfx_target_version = 110700;
+			f2g = &gfx_v11_kfd2kgd;
+			break;
  		case IP_VERSION(12, 0, 0):
  			gfx_target_version = 120000;
  			f2g = &gfx_v12_kfd2kgd;