[Intel-gfx] [PATCH 4/4] drm/i915/debugfs: sinks hdcp capabilities
Ramalingam C
ramalingam.c at intel.com
Wed Oct 17 11:03:06 UTC 2018
debugfs entry for providing the hdcp capabilities of the sinks
connected to the HDCP capable connectors.
Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 5f3c639522fa..d89df0b8b7fb 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2210,6 +2210,36 @@ static const char *rps_power_to_str(unsigned int power)
return strings[power];
}
+static int i915_sinks_hdcp_capabilities(struct seq_file *m, void *unused)
+{
+ struct drm_i915_private *dev_priv = node_to_i915(m->private);
+ struct drm_device *dev = &dev_priv->drm;
+ struct intel_connector *connector;
+ struct drm_connector_list_iter conn_iter;
+ bool is_hdcp14;
+
+ drm_connector_list_iter_begin(dev, &conn_iter);
+ for_each_intel_connector_iter(connector, &conn_iter) {
+ if (connector->base.status != connector_status_connected)
+ continue;
+
+ /* HDCP is supported by connector */
+ if (!connector->hdcp_shim)
+ continue;
+
+ /* Detect sink's HDCP1.4 capability */
+ is_hdcp14 = intel_hdcp_capable(connector);
+
+ seq_printf(m, "%s:%d HDCP version: ", connector->base.name,
+ connector->base.base.id);
+ seq_printf(m, "%s ", !is_hdcp14 ? "None" : "HDCP1.4");
+ seq_puts(m, "\n");
+ }
+ drm_connector_list_iter_end(&conn_iter);
+
+ return 0;
+}
+
static int i915_rps_boost_info(struct seq_file *m, void *data)
{
struct drm_i915_private *dev_priv = node_to_i915(m->private);
@@ -4805,6 +4835,7 @@ static const struct drm_info_list i915_debugfs_list[] = {
{"i915_sseu_status", i915_sseu_status, 0},
{"i915_drrs_status", i915_drrs_status, 0},
{"i915_rps_boost_info", i915_rps_boost_info, 0},
+ {"i915_sinks_hdcp_capabilities", i915_sinks_hdcp_capabilities, 0},
};
#define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)
--
2.7.4
More information about the Intel-gfx
mailing list