Skip to contentSkip to conversation

Update DCN 3.1 support for 3.1.6

PATCH In review Alex Deucher 3 participants 9 messages Feb 15, 2022 – Feb 16, 2022

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

cover Update DCN 3.1 support for 3.1.6

Update DCN 3.1 for 3.1.6. This is a minor update
to DCN 3.1 display support in amdgpu.

The first two patches are register headers so I did not send them out due to size.

Hansen Dsouza (1):
drm/amd/display: Add DCN316 resource and SMU clock manager

Leo Li (3):
drm/amd/include: Add register headers for DCN 3.1.6 drm/amd/include: Add MP 13.0.8 register headers drm/amd/display: Add DMUB support for DCN316

Prike Liang (2):
drm/amd/display: configure dc hw resource for DCN 3.1.6 drm/amdgpu/discovery: Add sw DM function for 3.1.6 DCE

 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |      1 +
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |     14 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c    |      3 +-
 drivers/gpu/drm/amd/display/dc/Makefile       |      1 +
 .../display/dc/bios/command_table_helper2.c   |      1 +
 .../gpu/drm/amd/display/dc/clk_mgr/Makefile   |     10 +
 .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c  |     16 +
 .../dc/clk_mgr/dcn316/dcn316_clk_mgr.c        |    706 +
 .../dc/clk_mgr/dcn316/dcn316_clk_mgr.h        |     49 +
 .../display/dc/clk_mgr/dcn316/dcn316_smu.c    |    328 +
 .../display/dc/clk_mgr/dcn316/dcn316_smu.h    |    128 +
 .../gpu/drm/amd/display/dc/core/dc_resource.c |      8 +
 .../gpu/drm/amd/display/dc/dcn316/Makefile    |     56 +
 .../amd/display/dc/dcn316/dcn316_resource.c   |   2306 +
 .../amd/display/dc/dcn316/dcn316_resource.h   |     42 +
 drivers/gpu/drm/amd/display/dc/gpio/Makefile  |      1 +
 .../gpu/drm/amd/display/dc/gpio/hw_factory.c  |      1 +
 .../drm/amd/display/dc/gpio/hw_translate.c    |      1 +
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   |      1 +
 drivers/gpu/drm/amd/display/dmub/src/Makefile |      2 +
 .../drm/amd/display/dmub/src/dmub_dcn316.c    |     62 +
 .../drm/amd/display/dmub/src/dmub_dcn316.h    |     33 +
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |      4 +
 .../gpu/drm/amd/display/include/dal_asic_id.h |      6 +-
 .../gpu/drm/amd/display/include/dal_types.h   |      1 +
 .../include/asic_reg/dcn/dcn_3_1_6_offset.h   |  15682 ++
 .../include/asic_reg/dcn/dcn_3_1_6_sh_mask.h  |  62717 +++++++
 .../include/asic_reg/dpcs/dpcs_4_2_3_offset.h |  11969 ++
 .../asic_reg/dpcs/dpcs_4_2_3_sh_mask.h        | 136141 +++++++++++++++
 .../include/asic_reg/mp/mp_13_0_8_offset.h    |    410 +
 .../include/asic_reg/mp/mp_13_0_8_sh_mask.h   |    603 +
 31 files changed, 231300 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/Makefile
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
 create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.c
 create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_1_6_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_1_6_sh_mask.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_4_2_3_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_4_2_3_sh_mask.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_13_0_8_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_13_0_8_sh_mask.h
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 3/6 drm/amd/display: configure dc hw resource for DCN 3.1.6

From: Prike Liang <[email protected]>

- set DC version
- add construct/destroy dc clock management function
- register dcn interrupt handler

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 14 +++++++++++++-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c |  3 ++-
 .../amd/display/dc/bios/command_table_helper2.c    |  1 +
 drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c   |  4 +++-
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  |  4 ++++
 drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c   |  1 +
 drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c |  1 +
 drivers/gpu/drm/amd/display/include/dal_asic_id.h  |  6 +++++-
 drivers/gpu/drm/amd/display/include/dal_types.h    |  1 +
 9 files changed, 31 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +13 -1
index 10ca3fc6d91e..a4254357bf5f 100644
@@ -114,6 +114,8 @@ MODULE_FIRMWARE(FIRMWARE_DIMGREY_CAVEFISH_DMUB);
 MODULE_FIRMWARE(FIRMWARE_BEIGE_GOBY_DMUB);
 #define FIRMWARE_YELLOW_CARP_DMUB "amdgpu/yellow_carp_dmcub.bin"
 MODULE_FIRMWARE(FIRMWARE_YELLOW_CARP_DMUB);
+#define FIRMWARE_DCN316_DMUB "amdgpu/dcn_3_1_6_dmcub.bin"
+MODULE_FIRMWARE(FIRMWARE_DCN316_DMUB);
 
 #define FIRMWARE_RAVEN_DMCU		"amdgpu/raven_dmcu.bin"
 MODULE_FIRMWARE(FIRMWARE_RAVEN_DMCU);
@@ -1801,6 +1803,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
 		case IP_VERSION(3, 0, 1):
 		case IP_VERSION(3, 1, 2):
 		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
 			return 0;
 		default:
 			break;
@@ -1916,6 +1919,10 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
 		dmub_asic = (adev->external_rev_id == YELLOW_CARP_B0) ? DMUB_ASIC_DCN31B : DMUB_ASIC_DCN31;
 		fw_name_dmub = FIRMWARE_YELLOW_CARP_DMUB;
 		break;
+	case IP_VERSION(3, 1, 6):
+		dmub_asic = DMUB_ASIC_DCN31B;
+		fw_name_dmub = FIRMWARE_DCN316_DMUB;
+		break;
 
 	default:
 		/* ASIC doesn't support DMUB. */
@@ -4224,6 +4231,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 	case IP_VERSION(3, 0, 0):
 	case IP_VERSION(3, 1, 2):
 	case IP_VERSION(3, 1, 3):
+	case IP_VERSION(3, 1, 6):
 	case IP_VERSION(2, 1, 0):
 		if (register_outbox_irq_handlers(dm->adev)) {
 			DRM_ERROR("DM: Failed to initialize IRQ\n");
@@ -4240,6 +4248,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 		switch (adev->ip_versions[DCE_HWIP][0]) {
 		case IP_VERSION(3, 1, 2):
 		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
 			psr_feature_enabled = true;
 			break;
 		default:
@@ -4356,6 +4365,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 		case IP_VERSION(3, 0, 1):
 		case IP_VERSION(3, 1, 2):
 		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
 			if (dcn10_register_irq_handlers(dm->adev)) {
 				DRM_ERROR("DM: Failed to initialize IRQ\n");
 				goto fail;
@@ -4541,6 +4551,7 @@ static int dm_early_init(void *handle)
 		case IP_VERSION(2, 1, 0):
 		case IP_VERSION(3, 1, 2):
 		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
 			adev->mode_info.num_crtc = 4;
 			adev->mode_info.num_hpd = 4;
 			adev->mode_info.num_dig = 4;
@@ -5213,6 +5224,7 @@ get_plane_modifiers(const struct amdgpu_device *adev, unsigned int plane_type, u
 	case AMDGPU_FAMILY_NV:
 	case AMDGPU_FAMILY_VGH:
 	case AMDGPU_FAMILY_YC:
+	case AMDGPU_FAMILY_GC_10_3_7:
 		if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(10, 3, 0))
 			add_gfx10_3_modifiers(adev, mods, &size, &capacity);
 		else
@@ -6179,7 +6191,7 @@ static void apply_dsc_policy_for_stream(struct amdgpu_dm_connector *aconnector,
 	if (stream->link && stream->link->local_sink)
 		max_dsc_target_bpp_limit_override =
 			stream->link->local_sink->edid_caps.panel_patch.max_dsc_target_bpp_limit;
-	
+
 	/* Set DSC policy according to dsc_clock_en */
 	dc_dsc_policy_set_enable_dsc_when_not_needed(
 		aconnector->dsc_settings.dsc_force_enable == DSC_CLK_FORCE_ENABLE);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +2 -1
index 5bfdc66b5867..8709827b69ad 100644
@@ -663,7 +663,8 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct
 		INIT_DELAYED_WORK(&hdcp_work[i].property_validate_dwork, event_property_validate);
 
 		hdcp_work[i].hdcp.config.psp.handle = &adev->psp;
-		if (dc->ctx->dce_version == DCN_VERSION_3_1)
+		if (dc->ctx->dce_version == DCN_VERSION_3_1 ||
+		    dc->ctx->dce_version == DCN_VERSION_3_16)
 			hdcp_work[i].hdcp.config.psp.caps.dtm_v3_supported = 1;
 		hdcp_work[i].hdcp.config.ddc.handle = dc_get_link_at_index(dc, i);
 		hdcp_work[i].hdcp.config.ddc.funcs.write_i2c = lp_write_i2c;
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +1 -0
index eedc553f340e..d0fcfb158436 100644
@@ -76,6 +76,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
 	case DCN_VERSION_3_02:
 	case DCN_VERSION_3_03:
 	case DCN_VERSION_3_1:
+	case DCN_VERSION_3_16:
 		*h = dal_cmd_tbl_helper_dce112_get_table2();
 		return true;
 #endif
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +3 -1
index 9200c8ce02ba..a707d07d5197 100644
@@ -278,7 +278,8 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
 			return &clk_mgr->base.base;
 		}
 		break;
-	case FAMILY_YELLOW_CARP: {
+	case FAMILY_YELLOW_CARP:
+	case AMDGPU_FAMILY_GC_10_3_7:{
 		struct clk_mgr_dcn31 *clk_mgr = kzalloc(sizeof(*clk_mgr), GFP_KERNEL);
 
 		if (clk_mgr == NULL) {
@@ -322,6 +323,7 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
 		break;
 
 	case FAMILY_YELLOW_CARP:
+	case AMDGPU_FAMILY_GC_10_3_7:
 			dcn31_clk_mgr_destroy(clk_mgr);
 		break;
 
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -0
index 71b393194c55..ed6b0eec1b68 100644
@@ -155,6 +155,10 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
 		if (ASICREV_IS_YELLOW_CARP(asic_id.hw_internal_rev))
 			dc_version = DCN_VERSION_3_1;
 		break;
+	case AMDGPU_FAMILY_GC_10_3_7:
+		if (ASICREV_IS_GC_10_3_7(asic_id.hw_internal_rev))
+			dc_version = DCN_VERSION_3_16;
+		break;
 #endif
 
 	default:
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +1 -0
index 5029d4e42dbf..c9ee212b2e80 100644
@@ -114,6 +114,7 @@ bool dal_hw_factory_init(
 	case DCN_VERSION_3_02:
 	case DCN_VERSION_3_03:
 	case DCN_VERSION_3_1:
+	case DCN_VERSION_3_16:
 		dal_hw_factory_dcn30_init(factory);
 		return true;
 #endif
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +1 -0
index 904bd30bed68..42adba630125 100644
@@ -109,6 +109,7 @@ bool dal_hw_translate_init(
 	case DCN_VERSION_3_02:
 	case DCN_VERSION_3_03:
 	case DCN_VERSION_3_1:
+	case DCN_VERSION_3_16:
 		dal_hw_translate_dcn30_init(translate);
 		return true;
 #endif
drivers/gpu/drm/amd/display/include/dal_asic_id.h +5 -1
index e672be6327cb..79f6a9ddb4bd 100644
@@ -227,7 +227,6 @@ enum {
 #endif
 
 #define FAMILY_YELLOW_CARP                     146
-
 #define YELLOW_CARP_A0 0x01
 #define YELLOW_CARP_B0 0x20
 #define YELLOW_CARP_UNKNOWN 0xFF
@@ -236,6 +235,11 @@ enum {
 #define ASICREV_IS_YELLOW_CARP(eChipRev) ((eChipRev >= YELLOW_CARP_A0) && (eChipRev < YELLOW_CARP_UNKNOWN))
 #endif
 
+#define AMDGPU_FAMILY_GC_10_3_7                151
+#define GC_10_3_7_A0 0x01
+#define GC_10_3_7_UNKNOWN 0xFF
+
+#define ASICREV_IS_GC_10_3_7(eChipRev) ((eChipRev >= GC_10_3_7_A0) && (eChipRev < GC_10_3_7_UNKNOWN))
 
 /*
  * ASIC chip ID
drivers/gpu/drm/amd/display/include/dal_types.h +1 -0
index 012b7c61798c..8ddb25519880 100644
@@ -57,6 +57,7 @@ enum dce_version {
 	DCN_VERSION_3_02,
 	DCN_VERSION_3_03,
 	DCN_VERSION_3_1,
+	DCN_VERSION_3_16,
 	DCN_VERSION_MAX
 };
 
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 3/6
#2 lore raw

Re: [PATCH 3/6] drm/amd/display: configure dc hw resource for DCN 3.1.6

Quoted 8 lines · Alex Deucher

From: Prike Liang <[email protected]>

- set DC version
- add construct/destroy dc clock management function
- register dcn interrupt handler

Thanks.

Quoted 217 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 14 +++++++++++++-
  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c |  3 ++-
  .../amd/display/dc/bios/command_table_helper2.c    |  1 +
  drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c   |  4 +++-
  drivers/gpu/drm/amd/display/dc/core/dc_resource.c  |  4 ++++
  drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c   |  1 +
  drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c |  1 +
  drivers/gpu/drm/amd/display/include/dal_asic_id.h  |  6 +++++-
  drivers/gpu/drm/amd/display/include/dal_types.h    |  1 +
  9 files changed, 31 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +13 -1
index 10ca3fc6d91e..a4254357bf5f 100644
@@ -114,6 +114,8 @@ MODULE_FIRMWARE(FIRMWARE_DIMGREY_CAVEFISH_DMUB);
  MODULE_FIRMWARE(FIRMWARE_BEIGE_GOBY_DMUB);
  #define FIRMWARE_YELLOW_CARP_DMUB "amdgpu/yellow_carp_dmcub.bin"
  MODULE_FIRMWARE(FIRMWARE_YELLOW_CARP_DMUB);
+#define FIRMWARE_DCN316_DMUB "amdgpu/dcn_3_1_6_dmcub.bin"
+MODULE_FIRMWARE(FIRMWARE_DCN316_DMUB);
 
  #define FIRMWARE_RAVEN_DMCU		"amdgpu/raven_dmcu.bin"
  MODULE_FIRMWARE(FIRMWARE_RAVEN_DMCU);
@@ -1801,6 +1803,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
  		case IP_VERSION(3, 0, 1):
  		case IP_VERSION(3, 1, 2):
  		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
  			return 0;
  		default:
  			break;
@@ -1916,6 +1919,10 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
  		dmub_asic = (adev->external_rev_id == YELLOW_CARP_B0) ? DMUB_ASIC_DCN31B : DMUB_ASIC_DCN31;
  		fw_name_dmub = FIRMWARE_YELLOW_CARP_DMUB;
  		break;
+	case IP_VERSION(3, 1, 6):
+		dmub_asic = DMUB_ASIC_DCN31B;
+		fw_name_dmub = FIRMWARE_DCN316_DMUB;
+		break;
 
  	default:
  		/* ASIC doesn't support DMUB. */
@@ -4224,6 +4231,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
  	case IP_VERSION(3, 0, 0):
  	case IP_VERSION(3, 1, 2):
  	case IP_VERSION(3, 1, 3):
+	case IP_VERSION(3, 1, 6):
  	case IP_VERSION(2, 1, 0):
  		if (register_outbox_irq_handlers(dm->adev)) {
  			DRM_ERROR("DM: Failed to initialize IRQ\n");
@@ -4240,6 +4248,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
  		switch (adev->ip_versions[DCE_HWIP][0]) {
  		case IP_VERSION(3, 1, 2):
  		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
  			psr_feature_enabled = true;
  			break;
  		default:
@@ -4356,6 +4365,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
  		case IP_VERSION(3, 0, 1):
  		case IP_VERSION(3, 1, 2):
  		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
  			if (dcn10_register_irq_handlers(dm->adev)) {
  				DRM_ERROR("DM: Failed to initialize IRQ\n");
  				goto fail;
@@ -4541,6 +4551,7 @@ static int dm_early_init(void *handle)
  		case IP_VERSION(2, 1, 0):
  		case IP_VERSION(3, 1, 2):
  		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
  			adev->mode_info.num_crtc = 4;
  			adev->mode_info.num_hpd = 4;
  			adev->mode_info.num_dig = 4;
@@ -5213,6 +5224,7 @@ get_plane_modifiers(const struct amdgpu_device *adev, unsigned int plane_type, u
  	case AMDGPU_FAMILY_NV:
  	case AMDGPU_FAMILY_VGH:
  	case AMDGPU_FAMILY_YC:
+	case AMDGPU_FAMILY_GC_10_3_7:
  		if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(10, 3, 0))
  			add_gfx10_3_modifiers(adev, mods, &size, &capacity);
  		else
@@ -6179,7 +6191,7 @@ static void apply_dsc_policy_for_stream(struct amdgpu_dm_connector *aconnector,
  	if (stream->link && stream->link->local_sink)
  		max_dsc_target_bpp_limit_override =
  			stream->link->local_sink->edid_caps.panel_patch.max_dsc_target_bpp_limit;
-	
+
  	/* Set DSC policy according to dsc_clock_en */
  	dc_dsc_policy_set_enable_dsc_when_not_needed(
  		aconnector->dsc_settings.dsc_force_enable == DSC_CLK_FORCE_ENABLE);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +2 -1
index 5bfdc66b5867..8709827b69ad 100644
@@ -663,7 +663,8 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct
  		INIT_DELAYED_WORK(&hdcp_work[i].property_validate_dwork, event_property_validate);
 
  		hdcp_work[i].hdcp.config.psp.handle = &adev->psp;
-		if (dc->ctx->dce_version == DCN_VERSION_3_1)
+		if (dc->ctx->dce_version == DCN_VERSION_3_1 ||
+		    dc->ctx->dce_version == DCN_VERSION_3_16)
  			hdcp_work[i].hdcp.config.psp.caps.dtm_v3_supported = 1;
  		hdcp_work[i].hdcp.config.ddc.handle = dc_get_link_at_index(dc, i);
  		hdcp_work[i].hdcp.config.ddc.funcs.write_i2c = lp_write_i2c;
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +1 -0
index eedc553f340e..d0fcfb158436 100644
@@ -76,6 +76,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
  	case DCN_VERSION_3_02:
  	case DCN_VERSION_3_03:
  	case DCN_VERSION_3_1:
+	case DCN_VERSION_3_16:
  		*h = dal_cmd_tbl_helper_dce112_get_table2();
  		return true;
  #endif
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +3 -1
index 9200c8ce02ba..a707d07d5197 100644
@@ -278,7 +278,8 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
  			return &clk_mgr->base.base;
  		}
  		break;
-	case FAMILY_YELLOW_CARP: {
+	case FAMILY_YELLOW_CARP:
+	case AMDGPU_FAMILY_GC_10_3_7:{
  		struct clk_mgr_dcn31 *clk_mgr = kzalloc(sizeof(*clk_mgr), GFP_KERNEL);
 
  		if (clk_mgr == NULL) {
@@ -322,6 +323,7 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
  		break;
 
  	case FAMILY_YELLOW_CARP:
+	case AMDGPU_FAMILY_GC_10_3_7:
  			dcn31_clk_mgr_destroy(clk_mgr);
  		break;
 
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -0
index 71b393194c55..ed6b0eec1b68 100644
@@ -155,6 +155,10 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
  		if (ASICREV_IS_YELLOW_CARP(asic_id.hw_internal_rev))
  			dc_version = DCN_VERSION_3_1;
  		break;
+	case AMDGPU_FAMILY_GC_10_3_7:
+		if (ASICREV_IS_GC_10_3_7(asic_id.hw_internal_rev))
+			dc_version = DCN_VERSION_3_16;
+		break;
  #endif
 
  	default:
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +1 -0
index 5029d4e42dbf..c9ee212b2e80 100644
@@ -114,6 +114,7 @@ bool dal_hw_factory_init(
  	case DCN_VERSION_3_02:
  	case DCN_VERSION_3_03:
  	case DCN_VERSION_3_1:
+	case DCN_VERSION_3_16:
  		dal_hw_factory_dcn30_init(factory);
  		return true;
  #endif
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +1 -0
index 904bd30bed68..42adba630125 100644
@@ -109,6 +109,7 @@ bool dal_hw_translate_init(
  	case DCN_VERSION_3_02:
  	case DCN_VERSION_3_03:
  	case DCN_VERSION_3_1:
+	case DCN_VERSION_3_16:
  		dal_hw_translate_dcn30_init(translate);
  		return true;
  #endif
drivers/gpu/drm/amd/display/include/dal_asic_id.h +5 -1
index e672be6327cb..79f6a9ddb4bd 100644
@@ -227,7 +227,6 @@ enum {
  #endif
 
  #define FAMILY_YELLOW_CARP                     146
-
  #define YELLOW_CARP_A0 0x01
  #define YELLOW_CARP_B0 0x20
  #define YELLOW_CARP_UNKNOWN 0xFF
@@ -236,6 +235,11 @@ enum {
  #define ASICREV_IS_YELLOW_CARP(eChipRev) ((eChipRev >= YELLOW_CARP_A0) && (eChipRev < YELLOW_CARP_UNKNOWN))
  #endif
 
+#define AMDGPU_FAMILY_GC_10_3_7                151
+#define GC_10_3_7_A0 0x01
+#define GC_10_3_7_UNKNOWN 0xFF
+
+#define ASICREV_IS_GC_10_3_7(eChipRev) ((eChipRev >= GC_10_3_7_A0) && (eChipRev < GC_10_3_7_UNKNOWN))
 
  /*
   * ASIC chip ID
drivers/gpu/drm/amd/display/include/dal_types.h +1 -0
index 012b7c61798c..8ddb25519880 100644
@@ -57,6 +57,7 @@ enum dce_version {
  	DCN_VERSION_3_02,
  	DCN_VERSION_3_03,
  	DCN_VERSION_3_1,
+	DCN_VERSION_3_16,
  	DCN_VERSION_MAX
  };
 
author maintainer
#3 lore raw

PATCH 4/6 drm/amd/display: Add DMUB support for DCN316

In reply to Alex Deucher

From: Leo Li <[email protected]>

Initialize DMUB for DCN316. Use same funcs as DCN31 for DCN316.

---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  2 +-
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   |  1 +
 drivers/gpu/drm/amd/display/dmub/src/Makefile |  2 +
 .../drm/amd/display/dmub/src/dmub_dcn316.c    | 62 +++++++++++++++++++
 .../drm/amd/display/dmub/src/dmub_dcn316.h    | 33 ++++++++++
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |  4 ++
 6 files changed, 103 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.c
 create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index a4254357bf5f..4b2cb9bdc3d2 100644
@@ -1920,7 +1920,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
 		fw_name_dmub = FIRMWARE_YELLOW_CARP_DMUB;
 		break;
 	case IP_VERSION(3, 1, 6):
-		dmub_asic = DMUB_ASIC_DCN31B;
+		dmub_asic = DMUB_ASIC_DCN316;
 		fw_name_dmub = FIRMWARE_DCN316_DMUB;
 		break;
 
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1 -0
index 83855b8a32e9..821d3fb1f824 100644
@@ -98,6 +98,7 @@ enum dmub_asic {
 	DMUB_ASIC_DCN303,
 	DMUB_ASIC_DCN31,
 	DMUB_ASIC_DCN31B,
+	DMUB_ASIC_DCN316,
 	DMUB_ASIC_MAX,
 };
 
drivers/gpu/drm/amd/display/dmub/src/Makefile +2 -0
index 0495bcdd3463..21e818862072 100644
@@ -22,7 +22,9 @@
 
 DMUB = dmub_srv.o dmub_srv_stat.o dmub_reg.o dmub_dcn20.o dmub_dcn21.o
 DMUB += dmub_dcn30.o dmub_dcn301.o dmub_dcn302.o dmub_dcn303.o
+
 DMUB += dmub_dcn31.o
+DMUB += dmub_dcn316.o
 
 AMD_DAL_DMUB = $(addprefix $(AMDDALPATH)/dmub/src/,$(DMUB))
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.c new file +62 -0

62 lines not on this page · raw message

drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.h new file +33 -0
new file mode 100644
index 000000000000..9e7d109129ea
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2021 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef _DMUB_DCN316_H_
+#define _DMUB_DCN316_H_
+
+#include "dmub_dcn31.h"
+
+extern const struct dmub_srv_dcn31_regs dmub_srv_dcn316_regs;
+
+#endif /* _DMUB_DCN316_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +4 -0
index 9280f2abd973..db2802a14f95 100644
@@ -32,6 +32,7 @@
 #include "dmub_dcn302.h"
 #include "dmub_dcn303.h"
 #include "dmub_dcn31.h"
+#include "dmub_dcn316.h"
 #include "os_types.h"
 /*
  * Note: the DMUB service is standalone. No additional headers should be
@@ -220,7 +221,10 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
 
 	case DMUB_ASIC_DCN31:
 	case DMUB_ASIC_DCN31B:
+	case DMUB_ASIC_DCN316:
 		dmub->regs_dcn31 = &dmub_srv_dcn31_regs;
+		if (asic == DMUB_ASIC_DCN316)
+			dmub->regs_dcn31 = &dmub_srv_dcn316_regs;
 		funcs->reset = dmub_dcn31_reset;
 		funcs->reset_release = dmub_dcn31_reset_release;
 		funcs->backdoor_load = dmub_dcn31_backdoor_load;
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 4/6
#4 lore raw

Re: [PATCH 4/6] drm/amd/display: Add DMUB support for DCN316

Quoted 8 lines · Alex Deucher

From: Leo Li <[email protected]>

Initialize DMUB for DCN316. Use same funcs as DCN31 for DCN316.

Harry

Quoted 180 lines
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  2 +-
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   |  1 +
 drivers/gpu/drm/amd/display/dmub/src/Makefile |  2 +
 .../drm/amd/display/dmub/src/dmub_dcn316.c    | 62 +++++++++++++++++++
 .../drm/amd/display/dmub/src/dmub_dcn316.h    | 33 ++++++++++
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |  4 ++
 6 files changed, 103 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.c
 create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index a4254357bf5f..4b2cb9bdc3d2 100644
@@ -1920,7 +1920,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
 		fw_name_dmub = FIRMWARE_YELLOW_CARP_DMUB;
 		break;
 	case IP_VERSION(3, 1, 6):
-		dmub_asic = DMUB_ASIC_DCN31B;
+		dmub_asic = DMUB_ASIC_DCN316;
 		fw_name_dmub = FIRMWARE_DCN316_DMUB;
 		break;
 
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1 -0
index 83855b8a32e9..821d3fb1f824 100644
@@ -98,6 +98,7 @@ enum dmub_asic {
 	DMUB_ASIC_DCN303,
 	DMUB_ASIC_DCN31,
 	DMUB_ASIC_DCN31B,
+	DMUB_ASIC_DCN316,
 	DMUB_ASIC_MAX,
 };
 
drivers/gpu/drm/amd/display/dmub/src/Makefile +2 -0
index 0495bcdd3463..21e818862072 100644
@@ -22,7 +22,9 @@
 
 DMUB = dmub_srv.o dmub_srv_stat.o dmub_reg.o dmub_dcn20.o dmub_dcn21.o
 DMUB += dmub_dcn30.o dmub_dcn301.o dmub_dcn302.o dmub_dcn303.o
+
 DMUB += dmub_dcn31.o
+DMUB += dmub_dcn316.o
 
 AMD_DAL_DMUB = $(addprefix $(AMDDALPATH)/dmub/src/,$(DMUB))
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.c new file +62 -0
new file mode 100644
index 000000000000..c43d1e3819e0
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2021 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#include "../dmub_srv.h"
+#include "dmub_reg.h"
+#include "dmub_dcn316.h"
+
+#include "dcn/dcn_3_1_6_offset.h"
+#include "dcn/dcn_3_1_6_sh_mask.h"
+
+#define DCN_BASE__INST0_SEG0                       0x00000012
+#define DCN_BASE__INST0_SEG1                       0x000000C0
+#define DCN_BASE__INST0_SEG2                       0x000034C0
+#define DCN_BASE__INST0_SEG3                       0x00009000
+#define DCN_BASE__INST0_SEG4                       0x02403C00
+#define DCN_BASE__INST0_SEG5                       0
+
+#define BASE_INNER(seg) DCN_BASE__INST0_SEG##seg
+#define CTX dmub
+#define REGS dmub->regs_dcn31
+#define REG_OFFSET_EXP(reg_name) (BASE(reg##reg_name##_BASE_IDX) + reg##reg_name)
+
+/* Registers. */
+
+const struct dmub_srv_dcn31_regs dmub_srv_dcn316_regs = {
+#define DMUB_SR(reg) REG_OFFSET_EXP(reg),
+	{
+		DMUB_DCN31_REGS()
+		DMCUB_INTERNAL_REGS()
+	},
+#undef DMUB_SR
+
+#define DMUB_SF(reg, field) FD_MASK(reg, field),
+	{ DMUB_DCN31_FIELDS() },
+#undef DMUB_SF
+
+#define DMUB_SF(reg, field) FD_SHIFT(reg, field),
+	{ DMUB_DCN31_FIELDS() },
+#undef DMUB_SF
+};
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn316.h new file +33 -0
new file mode 100644
index 000000000000..9e7d109129ea
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2021 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef _DMUB_DCN316_H_
+#define _DMUB_DCN316_H_
+
+#include "dmub_dcn31.h"
+
+extern const struct dmub_srv_dcn31_regs dmub_srv_dcn316_regs;
+
+#endif /* _DMUB_DCN316_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +4 -0
index 9280f2abd973..db2802a14f95 100644
@@ -32,6 +32,7 @@
 #include "dmub_dcn302.h"
 #include "dmub_dcn303.h"
 #include "dmub_dcn31.h"
+#include "dmub_dcn316.h"
 #include "os_types.h"
 /*
  * Note: the DMUB service is standalone. No additional headers should be
@@ -220,7 +221,10 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
 
 	case DMUB_ASIC_DCN31:
 	case DMUB_ASIC_DCN31B:
+	case DMUB_ASIC_DCN316:
 		dmub->regs_dcn31 = &dmub_srv_dcn31_regs;
+		if (asic == DMUB_ASIC_DCN316)
+			dmub->regs_dcn31 = &dmub_srv_dcn316_regs;
 		funcs->reset = dmub_dcn31_reset;
 		funcs->reset_release = dmub_dcn31_reset_release;
 		funcs->backdoor_load = dmub_dcn31_backdoor_load;
author maintainer
#5 lore raw

PATCH 5/6 drm/amd/display: Add DCN316 resource and SMU clock manager

In reply to Alex Deucher

From: Hansen Dsouza <[email protected]>

Add core DC implementation for DCN316.

---
 drivers/gpu/drm/amd/display/dc/Makefile       |    1 +
 .../gpu/drm/amd/display/dc/clk_mgr/Makefile   |   10 +
 .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c  |   20 +-
 .../dc/clk_mgr/dcn316/dcn316_clk_mgr.c        |  706 +++++
 .../dc/clk_mgr/dcn316/dcn316_clk_mgr.h        |   49 +
 .../display/dc/clk_mgr/dcn316/dcn316_smu.c    |  328 +++
 .../display/dc/clk_mgr/dcn316/dcn316_smu.h    |  128 +
 .../gpu/drm/amd/display/dc/core/dc_resource.c |    4 +
 .../gpu/drm/amd/display/dc/dcn316/Makefile    |   56 +
 .../amd/display/dc/dcn316/dcn316_resource.c   | 2306 +++++++++++++++++
 .../amd/display/dc/dcn316/dcn316_resource.h   |   42 +
 drivers/gpu/drm/amd/display/dc/gpio/Makefile  |    1 +
 12 files changed, 3648 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/Makefile
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
drivers/gpu/drm/amd/display/dc/Makefile +1 -0
index 0aaf394b73ff..30d0286b2291 100644
@@ -36,6 +36,7 @@ DC_LIBS += dcn301
 DC_LIBS += dcn302
 DC_LIBS += dcn303
 DC_LIBS += dcn31
+DC_LIBS += dcn316
 endif
 
 DC_LIBS += dce120
drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile +10 -0
index 6bd73e49a6d2..3bf8ef9373e8 100644
@@ -153,4 +153,14 @@ CLK_MGR_DCN31 = dcn31_smu.o dcn31_clk_mgr.o
 AMD_DAL_CLK_MGR_DCN31 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn31/,$(CLK_MGR_DCN31))
 
 AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN31)
+
+###############################################################################
+# DCN316
+###############################################################################
+CLK_MGR_DCN316 = dcn316_smu.o dcn316_clk_mgr.o
+
+AMD_DAL_CLK_MGR_DCN316 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn316/,$(CLK_MGR_DCN316))
+
+AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN316)
+
 endif
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +17 -3
index a707d07d5197..0a608bd4bd61 100644
@@ -43,6 +43,7 @@
 #include "dcn30/dcn30_clk_mgr.h"
 #include "dcn301/vg_clk_mgr.h"
 #include "dcn31/dcn31_clk_mgr.h"
+#include "dcn316/dcn316_clk_mgr.h"
 
 
 int clk_mgr_helper_get_active_display_cnt(
@@ -278,8 +279,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
 			return &clk_mgr->base.base;
 		}
 		break;
-	case FAMILY_YELLOW_CARP:
-	case AMDGPU_FAMILY_GC_10_3_7:{
+	case FAMILY_YELLOW_CARP: {
 		struct clk_mgr_dcn31 *clk_mgr = kzalloc(sizeof(*clk_mgr), GFP_KERNEL);
 
 		if (clk_mgr == NULL) {
@@ -290,6 +290,17 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
 		dcn31_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
 		return &clk_mgr->base.base;
 	}
+	case AMDGPU_FAMILY_GC_10_3_7: {
+		struct clk_mgr_dcn316 *clk_mgr = kzalloc(sizeof(*clk_mgr), GFP_KERNEL);
+
+		if (clk_mgr == NULL) {
+			BREAK_TO_DEBUGGER();
+			return NULL;
+		}
+
+		dcn316_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
+		return &clk_mgr->base.base;
+	}
 #endif
 
 	default:
@@ -323,10 +334,13 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
 		break;
 
 	case FAMILY_YELLOW_CARP:
-	case AMDGPU_FAMILY_GC_10_3_7:
 			dcn31_clk_mgr_destroy(clk_mgr);
 		break;
 
+	case AMDGPU_FAMILY_GC_10_3_7:
+			dcn316_clk_mgr_destroy(clk_mgr);
+		break;
+
 	default:
 		break;
 	}
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c new file +706 -0

706 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.h new file +49 -0

49 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c new file +328 -0

328 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.h new file +128 -0

128 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -0
index ed6b0eec1b68..fefae35d016f 100644
@@ -66,6 +66,7 @@
 #include "dcn302/dcn302_resource.h"
 #include "dcn303/dcn303_resource.h"
 #include "dcn31/dcn31_resource.h"
+#include "dcn316/dcn316_resource.h"
 #endif
 
 #define DC_LOGGER_INIT(logger)
@@ -250,6 +251,9 @@ struct resource_pool *dc_create_resource_pool(struct dc  *dc,
 	case DCN_VERSION_3_1:
 		res_pool = dcn31_create_resource_pool(init_data, dc);
 		break;
+	case DCN_VERSION_3_16:
+		res_pool = dcn316_create_resource_pool(init_data, dc);
+		break;
 #endif
 	default:
 		break;
drivers/gpu/drm/amd/display/dc/dcn316/Makefile new file +56 -0

56 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c new file +2306 -0

1,649 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h new file +42 -0

42 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/gpio/Makefile +1 -0
index c5ddade8b187..a1bf2128feba 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

maintainer Reviewed-by on v1 5/6
#6 lore raw

Re: [PATCH 5/6] drm/amd/display: Add DCN316 resource and SMU clock manager

drivers/gpu/drm/amd/display/dc/gpio/Makefile GPIO_DCN30 = hw_translate_dcn30.o hw_factory_dcn30.o · line 109

Quoted 9 lines · Alex Deucher
drivers/gpu/drm/amd/display/dc/gpio/Makefile +1 -0
index c5ddade8b187..a1bf2128feba 100644
@@ -106,6 +106,7 @@ GPIO_DCN30 = hw_translate_dcn30.o hw_factory_dcn30.o
  AMD_DAL_GPIO_DCN30 = $(addprefix $(AMDDALPATH)/dc/gpio/dcn30/,$(GPIO_DCN30))
 
  AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCN30)
+

Looks like we can drop this newline. Otherwise,

Quoted 4 lines
drivers/gpu/drm/amd/display/dc/gpio/Makefile +0 -1
  endif
  ###############################################################################
  # Diagnostics on FPGA
-- 2.34.1
author maintainer
#7 lore raw

PATCH 6/6 drm/amdgpu/discovery: Add sw DM function for 3.1.6 DCE

In reply to Alex Deucher

From: Prike Liang <[email protected]>

Add 3.1.6 DCE IP and assign relevant sw DM function for the new DCE.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index babc0ab3208e..8fa3cf8dad48 100644
@@ -1366,6 +1366,7 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
 		case IP_VERSION(3, 0, 1):
 		case IP_VERSION(3, 1, 2):
 		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
 			amdgpu_device_ip_block_add(adev, &dm_ip_block);
 			break;
 		default:
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 6/6
#8 lore raw

Re: [PATCH 6/6] drm/amdgpu/discovery: Add sw DM function for 3.1.6 DCE

Quoted 6 lines · Alex Deucher

From: Prike Liang <[email protected]>

Add 3.1.6 DCE IP and assign relevant sw DM function for the new DCE.

Thanks!

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index babc0ab3208e..8fa3cf8dad48 100644
@@ -1366,6 +1366,7 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
  		case IP_VERSION(3, 0, 1):
  		case IP_VERSION(3, 1, 2):
  		case IP_VERSION(3, 1, 3):
+		case IP_VERSION(3, 1, 6):
  			amdgpu_device_ip_block_add(adev, &dm_ip_block);
  			break;
  		default: