Message ID | 20190823094946.5708-1-simon.ser@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] drm/i915: add port info to debugfs | expand |
On Fri, Aug 23, 2019 at 12:49:46PM +0300, Simon Ser wrote: > 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 <simon.ser@intel.com> > Cc: Imre Deak <imre.deak@intel.com> > Cc: Manasi Navare <nanasi.d.navare@intel.com> > Reviewed-by: Imre Deak <imre.deak@intel.com> > --- > > Resending v2 to the correct mailing list. Test results were dropped somewhere, there is one failure https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14164/fi-icl-u2/igt@kms_chamelium@dp-edid-read.html but it looks to be the unrelated https://bugs.freedesktop.org/show_bug.cgi?id=111474 I asked Lakshmi to update the cibug filter for the bug. > > drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > 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: > -- > 2.22.1 >
On Fri, Aug 23, 2019 at 12:49:46PM +0300, Simon Ser wrote: > 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 <simon.ser@intel.com> > Cc: Imre Deak <imre.deak@intel.com> > Cc: Manasi Navare <nanasi.d.navare@intel.com> > Reviewed-by: Imre Deak <imre.deak@intel.com> > --- > > Resending v2 to the correct mailing list. > > drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > 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"); Maybe just print encoder->name instead? > + } > + > switch (connector->connector_type) { > case DRM_MODE_CONNECTOR_DisplayPort: > case DRM_MODE_CONNECTOR_eDP: > -- > 2.22.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Wed, 2019-08-28 at 19:40 +0300, Ville Syrjälä wrote: > On Fri, Aug 23, 2019 at 12:49:46PM +0300, Simon Ser wrote: > > 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 <simon.ser@intel.com> > > Cc: Imre Deak <imre.deak@intel.com> > > Cc: Manasi Navare <nanasi.d.navare@intel.com> > > Reviewed-by: Imre Deak <imre.deak@intel.com> > > --- > > > > Resending v2 to the correct mailing list. > > > > drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > 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"); > > Maybe just print encoder->name instead? It seems that for DisplayPort connectors, the encoder->name will be set to "DP <port name>". This misses the Type-C part, and we already expose the connector type. > > + } > > + > > switch (connector->connector_type) { > > case DRM_MODE_CONNECTOR_DisplayPort: > > case DRM_MODE_CONNECTOR_eDP: > > -- > > 2.22.1 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Thu, Aug 29, 2019 at 09:08:54AM +0000, Ser, Simon wrote: > On Wed, 2019-08-28 at 19:40 +0300, Ville Syrjälä wrote: > > On Fri, Aug 23, 2019 at 12:49:46PM +0300, Simon Ser wrote: > > > 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 <simon.ser@intel.com> > > > Cc: Imre Deak <imre.deak@intel.com> > > > Cc: Manasi Navare <nanasi.d.navare@intel.com> > > > Reviewed-by: Imre Deak <imre.deak@intel.com> > > > --- > > > > > > Resending v2 to the correct mailing list. > > > > > > drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > 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"); > > > > Maybe just print encoder->name instead? > > It seems that for DisplayPort connectors, the encoder->name will be set > to "DP <port name>". This misses the Type-C part, and we already expose > the connector type. If the TC part is missing from the encoder name then it should be fixed. > > > > + } > > > + > > > switch (connector->connector_type) { > > > case DRM_MODE_CONNECTOR_DisplayPort: > > > case DRM_MODE_CONNECTOR_eDP: > > > -- > > > 2.22.1 > > > > > > _______________________________________________ > > > Intel-gfx mailing list > > > Intel-gfx@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
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: