[RFC 3/4] drm/i915/mst: improve debug logging of DP MST mode detect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Debug log the sink's MST capability, including single-stream sideband
messaging support, and the decision whether to enable MST mode or not.

Cc: Arun R Murthy <arun.r.murthy@xxxxxxxxx>
Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index e0b8ee6bde79..4dd9c50226d1 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4008,18 +4008,27 @@ static bool intel_dp_mst_detect(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
 	struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
-	bool sink_can_mst = drm_dp_read_mst_cap(&intel_dp->aux, intel_dp->dpcd) == DP_MST_CAPABLE;
+	enum drm_dp_mst_mode sink_mst_mode;
+	const char *mst_mode_str;
+
+	sink_mst_mode = drm_dp_read_mst_cap(&intel_dp->aux, intel_dp->dpcd);
+
+	if (sink_mst_mode == DP_MST_SIDEBAND_MSG)
+		mst_mode_str = "single-stream sideband messaging";
+	else
+		mst_mode_str = str_yes_no(sink_mst_mode == DP_MST_CAPABLE);
 
 	intel_dp->is_mst = i915->display.params.enable_dp_mst &&
 		intel_dp_mst_source_support(intel_dp) &&
-		sink_can_mst;
+		sink_mst_mode == DP_MST_CAPABLE;
 
 	drm_dbg_kms(&i915->drm,
-		    "[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n",
+		    "[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s -> enable: %s\n",
 		    encoder->base.base.id, encoder->base.name,
 		    str_yes_no(intel_dp_mst_source_support(intel_dp)),
-		    str_yes_no(sink_can_mst),
-		    str_yes_no(i915->display.params.enable_dp_mst));
+		    mst_mode_str,
+		    str_yes_no(i915->display.params.enable_dp_mst),
+		    str_yes_no(intel_dp->is_mst));
 
 	return intel_dp->is_mst;
 }
-- 
2.39.2




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux