Skip to contentSkip to conversation

Small fixes before fixing MST

PATCH In review Lucas De Marchi 3 participants 10 messages Oct 15, 2019

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

v2 cover Small fixes before fixing MST

https://patchwork.freedesktop.org/series/67883/

v2:
- remove "drm/i915: cleanup unused returns on DP-MST": we should actually care more about the error handling here - left for later
- handle other comments on the series

Lucas De Marchi (5):
drm/i915: simplify setting of ddi_io_power_domain drm/i915: fix port checks for MST support on gen >= 11 drm/i915: remove extra new line on pipe_config mismatch drm/i915: add pipe id/name to pipe mismatch logs drm/i915: prettify MST debug message

 drivers/gpu/drm/i915/display/intel_ddi.c     | 43 ++-------------
 drivers/gpu/drm/i915/display/intel_display.c | 56 +++++++++++---------
 drivers/gpu/drm/i915/display/intel_dp.c      |  9 ++--
 drivers/gpu/drm/i915/display/intel_dp_mst.c  | 22 +++++---
 4 files changed, 52 insertions(+), 78 deletions(-)
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH v2 1/5 drm/i915: simplify setting of ddi_io_power_domain

Instead of the ever growing switch, just compute the ddi io power domain based on the port number.

---
 drivers/gpu/drm/i915/display/intel_ddi.c | 43 ++----------------------
 1 file changed, 3 insertions(+), 40 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +3 -40
index 6c1315c7bcde..b2776f6044ae 100644
@@ -4750,46 +4750,9 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
 		intel_encoder->update_complete = intel_ddi_update_complete;
 	}
 
-	switch (port) {
-	case PORT_A:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_A_IO;
-		break;
-	case PORT_B:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_B_IO;
-		break;
-	case PORT_C:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_C_IO;
-		break;
-	case PORT_D:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_D_IO;
-		break;
-	case PORT_E:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_E_IO;
-		break;
-	case PORT_F:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_F_IO;
-		break;
-	case PORT_G:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_G_IO;
-		break;
-	case PORT_H:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_H_IO;
-		break;
-	case PORT_I:
-		intel_dig_port->ddi_io_power_domain =
-			POWER_DOMAIN_PORT_DDI_I_IO;
-		break;
-	default:
-		MISSING_CASE(port);
-	}
+	WARN_ON(port > PORT_I);
+	intel_dig_port->ddi_io_power_domain = POWER_DOMAIN_PORT_DDI_A_IO +
+					      port - PORT_A;
 
 	if (init_dp) {
 		if (!intel_ddi_init_dp_connector(intel_dig_port))
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH v2 2/5 drm/i915: fix port checks for MST support on gen >= 11

In reply to Lucas De Marchi

Both Ice Lake and Elkhart Lake (gen 11) support MST on all external connections except DDI A. Tiger Lake (gen 12) supports on all external connections.

Move the check to happen inside intel_dp_mst_encoder_init() and add specific platform checks.

v2: Replace != with == checks for ports on gen < 11 (Ville)

---
 drivers/gpu/drm/i915/display/intel_dp.c     |  7 ++-----
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 22 +++++++++++++++------
 2 files changed, 18 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +2 -5
index 6594f2af1257..415d0f2c2751 100644
@@ -7271,11 +7271,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 		intel_connector->get_hw_state = intel_connector_get_hw_state;
 
 	/* init MST on ports that can support it */
-	if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
-	    (port == PORT_B || port == PORT_C ||
-	     port == PORT_D || port == PORT_F))
-		intel_dp_mst_encoder_init(intel_dig_port,
-					  intel_connector->base.base.id);
+	intel_dp_mst_encoder_init(intel_dig_port,
+				  intel_connector->base.base.id);
 
 	if (!intel_edp_init_connector(intel_dp, intel_connector)) {
 		intel_dp_aux_fini(intel_dp);
drivers/gpu/drm/i915/display/intel_dp_mst.c +16 -6
index 2203be28ea01..ea062fea8a44 100644
@@ -655,21 +655,31 @@ intel_dp_mst_encoder_active_links(struct intel_digital_port *intel_dig_port)
 int
 intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_base_id)
 {
+	struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev);
 	struct intel_dp *intel_dp = &intel_dig_port->dp;
-	struct drm_device *dev = intel_dig_port->base.base.dev;
+	enum port port = intel_dig_port->base.port;
 	int ret;
 
-	intel_dp->can_mst = true;
+	if (!HAS_DP_MST(i915) || intel_dp_is_edp(intel_dp))
+		return 0;
+
+	if (INTEL_GEN(i915) <= 11 && port == PORT_A)
+		return 0;
+
+	if (INTEL_GEN(i915) < 11 && port == PORT_E)
+		return 0;
+
 	intel_dp->mst_mgr.cbs = &mst_cbs;
 
 	/* create encoders */
 	intel_dp_create_fake_mst_encoders(intel_dig_port);
-	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev,
+	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, &i915->drm,
 					   &intel_dp->aux, 16, 3, conn_base_id);
-	if (ret) {
-		intel_dp->can_mst = false;
+	if (ret)
 		return ret;
-	}
+
+	intel_dp->can_mst = true;
+
 	return 0;
 }
 
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 2/5
#3 lore raw

Re: [PATCH v3 v2 2/5] drm/i915: fix port checks for MST support on gen >= 11

Quoted 43 lines · Lucas De Marchi

Both Ice Lake and Elkhart Lake (gen 11) support MST on all external connections except DDI A. Tiger Lake (gen 12) supports on all external connections.

Move the check to happen inside intel_dp_mst_encoder_init() and add specific platform checks.

v2: Replace != with == checks for ports on gen < 11 (Ville)

---
 drivers/gpu/drm/i915/display/intel_dp.c     |  7 ++-----
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 22 +++++++++++++++------
 2 files changed, 18 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +2 -5
index 6594f2af1257..415d0f2c2751 100644
@@ -7271,11 +7271,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 		intel_connector->get_hw_state = intel_connector_get_hw_state;
 
 	/* init MST on ports that can support it */
-	if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
-	    (port == PORT_B || port == PORT_C ||
-	     port == PORT_D || port == PORT_F))
-		intel_dp_mst_encoder_init(intel_dig_port,
-					  intel_connector->base.base.id);
+	intel_dp_mst_encoder_init(intel_dig_port,
+				  intel_connector->base.base.id);
 
 	if (!intel_edp_init_connector(intel_dp, intel_connector)) {
 		intel_dp_aux_fini(intel_dp);
drivers/gpu/drm/i915/display/intel_dp_mst.c +1 -0
index 2203be28ea01..ea062fea8a44 100644
@@ -655,21 +655,31 @@ intel_dp_mst_encoder_active_links(struct intel_digital_port *intel_dig_port)
 int
 intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_base_id)
 {
+	struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev);
 	struct intel_dp *intel_dp = &intel_dig_port->dp;

drivers/gpu/drm/i915/display/intel_dp_mst.c intel_dp_mst_encoder_active_links(struct intel_digital_port *intel_dig_port) · line 667

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +6 -2
-	struct drm_device *dev = intel_dig_port->base.base.dev;
+	enum port port = intel_dig_port->base.port;
 	int ret;
 
-	intel_dp->can_mst = true;
+	if (!HAS_DP_MST(i915) || intel_dp_is_edp(intel_dp))
+		return 0;
+
+	if (INTEL_GEN(i915) <= 11 && port == PORT_A)
+		return 0;

gen<12

with that

Quoted 24 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +9 -4
+
+	if (INTEL_GEN(i915) < 11 && port == PORT_E)
+		return 0;
+
 	intel_dp->mst_mgr.cbs = &mst_cbs;
 
 	/* create encoders */
 	intel_dp_create_fake_mst_encoders(intel_dig_port);
-	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev,
+	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, &i915->drm,
 					   &intel_dp->aux, 16, 3, conn_base_id);
-	if (ret) {
-		intel_dp->can_mst = false;
+	if (ret)
 		return ret;
-	}
+
+	intel_dp->can_mst = true;
+
 	return 0;
 }
 
Signature · 1 line
2.23.0
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

PATCH v2 3/5 drm/i915: remove extra new line on pipe_config mismatch

In reply to Lucas De Marchi

The new line is already added by pipe_config_mismatch(), so the callers shouldn't add it.

---
 drivers/gpu/drm/i915/display/intel_display.c | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +11 -11
index 3cf39fc153b3..e71ec9d96c75 100644
@@ -12581,7 +12581,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 #define PIPE_CONF_CHECK_X(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_mismatch(fastset, __stringify(name), \
-				     "(expected 0x%08x, found 0x%08x)\n", \
+				     "(expected 0x%08x, found 0x%08x)", \
 				     current_config->name, \
 				     pipe_config->name); \
 		ret = false; \
@@ -12591,7 +12591,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 #define PIPE_CONF_CHECK_I(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_mismatch(fastset, __stringify(name), \
-				     "(expected %i, found %i)\n", \
+				     "(expected %i, found %i)", \
 				     current_config->name, \
 				     pipe_config->name); \
 		ret = false; \
@@ -12601,7 +12601,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 #define PIPE_CONF_CHECK_BOOL(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_mismatch(fastset, __stringify(name), \
-				     "(expected %s, found %s)\n", \
+				     "(expected %s, found %s)", \
 				     yesno(current_config->name), \
 				     yesno(pipe_config->name)); \
 		ret = false; \
@@ -12618,7 +12618,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 		PIPE_CONF_CHECK_BOOL(name); \
 	} else { \
 		pipe_config_mismatch(fastset, __stringify(name), \
-				     "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)\n", \
+				     "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)", \
 				     yesno(current_config->name), \
 				     yesno(pipe_config->name)); \
 		ret = false; \
@@ -12628,7 +12628,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 #define PIPE_CONF_CHECK_P(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_mismatch(fastset, __stringify(name), \
-				     "(expected %p, found %p)\n", \
+				     "(expected %p, found %p)", \
 				     current_config->name, \
 				     pipe_config->name); \
 		ret = false; \
@@ -12641,7 +12641,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 				    !fastset)) { \
 		pipe_config_mismatch(fastset, __stringify(name), \
 				     "(expected tu %i gmch %i/%i link %i/%i, " \
-				     "found tu %i, gmch %i/%i link %i/%i)\n", \
+				     "found tu %i, gmch %i/%i link %i/%i)", \
 				     current_config->name.tu, \
 				     current_config->name.gmch_m, \
 				     current_config->name.gmch_n, \
@@ -12669,7 +12669,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 		pipe_config_mismatch(fastset, __stringify(name), \
 				     "(expected tu %i gmch %i/%i link %i/%i, " \
 				     "or tu %i gmch %i/%i link %i/%i, " \
-				     "found tu %i, gmch %i/%i link %i/%i)\n", \
+				     "found tu %i, gmch %i/%i link %i/%i)", \
 				     current_config->name.tu, \
 				     current_config->name.gmch_m, \
 				     current_config->name.gmch_n, \
@@ -12692,7 +12692,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 #define PIPE_CONF_CHECK_FLAGS(name, mask) do { \
 	if ((current_config->name ^ pipe_config->name) & (mask)) { \
 		pipe_config_mismatch(fastset, __stringify(name), \
-				     "(%x) (expected %i, found %i)\n", \
+				     "(%x) (expected %i, found %i)", \
 				     (mask), \
 				     current_config->name & (mask), \
 				     pipe_config->name & (mask)); \
@@ -12703,7 +12703,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 #define PIPE_CONF_CHECK_CLOCK_FUZZY(name) do { \
 	if (!intel_fuzzy_clock_check(current_config->name, pipe_config->name)) { \
 		pipe_config_mismatch(fastset, __stringify(name), \
-				     "(expected %i, found %i)\n", \
+				     "(expected %i, found %i)", \
 				     current_config->name, \
 				     pipe_config->name); \
 		ret = false; \
@@ -12723,7 +12723,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 #define PIPE_CONF_CHECK_COLOR_LUT(name1, name2, bit_precision) do { \
 	if (current_config->name1 != pipe_config->name1) { \
 		pipe_config_mismatch(fastset, __stringify(name1), \
-				"(expected %i, found %i, won't compare lut values)\n", \
+				"(expected %i, found %i, won't compare lut values)", \
 				current_config->name1, \
 				pipe_config->name1); \
 		ret = false;\
@@ -12732,7 +12732,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 					pipe_config->name2, pipe_config->name1, \
 					bit_precision)) { \
 			pipe_config_mismatch(fastset, __stringify(name2), \
-					"hw_state doesn't match sw_state\n"); \
+					"hw_state doesn't match sw_state"); \
 			ret = false; \
 		} \
 	} \
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

PATCH v2 4/5 drm/i915: add pipe id/name to pipe mismatch logs

In reply to Lucas De Marchi

This way it's easier to figure out what didn't match when we have multiple pipes enabled.

v2: pass drm_crtc and use the more common [CRTC:%d:%s] format

    (Ville)
---
 drivers/gpu/drm/i915/display/intel_display.c | 34 +++++++++++---------
 1 file changed, 19 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +19 -15
index e71ec9d96c75..cd0f600e0205 100644
@@ -12526,8 +12526,9 @@ pipe_config_infoframe_mismatch(struct drm_i915_private *dev_priv,
 	}
 }
 
-static void __printf(3, 4)
-pipe_config_mismatch(bool fastset, const char *name, const char *format, ...)
+static void __printf(4, 5)
+pipe_config_mismatch(bool fastset, const struct drm_crtc *crtc,
+		     const char *name, const char *format, ...)
 {
 	struct va_format vaf;
 	va_list args;
@@ -12537,9 +12538,11 @@ pipe_config_mismatch(bool fastset, const char *name, const char *format, ...)
 	vaf.va = &args;
 
 	if (fastset)
-		DRM_DEBUG_KMS("fastset mismatch in %s %pV\n", name, &vaf);
+		DRM_DEBUG_KMS("[CRTC:%d:%s] fastset mismatch in %s %pV\n",
+			      crtc->base.id, crtc->name, name, &vaf);
 	else
-		DRM_ERROR("mismatch in %s %pV\n", name, &vaf);
+		DRM_ERROR("[CRTC:%d:%s] mismatch in %s %pV\n",
+			  crtc->base.id, crtc->name, name, &vaf);
 
 	va_end(args);
 }
@@ -12567,6 +12570,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 			  bool fastset)
 {
 	struct drm_i915_private *dev_priv = to_i915(current_config->base.crtc->dev);
+	const struct drm_crtc *crtc = pipe_config->base.crtc;
 	bool ret = true;
 	u32 bp_gamma = 0;
 	bool fixup_inherited = fastset &&
@@ -12580,7 +12584,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_X(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected 0x%08x, found 0x%08x)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12590,7 +12594,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_I(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected %i, found %i)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12600,7 +12604,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_BOOL(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc,  __stringify(name), \
 				     "(expected %s, found %s)", \
 				     yesno(current_config->name), \
 				     yesno(pipe_config->name)); \
@@ -12617,7 +12621,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 	if (!fixup_inherited || (!current_config->name && !pipe_config->name)) { \
 		PIPE_CONF_CHECK_BOOL(name); \
 	} else { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)", \
 				     yesno(current_config->name), \
 				     yesno(pipe_config->name)); \
@@ -12627,7 +12631,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_P(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected %p, found %p)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12639,7 +12643,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 	if (!intel_compare_link_m_n(&current_config->name, \
 				    &pipe_config->name,\
 				    !fastset)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected tu %i gmch %i/%i link %i/%i, " \
 				     "found tu %i, gmch %i/%i link %i/%i)", \
 				     current_config->name.tu, \
@@ -12666,7 +12670,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 				    &pipe_config->name, !fastset) && \
 	    !intel_compare_link_m_n(&current_config->alt_name, \
 				    &pipe_config->name, !fastset)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected tu %i gmch %i/%i link %i/%i, " \
 				     "or tu %i gmch %i/%i link %i/%i, " \
 				     "found tu %i, gmch %i/%i link %i/%i)", \
@@ -12691,7 +12695,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_FLAGS(name, mask) do { \
 	if ((current_config->name ^ pipe_config->name) & (mask)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(%x) (expected %i, found %i)", \
 				     (mask), \
 				     current_config->name & (mask), \
@@ -12702,7 +12706,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_CLOCK_FUZZY(name) do { \
 	if (!intel_fuzzy_clock_check(current_config->name, pipe_config->name)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected %i, found %i)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12722,7 +12726,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_COLOR_LUT(name1, name2, bit_precision) do { \
 	if (current_config->name1 != pipe_config->name1) { \
-		pipe_config_mismatch(fastset, __stringify(name1), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name1), \
 				"(expected %i, found %i, won't compare lut values)", \
 				current_config->name1, \
 				pipe_config->name1); \
@@ -12731,7 +12735,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 		if (!intel_color_lut_equal(current_config->name2, \
 					pipe_config->name2, pipe_config->name1, \
 					bit_precision)) { \
-			pipe_config_mismatch(fastset, __stringify(name2), \
+			pipe_config_mismatch(fastset, crtc, __stringify(name2), \
 					"hw_state doesn't match sw_state"); \
 			ret = false; \
 		} \
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 4/5
#6 lore raw

Re: [PATCH v3 v2 4/5] drm/i915: add pipe id/name to pipe mismatch logs

Quoted 42 lines · Lucas De Marchi

This way it's easier to figure out what didn't match when we have multiple pipes enabled.

v2: pass drm_crtc and use the more common [CRTC:%d:%s] format

    (Ville)
---
 drivers/gpu/drm/i915/display/intel_display.c | 34 +++++++++++---------
 1 file changed, 19 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +7 -4
index e71ec9d96c75..cd0f600e0205 100644
@@ -12526,8 +12526,9 @@ pipe_config_infoframe_mismatch(struct drm_i915_private *dev_priv,
 	}
 }
 
-static void __printf(3, 4)
-pipe_config_mismatch(bool fastset, const char *name, const char *format, ...)
+static void __printf(4, 5)
+pipe_config_mismatch(bool fastset, const struct drm_crtc *crtc,
+		     const char *name, const char *format, ...)
 {
 	struct va_format vaf;
 	va_list args;
@@ -12537,9 +12538,11 @@ pipe_config_mismatch(bool fastset, const char *name, const char *format, ...)
 	vaf.va = &args;
 
 	if (fastset)
-		DRM_DEBUG_KMS("fastset mismatch in %s %pV\n", name, &vaf);
+		DRM_DEBUG_KMS("[CRTC:%d:%s] fastset mismatch in %s %pV\n",
+			      crtc->base.id, crtc->name, name, &vaf);
 	else
-		DRM_ERROR("mismatch in %s %pV\n", name, &vaf);
+		DRM_ERROR("[CRTC:%d:%s] mismatch in %s %pV\n",
+			  crtc->base.id, crtc->name, name, &vaf);
 
 	va_end(args);
 }

drivers/gpu/drm/i915/display/intel_display.c intel_pipe_config_compare(const struct intel_crtc_state *current_config, · line 12573

Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +1 -0
@@ -12567,6 +12570,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 			  bool fastset)
 {
 	struct drm_i915_private *dev_priv = to_i915(current_config->base.crtc->dev);
+	const struct drm_crtc *crtc = pipe_config->base.crtc;

The only thing we really const these days is the states. So I'd drop the const here.

Also pls make it struct intel_crtc since we're trying to get rid of this mess with both drm_ and intel_ types getting mixed around randomly.

with that

Quoted 104 lines
drivers/gpu/drm/i915/display/intel_display.c +11 -11
 	bool ret = true;
 	u32 bp_gamma = 0;
 	bool fixup_inherited = fastset &&
@@ -12580,7 +12584,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_X(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected 0x%08x, found 0x%08x)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12590,7 +12594,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_I(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected %i, found %i)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12600,7 +12604,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_BOOL(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc,  __stringify(name), \
 				     "(expected %s, found %s)", \
 				     yesno(current_config->name), \
 				     yesno(pipe_config->name)); \
@@ -12617,7 +12621,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 	if (!fixup_inherited || (!current_config->name && !pipe_config->name)) { \
 		PIPE_CONF_CHECK_BOOL(name); \
 	} else { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)", \
 				     yesno(current_config->name), \
 				     yesno(pipe_config->name)); \
@@ -12627,7 +12631,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_P(name) do { \
 	if (current_config->name != pipe_config->name) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected %p, found %p)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12639,7 +12643,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 	if (!intel_compare_link_m_n(&current_config->name, \
 				    &pipe_config->name,\
 				    !fastset)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected tu %i gmch %i/%i link %i/%i, " \
 				     "found tu %i, gmch %i/%i link %i/%i)", \
 				     current_config->name.tu, \
@@ -12666,7 +12670,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 				    &pipe_config->name, !fastset) && \
 	    !intel_compare_link_m_n(&current_config->alt_name, \
 				    &pipe_config->name, !fastset)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected tu %i gmch %i/%i link %i/%i, " \
 				     "or tu %i gmch %i/%i link %i/%i, " \
 				     "found tu %i, gmch %i/%i link %i/%i)", \
@@ -12691,7 +12695,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_FLAGS(name, mask) do { \
 	if ((current_config->name ^ pipe_config->name) & (mask)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(%x) (expected %i, found %i)", \
 				     (mask), \
 				     current_config->name & (mask), \
@@ -12702,7 +12706,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_CLOCK_FUZZY(name) do { \
 	if (!intel_fuzzy_clock_check(current_config->name, pipe_config->name)) { \
-		pipe_config_mismatch(fastset, __stringify(name), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name), \
 				     "(expected %i, found %i)", \
 				     current_config->name, \
 				     pipe_config->name); \
@@ -12722,7 +12726,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 
 #define PIPE_CONF_CHECK_COLOR_LUT(name1, name2, bit_precision) do { \
 	if (current_config->name1 != pipe_config->name1) { \
-		pipe_config_mismatch(fastset, __stringify(name1), \
+		pipe_config_mismatch(fastset, crtc, __stringify(name1), \
 				"(expected %i, found %i, won't compare lut values)", \
 				current_config->name1, \
 				pipe_config->name1); \
@@ -12731,7 +12735,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 		if (!intel_color_lut_equal(current_config->name2, \
 					pipe_config->name2, pipe_config->name1, \
 					bit_precision)) { \
-			pipe_config_mismatch(fastset, __stringify(name2), \
+			pipe_config_mismatch(fastset, crtc, __stringify(name2), \
 					"hw_state doesn't match sw_state"); \
 			ret = false; \
 		} \
Signature · 1 line
2.23.0
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw

PATCH v2 5/5 drm/i915: prettify MST debug message

In reply to Lucas De Marchi

s/?/:/ so it gets correctly colored by dmesg.

---
 drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
index 415d0f2c2751..abcaffd75182 100644
@@ -4450,7 +4450,7 @@ intel_dp_configure_mst(struct intel_dp *intel_dp)
 		&dp_to_dig_port(intel_dp)->base;
 	bool sink_can_mst = intel_dp_sink_can_mst(intel_dp);
 
-	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support? port: %s, sink: %s, modparam: %s\n",
+	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n",
 		      encoder->base.base.id, encoder->base.name,
 		      yesno(intel_dp->can_mst), yesno(sink_can_mst),
 		      yesno(i915_modparams.enable_dp_mst));
Signature · 6 lines
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

✗ Fi.CI.CHECKPATCH: warning for Small fixes before fixing MST (rev2)

In reply to Lucas De Marchi
== Series Details ==

== Series Details ==

Series: Small fixes before fixing MST (rev2)
URL : https://patchwork.freedesktop.org/series/67883/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
dd2c2adfc049 drm/i915: simplify setting of ddi_io_power_domain
7d4e878c74b2 drm/i915: fix port checks for MST support on gen >= 11
851e808be6ce drm/i915: remove extra new line on pipe_config mismatch
-:52: WARNING:LONG_LINE: line over 100 characters
#52: FILE: drivers/gpu/drm/i915/display/intel_display.c:12607:
+				     "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)", \

total: 0 errors, 1 warnings, 0 checks, 88 lines checked 28fedf7760f7 drm/i915: add pipe id/name to pipe mismatch logs 3b66197dbde8 drm/i915: prettify MST debug message

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

✗ Fi.CI.BAT: failure for Small fixes before fixing MST (rev2)

In reply to Lucas De Marchi
== Series Details ==

== Series Details ==

Series: Small fixes before fixing MST (rev2)
URL : https://patchwork.freedesktop.org/series/67883/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7099 -> Patchwork_14818
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_14818 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_14818, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_14818:

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@reload-no-display:
- fi-bwr-2160: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-bwr-2160/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-bwr-2160/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_14818 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_reloc@basic-gtt-noreloc:
- fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([fdo#107724]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-icl-u3/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][5] -> [FAIL][6] ([fdo#111407])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-kbl-7500u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@debugfs_test@read_all_entries:
- {fi-tgl-u}: [INCOMPLETE][7] -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-tgl-u/igt@debugfs_test@read_all_entries.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-tgl-u/igt@debugfs_test@read_all_entries.html

* igt@gem_basic@bad-close:
- fi-skl-6770hq: [DMESG-WARN][9] ([fdo#105541]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-skl-6770hq/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-skl-6770hq/igt@[email protected]

* igt@gem_ctx_switch@legacy-render:
- fi-bxt-dsi: [INCOMPLETE][11] ([fdo#103927] / [fdo#111381]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-bxt-dsi/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-bxt-dsi/igt@[email protected]

* igt@gem_ringfill@basic-default-fd:
- fi-icl-u3: [DMESG-WARN][13] ([fdo#107724]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-icl-u3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-icl-u3/igt@[email protected]

* igt@gem_wait@basic-busy-all:
- {fi-tgl-u2}: [INCOMPLETE][15] -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-tgl-u2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-tgl-u2/igt@[email protected]

* igt@i915_selftest@live_gem_contexts:
- {fi-icl-dsi}: [DMESG-FAIL][17] -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-icl-dsi/igt@i915_selftest@live_gem_contexts.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-icl-dsi/igt@i915_selftest@live_gem_contexts.html

* igt@kms_busy@basic-flip-a:
- fi-icl-u2: [TIMEOUT][19] ([fdo#111800]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-icl-u2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-icl-u2/igt@[email protected]

* igt@prime_self_import@basic-llseek-bad:
- {fi-icl-dsi}: [DMESG-WARN][21] ([fdo#106107]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7099/fi-icl-dsi/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/fi-icl-dsi/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105541]: https://bugs.freedesktop.org/show_bug.cgi?id=105541
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111800]: https://bugs.freedesktop.org/show_bug.cgi?id=111800

Participating hosts (52 -> 45)
------------------------------

Additional (1): fi-hsw-peppy
Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7099 -> Patchwork_14818

CI-20190529: 20190529
CI_DRM_7099: fccd0abc9c05536751c60aabe5710c173fb8ffa6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5231: e293051f8f99c72cb01d21e4b73a5928ea351eb3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14818: 3b66197dbde8f3e0bf1526f0a7f5685fbfa8551f @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

3b66197dbde8 drm/i915: prettify MST debug message 28fedf7760f7 drm/i915: add pipe id/name to pipe mismatch logs 851e808be6ce drm/i915: remove extra new line on pipe_config mismatch 7d4e878c74b2 drm/i915: fix port checks for MST support on gen >= 11 dd2c2adfc049 drm/i915: simplify setting of ddi_io_power_domain

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14818/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx