diff options
author | Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> | 2019-10-21 15:42:59 -0400 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2019-10-24 14:16:00 +0300 |
commit | 9a46404de7c42c8cc2d492176e956597ef28d7c4 (patch) | |
tree | 64516c98b90af92984223f11e6e3f6f47e5cf880 /tests/kms_content_protection.c | |
parent | ca9236dfa258a4a28db7d3cc941bebcb147de527 (diff) |
tests/kms_content_protection: check i915 and generic debugfs name for HDCP caps
The content protection tests only start if this debugfs entry exists.
Since the name is specific to intel driver these tests cannot be used with
other drivers. So we should check generic debugfs name also
v2: Check i915_* if device is i915, otherwise check the generic name.
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Diffstat (limited to 'tests/kms_content_protection.c')
-rw-r--r-- | tests/kms_content_protection.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index fce4b591..d5eb902f 100644 --- a/tests/kms_content_protection.c +++ b/tests/kms_content_protection.c @@ -554,7 +554,11 @@ static bool sink_hdcp_capable(igt_output_t *output) if (fd < 0) return false; - debugfs_read(fd, "i915_hdcp_sink_capability", buf); + if (is_i915_device(data.drm_fd)) + debugfs_read(fd, "i915_hdcp_sink_capability", buf); + else + debugfs_read(fd, "hdcp_sink_capability", buf); + close(fd); igt_debug("Sink capability: %s\n", buf); @@ -571,7 +575,11 @@ static bool sink_hdcp2_capable(igt_output_t *output) if (fd < 0) return false; - debugfs_read(fd, "i915_hdcp_sink_capability", buf); + if (is_i915_device(data.drm_fd)) + debugfs_read(fd, "i915_hdcp_sink_capability", buf); + else + debugfs_read(fd, "hdcp_sink_capability", buf); + close(fd); igt_debug("Sink capability: %s\n", buf); |