[PATCH i-g-t v1] tests/kms_content_protection: check sink capability after modeset

Santhosh Reddy Guddati
2026-02-26T16:53:17Z

The loop checks HDCP sink capability too early, this makes test skips
on multi display panels with "Sink has no HDCP support"
on valid connectors.

Fix this by validating output/crtc combo, do modeset and then check for
sink capability.

Fixes: a85208a45759 ("tests/kms: Use igt_crtc_t instead of enum pipe, part 4")
Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
---
tests/kms_content_protection.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 2c2ffa150..1f1f45fe6 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -725,21 +725,22 @@ test_content_protection(enum igt_commit_style commit_style, int content_type)

for_each_connected_output(display, output) {
for_each_crtc(display, crtc) {
- if (!output_hdcp_capable(output, content_type))
+ igt_display_reset(display);
+ igt_output_set_crtc(output, crtc);
+ if (!intel_pipe_output_combo_valid(display))
continue;
+
+ modeset_with_fb(output, commit_style);
+
if (is_output_hdcp_test_exempt(output)) {
igt_info("Skipping HDCP test on %s, as the panel is blocklisted\n",
output->name);
continue;
}

- igt_display_reset(display);
- igt_output_set_crtc(output,
- crtc);
- if (!intel_pipe_output_combo_valid(display))
+ if (!output_hdcp_capable(output, content_type))
continue;

- modeset_with_fb(output, commit_style);
if (data.is_force_hdcp14)
set_i915_force_hdcp14(output);

--
2.34.1