All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>,
	intel-gfx@lists.freedesktop.org, harry.wentland@amd.com
Subject: [PATCH i-g-t v2] tests/kms_content_protection: check i915 and generic debugfs name for HDCP caps
Date: Mon, 21 Oct 2019 15:42:59 -0400	[thread overview]
Message-ID: <20191021194259.17052-1-Bhawanpreet.Lakha@amd.com> (raw)
In-Reply-To: <20190923182325.24049-1-Bhawanpreet.Lakha@amd.com>

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>
---
 tests/kms_content_protection.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index e676b60b..42fdc459 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);
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-10-21 19:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 18:23 [PATCH] test/kms_content_protection: Use generic debugfs name for HDCP caps Bhawanpreet Lakha
2019-09-23 18:23 ` [Intel-gfx] " Bhawanpreet Lakha
2019-09-23 19:09 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-09-24  6:53 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-24  9:54 ` [igt-dev] [PATCH] " Petri Latvala
2019-09-24  9:54   ` Petri Latvala
2019-09-24 14:41   ` Lakha, Bhawanpreet
2019-09-24 14:41     ` Lakha, Bhawanpreet
2019-09-24 15:41   ` Ramalingam C
2019-09-24 15:41     ` Ramalingam C
2019-10-21 19:42 ` Bhawanpreet Lakha [this message]
2019-10-23 14:18   ` [PATCH i-g-t v2] tests/kms_content_protection: check i915 and " Harry Wentland
2019-10-23 14:18     ` [igt-dev] " Harry Wentland
2019-10-23 14:18     ` [Intel-gfx] " Harry Wentland
2019-10-23 15:27   ` Ramalingam C
2019-10-23 15:27     ` [igt-dev] [Intel-gfx] " Ramalingam C
2019-10-23 15:27     ` Ramalingam C
2019-10-24 11:17   ` Petri Latvala
2019-10-24 11:17     ` [igt-dev] [Intel-gfx] " Petri Latvala
2019-10-24 11:17     ` Petri Latvala
2019-10-21 21:28 ` [igt-dev] ✓ Fi.CI.BAT: success for test/kms_content_protection: Use generic debugfs name for HDCP caps (rev2) Patchwork
2019-10-22  5:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191021194259.17052-1-Bhawanpreet.Lakha@amd.com \
    --to=bhawanpreet.lakha@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.