Skip to contentSkip to conversation

DC Patches April 27, 2022

PATCH New Wayne Lin 1 participant 9 messages Apr 27, 2022

Subsystems (3)
lore
Share & tools
lore

Wayne Lin

author
#0 lore raw

v2 cover DC Patches April 27, 2022

This DC patchset brings improvements in multiple areas. In summary, we highlight:

* Have optc3 function accessible to newer DCN
* Add CM boot option for USB4 tunneling
* Fix system hang issue when game resolution is changed
* Remove outdated register for dcn3+
* Add new DSC interface to disconnect from pipe
* Clean up pixel format types in enum surface_pixel_format

---

Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.115.0

Aric Cyr (2):
drm/amd/display: Clean up pixel format types
drm/amd/display: 3.2.184

Eric Bernstein (1):
drm/amd/display: Add new DSC interface to disconnect from pipe

Evgenii Krasnikov (1):
Revert "drm/amd/display: Reset cached PSR parameters after hibernate"

Jimmy Kizito (1):
drm/amd/display: Add Connection Manager boot option.

Lee, Alvin (1):
drm/amd/display: Make OPTC3 function accessible to other DCN

Tse, Kaitlyn (1):
drm/amd/display: Remove outdated register for dcn3+

 drivers/gpu/drm/amd/display/dc/core/dc_link.c |  7 +---
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 drivers/gpu/drm/amd/display/dc/dc_hw_types.h  |  3 +-
 .../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c  | 11 ++++++
 .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h  |  5 ---
 .../gpu/drm/amd/display/dc/dcn30/dcn30_optc.h |  2 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h   |  1 +
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   |  1 +
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   | 36 ++++++++++++++++++-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c |  1 +
 10 files changed, 54 insertions(+), 15 deletions(-)
Signature · 1 line
2.36.0
author
#1 lore raw

PATCH v2 1/8 drm/amd/display: Make OPTC3 function accessible to other DCN

From: "Lee, Alvin" <[email protected]>

[Why]
Newer DCN should use optc3

[How]
Declare optc3 vmin/vmax function in header.

---
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h +1 -1
index 736e63bc80c2..97f11ef6e9f0 100644
@@ -344,5 +344,5 @@ void optc3_set_timing_db_mode(struct timing_generator *optc, bool enable);
 void optc3_set_odm_bypass(struct timing_generator *optc,
 		const struct dc_crtc_timing *dc_crtc_timing);
 void optc3_tg_init(struct timing_generator *optc);
-
+void optc3_set_vtotal_min_max(struct timing_generator *optc, int vtotal_min, int vtotal_max);
 #endif /* __DC_OPTC_DCN30_H__ */
Signature · 1 line
2.36.0
author
#2 lore raw

PATCH v2 2/8 drm/amd/display: Add Connection Manager boot option.

In reply to Wayne Lin

From: Jimmy Kizito <[email protected]>

[Why]
Boot up behaviour may differ depending on the Connection Manager handling USB4 tunneling.

[How]
Send boot option to firmware to indicate Connection Manager.

---
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h       | 1 +
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h   | 3 ++-
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1 -0
index 56757a286a03..f5cb8932bd5c 100644
@@ -243,6 +243,7 @@ struct dmub_srv_hw_params {
 	bool power_optimization;
 	bool dpia_supported;
 	bool disable_dpia;
+	bool usb4_cm_version;
 };
 
 /**
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 -1
index 05c8d91ad4ab..e24f117e831e 100644
@@ -350,8 +350,9 @@ union dmub_fw_boot_options {
 		uint32_t power_optimization: 1;
 		uint32_t diag_env: 1; /* 1 if diagnostic environment */
 		uint32_t gpint_scratch8: 1; /* 1 if GPINT is in scratch8*/
+		uint32_t usb4_cm_version: 1; /**< USB4 CM Version */
 
-		uint32_t reserved : 18; /**< reserved */
+		uint32_t reserved : 17; /**< reserved */
 	} bits; /**< boot bits */
 	uint32_t all; /**< 32-bit access to bits */
 };
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +1 -0
index 82c651535628..7c9330a61ac1 100644
@@ -340,6 +340,7 @@ void dmub_dcn31_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu
 	boot_options.bits.z10_disable = params->disable_z10;
 	boot_options.bits.dpia_supported = params->dpia_supported;
 	boot_options.bits.enable_dpia = params->disable_dpia ? 0 : 1;
+	boot_options.bits.usb4_cm_version = params->usb4_cm_version;
 	boot_options.bits.power_optimization = params->power_optimization;
 
 	boot_options.bits.sel_mux_phy_c_d_phy_f_g = (dmub->asic == DMUB_ASIC_DCN31B) ? 1 : 0;
Signature · 1 line
2.36.0
author
#3 lore raw

PATCH v2 3/8 Revert "drm/amd/display: Reset cached PSR parameters after hibernate"

In reply to Wayne Lin

From: Evgenii Krasnikov <[email protected]>

This reverts commit cee342f2d6a8b57ef8209720d5892d0ee22fd3c8.

Commit cee342f2d6a8 ("drm/amd/display: Reset cached PSR parameters after hibernate") causes a system hang when game resolution is changed. Revert it.

---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -6
index 1eddf2785153..3d13ee32a3db 100644
@@ -3317,14 +3317,9 @@ bool dc_link_setup_psr(struct dc_link *link,
 	 */
 	psr_context->frame_delay = 0;
 
-	if (psr) {
+	if (psr)
 		link->psr_settings.psr_feature_enabled = psr->funcs->psr_copy_settings(psr,
 			link, psr_context, panel_inst);
-		if (link->psr_settings.psr_feature_enabled) {
-			link->psr_settings.psr_power_opt = 0;
-			link->psr_settings.psr_allow_active = 0;
-		}
-	}
 	else
 		link->psr_settings.psr_feature_enabled = dmcu->funcs->setup_psr(dmcu, link, psr_context);
 
Signature · 1 line
2.36.0
author
#4 lore raw

PATCH v2 4/8 drm/amd/display: Remove outdated register for dcn3+

In reply to Wayne Lin

From: "Tse, Kaitlyn" <[email protected]>

[Why & How]
Remove MPCC_OGAM_LUT_RAM_CONTROL register which is outdated.

---
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h +0 -5
index b7dc78624963..34b9cedbd012 100644
@@ -99,11 +99,6 @@
 	SRII(MPCC_OGAM_CONTROL, MPCC_OGAM, inst),\
 	SRII(MPCC_OGAM_LUT_CONTROL, MPCC_OGAM, inst)
 
-/*
-	SRII(MPCC_OGAM_LUT_RAM_CONTROL, MPCC_OGAM, inst),\
-	SRII(MPCC_OGAM_MODE, MPCC_OGAM, inst)
-*/
-
 #define MPC_OUT_MUX_REG_LIST_DCN3_0(inst) \
 	MPC_OUT_MUX_COMMON_REG_LIST_DCN1_0(inst),\
 	SRII(CSC_MODE, MPC_OUT, inst),\
Signature · 1 line
2.36.0
author
#5 lore raw

PATCH v2 5/8 drm/amd/display: Add new DSC interface to disconnect from pipe

In reply to Wayne Lin

From: Eric Bernstein <[email protected]>

[Why & How]
Add new DSC interface to disconnect from pipe.

---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 11 +++++++++++
 drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h      |  1 +
 2 files changed, 12 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c +11 -0
index ef5c4c0f4d6c..c4f14aef0649 100644
@@ -45,6 +45,7 @@ static void dsc2_set_config(struct display_stream_compressor *dsc, const struct
 static bool dsc2_get_packed_pps(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg, uint8_t *dsc_packed_pps);
 static void dsc2_enable(struct display_stream_compressor *dsc, int opp_pipe);
 static void dsc2_disable(struct display_stream_compressor *dsc);
+static void dsc2_disconnect(struct display_stream_compressor *dsc);
 
 const struct dsc_funcs dcn20_dsc_funcs = {
 	.dsc_get_enc_caps = dsc2_get_enc_caps,
@@ -54,6 +55,7 @@ const struct dsc_funcs dcn20_dsc_funcs = {
 	.dsc_get_packed_pps = dsc2_get_packed_pps,
 	.dsc_enable = dsc2_enable,
 	.dsc_disable = dsc2_disable,
+	.dsc_disconnect = dsc2_disconnect,
 };
 
 /* Macro definitios for REG_SET macros*/
@@ -276,6 +278,15 @@ static void dsc2_disable(struct display_stream_compressor *dsc)
 		DSC_CLOCK_EN, 0);
 }
 
+static void dsc2_disconnect(struct display_stream_compressor *dsc)
+{
+	struct dcn20_dsc *dsc20 = TO_DCN20_DSC(dsc);
+
+	DC_LOG_DSC("disconnect DSC %d", dsc->inst);
+
+	REG_UPDATE(DSCRM_DSC_FORWARD_CONFIG,
+		DSCRM_DSC_FORWARD_EN, 0);
+}
 
 /* This module's internal functions */
 static void dsc_log_pps(struct display_stream_compressor *dsc, struct drm_dsc_config *pps)
drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h +1 -0
index 346f0ba73e86..d7b8d586b523 100644
@@ -104,6 +104,7 @@ struct dsc_funcs {
 			uint8_t *dsc_packed_pps);
 	void (*dsc_enable)(struct display_stream_compressor *dsc, int opp_pipe);
 	void (*dsc_disable)(struct display_stream_compressor *dsc);
+	void (*dsc_disconnect)(struct display_stream_compressor *dsc);
 };
 
 #endif
Signature · 1 line
2.36.0
author
#6 lore raw

PATCH v2 6/8 drm/amd/display: Clean up pixel format types

In reply to Wayne Lin

From: Aric Cyr <[email protected]>

[Why & How]
Equate the first non-subsampled video surface format to the enum SURFACE_PIXEL_FORMAT_SUBSAMPLE_END since it's not a real format.

---
 drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +2 -1
index c964f598755a..0c754cb0459e 100644
@@ -201,8 +201,9 @@ enum surface_pixel_format {
 	SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb,
 	SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr,
 	SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb,
+	SURFACE_PIXEL_FORMAT_SUBSAMPLE_END,
+	SURFACE_PIXEL_FORMAT_VIDEO_ACrYCb2101010 =
 		SURFACE_PIXEL_FORMAT_SUBSAMPLE_END,
-	SURFACE_PIXEL_FORMAT_VIDEO_ACrYCb2101010,
 	SURFACE_PIXEL_FORMAT_VIDEO_CrYCbA1010102,
 	SURFACE_PIXEL_FORMAT_VIDEO_AYCrCb8888,
 	SURFACE_PIXEL_FORMAT_INVALID
Signature · 1 line
2.36.0
author
#7 lore raw

PATCH v2 7/8 drm/amd/display: [FW Promotion] Release 0.0.115.0

In reply to Wayne Lin

From: Anthony Koo <[email protected]>

- Add new cmd for querying HPD state

---
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   | 35 ++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +34 -1
index e24f117e831e..385c28238beb 100644
@@ -350,7 +350,7 @@ union dmub_fw_boot_options {
 		uint32_t power_optimization: 1;
 		uint32_t diag_env: 1; /* 1 if diagnostic environment */
 		uint32_t gpint_scratch8: 1; /* 1 if GPINT is in scratch8*/
-		uint32_t usb4_cm_version: 1; /**< USB4 CM Version */
+		uint32_t usb4_cm_version: 1; /**< 1 CM support */
 
 		uint32_t reserved : 17; /**< reserved */
 	} bits; /**< boot bits */
@@ -654,6 +654,10 @@ enum dmub_cmd_type {
 	 * Command type used for getting usbc cable ID
 	 */
 	DMUB_CMD_GET_USBC_CABLE_ID = 81,
+	/**
+	 * Command type used to query HPD state.
+	 */
+	DMUB_CMD__QUERY_HPD_STATE = 82,
 	/**
 	 * Command type used for all VBIOS interface commands.
 	 */
@@ -1353,6 +1357,30 @@ struct dmub_rb_cmd_dp_set_config_reply {
 	struct set_config_reply_control_data set_config_reply_control;
 };
 
+/**
+ * Data passed from driver to FW in a DMUB_CMD__QUERY_HPD_STATE command.
+ */
+struct dmub_cmd_hpd_state_query_data {
+	uint8_t instance; /**< HPD instance or DPIA instance */
+	uint8_t result; /**< For returning HPD state */
+	enum aux_channel_type ch_type; /**< enum aux_channel_type */
+	enum aux_return_code_type status; /**< for returning the status of command */
+};
+
+/**
+ * Definition of a DMUB_CMD__QUERY_HPD_STATE command.
+ */
+struct dmub_rb_cmd_query_hpd_state {
+	/**
+	 * Command header.
+	 */
+	struct dmub_cmd_header header;
+	/**
+	 * Data passed from driver to FW in a DMUB_CMD__QUERY_HPD_STATE command.
+	 */
+	struct dmub_cmd_hpd_state_query_data data;
+};
+
 /*
  * Command IDs should be treated as stable ABI.
  * Do not reuse or modify IDs.
@@ -2757,6 +2785,11 @@ union dmub_rb_cmd {
 	 * Definition of a DMUB_CMD_GET_USBC_CABLE_ID command.
 	 */
 	struct dmub_rb_cmd_get_usbc_cable_id cable_id;
+
+	/**
+	 * Definition of a DMUB_CMD__QUERY_HPD_STATE command.
+	 */
+	struct dmub_rb_cmd_query_hpd_state query_hpd;
 };
 
 /**
Signature · 1 line
2.36.0
author
#8 lore raw

PATCH v2 8/8 drm/amd/display: 3.2.184

In reply to Wayne Lin

From: Aric Cyr <[email protected]>

This version brings along following fixes:
- Have optc3 function accessible to newer DCN
- Add CM boot option for USB4 tunneling
- Fix system hang issue when game resolution is changed
- Remove outdated register for dcn3+
- Add new DSC interface to disconnect from pipe
- Clean up pixel format types in enum surface_pixel_format

---
 drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index a649aec78868..942bfb8fd851 100644
@@ -47,7 +47,7 @@ struct aux_payload;
 struct set_config_cmd_payload;
 struct dmub_notification;
 
-#define DC_VER "3.2.183"
+#define DC_VER "3.2.184"
 
 #define MAX_SURFACES 3
 #define MAX_PLANES 6
Signature · 1 line
2.36.0