All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Ser <simon.ser@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: add Type-C port to encoder name
Date: Thu, 29 Aug 2019 14:59:56 +0300	[thread overview]
Message-ID: <20190829115957.30685-1-simon.ser@intel.com> (raw)

This patch adds the Type-C port number to the encoder name. This is an
alternative to [1].

[1]: https://patchwork.freedesktop.org/series/65695/

Signed-off-by: Simon Ser <simon.ser@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 8eb2b3ec01ed..e543d44a7105 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4278,6 +4278,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
 	bool init_hdmi, init_dp, init_lspcon = false;
 	enum pipe pipe;
 	enum phy phy = intel_port_to_phy(dev_priv, port);
+	enum tc_port tc_port;
+	char tc_suffix[128];
 
 	init_hdmi = port_info->supports_dvi || port_info->supports_hdmi;
 	init_dp = port_info->supports_dp;
@@ -4307,8 +4309,15 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
 	intel_encoder = &intel_dig_port->base;
 	encoder = &intel_encoder->base;
 
+	tc_port = intel_port_to_tc(dev_priv, port);
+	if (tc_port != PORT_TC_NONE)
+		snprintf(tc_suffix, sizeof(tc_suffix), "/TC#%d", tc_port + 1);
+	else
+		tc_suffix[0] = '\0';
+
 	drm_encoder_init(&dev_priv->drm, encoder, &intel_ddi_funcs,
-			 DRM_MODE_ENCODER_TMDS, "DDI %c", port_name(port));
+			 DRM_MODE_ENCODER_TMDS, "DDI %c%s", port_name(port),
+			 tc_suffix);
 
 	intel_encoder->hotplug = intel_ddi_hotplug;
 	intel_encoder->compute_output_type = intel_ddi_compute_output_type;
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2019-08-29 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 11:59 Simon Ser [this message]
2019-08-29 12:49 ` ✗ Fi.CI.BAT: failure for drm/i915: add Type-C port to encoder name Patchwork
2019-08-30  6:57 ` [PATCH] " Jani Nikula
2019-08-30 12:40   ` Ville Syrjälä
2019-08-30  9:35 ` ✓ Fi.CI.BAT: success for drm/i915: add Type-C port to encoder name (rev2) Patchwork
2019-08-31  2:48 ` ✗ 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=20190829115957.30685-1-simon.ser@intel.com \
    --to=simon.ser@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.