All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, jani.nikula@intel.com,
	"Arun R Murthy" <arun.r.murthy@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: [RFC 3/4] drm/i915/mst: improve debug logging of DP MST mode detect
Date: Fri,  2 Feb 2024 16:05:33 +0200	[thread overview]
Message-ID: <5285d255ef60c53a308140feb4bc5d931d829d5d.1706882591.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1706882590.git.jani.nikula@intel.com>

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@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 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


  parent reply	other threads:[~2024-02-02 14:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 14:05 [RFC 0/4] drm/i915/mst: enable MST mode for 128b/132b single-stream sideband Jani Nikula
2024-02-02 14:05 ` [RFC 1/4] drm/mst: read sideband messaging cap Jani Nikula
2024-02-02 15:46   ` Ville Syrjälä
2024-02-02 14:05 ` [RFC 2/4] drm/i915/dp: refactor DP MST detection and configuration Jani Nikula
2024-02-02 15:51   ` Ville Syrjälä
2024-02-12 15:25     ` Jani Nikula
2024-02-12 15:46       ` Ville Syrjälä
2024-02-02 14:05 ` Jani Nikula [this message]
2024-02-02 14:05 ` [RFC 4/4] drm/i915/mst: enable MST mode for 128b/132b single-stream sideband Jani Nikula
2024-02-02 15:54   ` Ville Syrjälä
2024-02-12 15:30     ` Jani Nikula
2024-02-12 15:36       ` Ville Syrjälä
2024-02-05  9:07 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/mst: enable MST mode for 128b/132b single-stream sideband (rev2) Patchwork
2024-02-05  9:07 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-02-05  9:26 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-05 11:49 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5285d255ef60c53a308140feb4bc5d931d829d5d.1706882591.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.