]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Add HDCP capability info to i915_display_info.
authorAnshuman Gupta <anshuman.gupta@intel.com>
Fri, 19 Jul 2019 05:55:13 +0000 (11:25 +0530)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 23 Jul 2019 10:02:28 +0000 (11:02 +0100)
To identify the HDCP capability of the display connected to CI
systems, we need to add the hdcp capability probing in i915_display_info.

This will also help to populate the HDCP capability of the CI systems
to CI H/W logs maintained at https://intel-gfx-ci.01.org/hardware/.
It will facilitate to determine the kms_content_protection behavior on
a particular CI system.

v2: Reused the intel_hdcp_info() in i915_hdcp_sink_capability_show(). [Ram]
    Shifted intel_hdcp_info() to the end of intel_dp_info. [Ram]
v3: used seq_puts() instead of seq_pritnf(). [Ram]

Cc: daniel.vetter@intel.com
Cc: ramalingam.c@intel.com
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190719055513.2089-1-anshuman.gupta@intel.com
drivers/gpu/drm/i915/i915_debugfs.c

index 6b84d04a6a280fae6d0a7cb2605a3fa9e5b83c4b..6d3911469801b175f87efebadd49bf7de5bc73e8 100644 (file)
@@ -2569,6 +2569,25 @@ static void intel_panel_info(struct seq_file *m, struct intel_panel *panel)
        intel_seq_print_mode(m, 2, mode);
 }
 
+static void intel_hdcp_info(struct seq_file *m,
+                           struct intel_connector *intel_connector)
+{
+       bool hdcp_cap, hdcp2_cap;
+
+       hdcp_cap = intel_hdcp_capable(intel_connector);
+       hdcp2_cap = intel_hdcp2_capable(intel_connector);
+
+       if (hdcp_cap)
+               seq_puts(m, "HDCP1.4 ");
+       if (hdcp2_cap)
+               seq_puts(m, "HDCP2.2 ");
+
+       if (!hdcp_cap && !hdcp2_cap)
+               seq_puts(m, "None");
+
+       seq_puts(m, "\n");
+}
+
 static void intel_dp_info(struct seq_file *m,
                          struct intel_connector *intel_connector)
 {
@@ -2582,6 +2601,10 @@ static void intel_dp_info(struct seq_file *m,
 
        drm_dp_downstream_debug(m, intel_dp->dpcd, intel_dp->downstream_ports,
                                &intel_dp->aux);
+       if (intel_connector->hdcp.shim) {
+               seq_puts(m, "\tHDCP version: ");
+               intel_hdcp_info(m, intel_connector);
+       }
 }
 
 static void intel_dp_mst_info(struct seq_file *m,
@@ -2605,6 +2628,10 @@ static void intel_hdmi_info(struct seq_file *m,
        struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&intel_encoder->base);
 
        seq_printf(m, "\taudio support: %s\n", yesno(intel_hdmi->has_audio));
+       if (intel_connector->hdcp.shim) {
+               seq_puts(m, "\tHDCP version: ");
+               intel_hdcp_info(m, intel_connector);
+       }
 }
 
 static void intel_lvds_info(struct seq_file *m,
@@ -4528,7 +4555,6 @@ static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data)
 {
        struct drm_connector *connector = m->private;
        struct intel_connector *intel_connector = to_intel_connector(connector);
-       bool hdcp_cap, hdcp2_cap;
 
        if (connector->status != connector_status_connected)
                return -ENODEV;
@@ -4539,17 +4565,7 @@ static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data)
 
        seq_printf(m, "%s:%d HDCP version: ", connector->name,
                   connector->base.id);
-       hdcp_cap = intel_hdcp_capable(intel_connector);
-       hdcp2_cap = intel_hdcp2_capable(intel_connector);
-
-       if (hdcp_cap)
-               seq_puts(m, "HDCP1.4 ");
-       if (hdcp2_cap)
-               seq_puts(m, "HDCP2.2 ");
-
-       if (!hdcp_cap && !hdcp2_cap)
-               seq_puts(m, "None");
-       seq_puts(m, "\n");
+       intel_hdcp_info(m, intel_connector);
 
        return 0;
 }