From patchwork Thu Aug 29 11:59:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ser, Simon" X-Patchwork-Id: 11121251 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FBC31399 for ; Thu, 29 Aug 2019 11:59:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08B9A215EA for ; Thu, 29 Aug 2019 11:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08B9A215EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1214289346; Thu, 29 Aug 2019 11:59:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 08E6489346 for ; Thu, 29 Aug 2019 11:59:00 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2019 04:58:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,442,1559545200"; d="scan'208";a="197790835" Received: from wo73065l01s008.fi.intel.com ([10.237.72.188]) by fmsmga001.fm.intel.com with ESMTP; 29 Aug 2019 04:58:58 -0700 From: Simon Ser To: intel-gfx@lists.freedesktop.org Date: Thu, 29 Aug 2019 14:59:56 +0300 Message-Id: <20190829115957.30685-1-simon.ser@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: add Type-C port to encoder name X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 Cc: Imre Deak Cc: Manasi Navare Cc: Ville Syrjälä --- 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;