Skip to contentSkip to conversation

drm/i915: add port info to debugfs

PATCH In review Simon Ser 3 participants 3 messages Aug 21, 2019

Subsystems (2)
lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 drm/i915: add port info to debugfs

This patch adds a line with the port name to connectors in debugfs/i916_display_info. A hint is printed if the port is type-C.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +9 -0
index b39226d7f8d2..718a337c8f0a 100644
@@ -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,13 @@ static void intel_connector_info(struct seq_file *m,
 	if (!intel_encoder)
 		return;
 
+	if (intel_encoder->port != PORT_NONE) {
+		tc_port = intel_port_to_tc(i915, intel_encoder->port);
+		seq_printf(m, "\tport: %c%s\n",
+			   port_name(intel_encoder->port),
+			   tc_port != PORT_TC_NONE ? " (type-C)" : "");
+	}
+
 	switch (connector->connector_type) {
 	case DRM_MODE_CONNECTOR_DisplayPort:
 	case DRM_MODE_CONNECTOR_eDP:

--
2.22.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw
Quoted 26 lines · Simon Ser

This patch adds a line with the port name to connectors in debugfs/i916_display_info. A hint is printed if the port is type-C.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +2 -0
index b39226d7f8d2..718a337c8f0a 100644
@@ -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,

drivers/gpu/drm/i915/i915_debugfs.c static void intel_connector_info(struct seq_file *m, · line 2587

Quoted 8 lines
drivers/gpu/drm/i915/i915_debugfs.c +5 -0
@@ -2578,6 +2580,13 @@ static void intel_connector_info(struct seq_file *m,
 	if (!intel_encoder)
 		return;
 
+	if (intel_encoder->port != PORT_NONE) {
+		tc_port = intel_port_to_tc(i915, intel_encoder->port);
+		seq_printf(m, "\tport: %c%s\n",
+			   port_name(intel_encoder->port),
+			   tc_port != PORT_TC_NONE ? " (type-C)" : "");

for Type-C ports could you also print the type-C port index like

	port: C/TC#1

? See intel_tc_port_init().

Quoted 8 lines
drivers/gpu/drm/i915/i915_debugfs.c +2 -1
+	}
+
 	switch (connector->connector_type) {
 	case DRM_MODE_CONNECTOR_DisplayPort:
 	case DRM_MODE_CONNECTOR_eDP:
--

2.22.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Simon Ser
Quoted 2 lines · Simon Ser

This patch adds a line with the port name to connectors in debugfs/i916_display_info. A hint is printed if the port is type-C.

Typo here, should be i915_display_info

Manasi

Quoted 40 lines
---
 drivers/gpu/drm/i915/i915_debugfs.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +9 -1
index b39226d7f8d2..718a337c8f0a 100644
@@ -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,13 @@ static void intel_connector_info(struct seq_file *m,
 	if (!intel_encoder)
 		return;
 
+	if (intel_encoder->port != PORT_NONE) {
+		tc_port = intel_port_to_tc(i915, intel_encoder->port);
+		seq_printf(m, "\tport: %c%s\n",
+			   port_name(intel_encoder->port),
+			   tc_port != PORT_TC_NONE ? " (type-C)" : "");
+	}
+
 	switch (connector->connector_type) {
 	case DRM_MODE_CONNECTOR_DisplayPort:
 	case DRM_MODE_CONNECTOR_eDP:
--

2.22.1

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel