drm/i915/debugfs: Do not print cached information of a disconnected sink
authorJosé Roberto de Souza <jose.souza@intel.com>
Tue, 30 Oct 2018 21:57:46 +0000 (14:57 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 31 Oct 2018 22:25:01 +0000 (15:25 -0700)
Besides of give the expected output of i915_display_info it will also
avoid some aux ch transactions that would timeout by obvious reasons.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181030215750.28213-1-jose.souza@intel.com
drivers/gpu/drm/i915/i915_debugfs.c

index 041319d48ca357b167dd466446dc143ad67eb37a..1a4d9d996fda0eabbbf89e4f90e36b85a915ef1d 100644 (file)
@@ -3064,16 +3064,17 @@ static void intel_connector_info(struct seq_file *m,
        seq_printf(m, "connector %d: type %s, status: %s\n",
                   connector->base.id, connector->name,
                   drm_get_connector_status_name(connector->status));
-       if (connector->status == connector_status_connected) {
-               seq_printf(m, "\tname: %s\n", connector->display_info.name);
-               seq_printf(m, "\tphysical dimensions: %dx%dmm\n",
-                          connector->display_info.width_mm,
-                          connector->display_info.height_mm);
-               seq_printf(m, "\tsubpixel order: %s\n",
-                          drm_get_subpixel_order_name(connector->display_info.subpixel_order));
-               seq_printf(m, "\tCEA rev: %d\n",
-                          connector->display_info.cea_rev);
-       }
+
+       if (connector->status == connector_status_disconnected)
+               return;
+
+       seq_printf(m, "\tname: %s\n", connector->display_info.name);
+       seq_printf(m, "\tphysical dimensions: %dx%dmm\n",
+                  connector->display_info.width_mm,
+                  connector->display_info.height_mm);
+       seq_printf(m, "\tsubpixel order: %s\n",
+                  drm_get_subpixel_order_name(connector->display_info.subpixel_order));
+       seq_printf(m, "\tCEA rev: %d\n", connector->display_info.cea_rev);
 
        if (!intel_encoder)
                return;