From patchwork Fri Aug 23 09:49:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ser, Simon" X-Patchwork-Id: 11111179 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 80B2F1395 for ; Fri, 23 Aug 2019 09:49:10 +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 691E9233A0 for ; Fri, 23 Aug 2019 09:49:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 691E9233A0 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 0AFB46EC4C; Fri, 23 Aug 2019 09:49:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45B6C6EC4C for ; Fri, 23 Aug 2019 09:49:07 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2019 02:49:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,420,1559545200"; d="scan'208";a="180647068" Received: from wo73065l01s008.fi.intel.com ([10.237.72.188]) by fmsmga007.fm.intel.com with ESMTP; 23 Aug 2019 02:49:05 -0700 From: Simon Ser To: intel-gfx@lists.freedesktop.org Date: Fri, 23 Aug 2019 12:49:46 +0300 Message-Id: <20190823094946.5708-1-simon.ser@intel.com> X-Mailer: git-send-email 2.22.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v2] drm/i915: add port info to debugfs 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: , Cc: Manasi Navare Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This patch adds a line with the port name to connectors in debugfs/i915_debug_info. If the port is Type-C, the Type-C port number is printed too. Signed-off-by: Simon Ser Cc: Imre Deak Cc: Manasi Navare Reviewed-by: Imre Deak --- Resending v2 to the correct mailing list. drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.22.1 diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index b39226d7f8d2..4ba508c954f8 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2557,9 +2557,11 @@ static void intel_lvds_info(struct seq_file *m, static void intel_connector_info(struct seq_file *m, struct drm_connector *connector) { + struct drm_i915_private *i915 = to_i915(connector->dev); struct intel_connector *intel_connector = to_intel_connector(connector); struct intel_encoder *intel_encoder = intel_connector->encoder; struct drm_display_mode *mode; + enum tc_port tc_port; seq_printf(m, "connector %d: type %s, status: %s\n", connector->base.id, connector->name, @@ -2578,6 +2580,14 @@ static void intel_connector_info(struct seq_file *m, if (!intel_encoder) return; + if (intel_encoder->port != PORT_NONE) { + seq_printf(m, "\tport: %c", port_name(intel_encoder->port)); + tc_port = intel_port_to_tc(i915, intel_encoder->port); + if (tc_port != PORT_TC_NONE) + seq_printf(m, "/TC#%d", tc_port + 1); + seq_printf(m, "\n"); + } + switch (connector->connector_type) { case DRM_MODE_CONNECTOR_DisplayPort: case DRM_MODE_CONNECTOR_eDP: