From: Suraj Kandpal <suraj.kandpal@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: pranay.samala@intel.com, ankit.k.nautiyal@intel.com,
jeevan.b@intel.com, Suraj Kandpal <suraj.kandpal@intel.com>
Subject: [PATCH i-g-t 1/5] tests/kms_content_protection: Move HDCP output checks earlier
Date: Tue, 20 Aug 2024 13:42:28 +0530 [thread overview]
Message-ID: <20240820081233.4092203-2-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20240820081233.4092203-1-suraj.kandpal@intel.com>
Move the HDCP output check earlier when no. MST outputs are being
checked this will avoid us using an extra loop and an extra array.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
tests/kms_content_protection.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index e9a468eb0..6bd744351 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -638,7 +638,7 @@ test_content_protection_mst(int content_type)
int valid_outputs = 0, dp_mst_outputs = 0, ret, count, max_pipe = 0, i;
enum pipe pipe;
bool pipe_found;
- igt_output_t *mst_output[IGT_MAX_PIPES], *hdcp_mst_output[IGT_MAX_PIPES];
+ igt_output_t *hdcp_mst_output[IGT_MAX_PIPES];
for_each_pipe(display, pipe)
max_pipe++;
@@ -662,10 +662,13 @@ test_content_protection_mst(int content_type)
igt_output_set_pipe(output, pipe);
prepare_modeset_on_mst_output(output);
- mst_output[dp_mst_outputs++] = output;
+ dp_mst_outputs++;
+ if (output_hdcp_capable(output, content_type))
+ hdcp_mst_output[valid_outputs++] = output;
}
igt_require_f(dp_mst_outputs > 1, "No DP MST set up with >= 2 outputs found in a single topology\n");
+ igt_require_f(valid_outputs > 1, "DP MST outputs do not have the required HDCP support\n");
if (igt_display_try_commit_atomic(display,
DRM_MODE_ATOMIC_TEST_ONLY |
@@ -674,22 +677,13 @@ test_content_protection_mst(int content_type)
bool found = igt_override_all_active_output_modes_to_fit_bw(display);
igt_require_f(found, "No valid mode combo found for MST modeset\n");
- for (count = 0; count < dp_mst_outputs; count++)
- prepare_modeset_on_mst_output(mst_output[count]);
+ for (count = 0; count < valid_outputs; count++)
+ prepare_modeset_on_mst_output(hdcp_mst_output[count]);
}
ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
igt_require_f(ret == 0, "Commit failure during MST modeset\n");
- for (count = 0; count < dp_mst_outputs; count++) {
- if (!output_hdcp_capable(mst_output[count], content_type))
- continue;
-
- hdcp_mst_output[valid_outputs++] = mst_output[count];
- }
-
- igt_require_f(valid_outputs > 1, "DP MST outputs do not have the required HDCP support\n");
-
for (count = 0; count < valid_outputs; count++) {
igt_output_set_prop_value(hdcp_mst_output[count], IGT_CONNECTOR_CONTENT_PROTECTION, CP_DESIRED);
--
2.43.2
next prev parent reply other threads:[~2024-08-20 8:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 8:12 [PATCH i-g-t 0/5] Improve MST HDCP tests Suraj Kandpal
2024-08-20 8:12 ` Suraj Kandpal [this message]
2024-08-21 14:51 ` [PATCH i-g-t 1/5] tests/kms_content_protection: Move HDCP output checks earlier B, Jeevan
2024-08-20 8:12 ` [PATCH i-g-t 2/5] tests/kms_content_protection: Move try commit call Suraj Kandpal
2024-08-21 14:37 ` B, Jeevan
2024-08-20 8:12 ` [PATCH i-g-t 3/5] tests/kms_content_protection: Rename igt_commit_style variable Suraj Kandpal
2024-08-21 14:46 ` B, Jeevan
2024-08-20 8:12 ` [PATCH i-g-t 4/5] tests/kms_content_protection: Add retry logic for mst usecase Suraj Kandpal
2024-08-20 8:12 ` [PATCH i-g-t 5/5] tests/kms_content_protection: Set screen red/green based on CP Status Suraj Kandpal
2024-08-21 14:49 ` B, Jeevan
2024-08-20 9:07 ` ✓ CI.xeBAT: success for Improve MST HDCP tests (rev2) Patchwork
2024-08-20 9:18 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-20 13:22 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-21 0:13 ` ✗ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-08-22 6:11 [PATCH i-g-t 0/5] Improve MST HDCP tests Suraj Kandpal
2024-08-22 6:11 ` [PATCH i-g-t 1/5] tests/kms_content_protection: Move HDCP output checks earlier Suraj Kandpal
2024-08-27 6:18 [PATCH i-g-t 0/5] Improve MST HDCP tests Suraj Kandpal
2024-08-27 6:19 ` [PATCH i-g-t 1/5] tests/kms_content_protection: Move HDCP output checks earlier Suraj Kandpal
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=20240820081233.4092203-2-suraj.kandpal@intel.com \
--to=suraj.kandpal@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@intel.com \
--cc=pranay.samala@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox