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

Kandpal, Suraj
2026-03-02T02:55:06Z

> Subject: [PATCH i-g-t v1] tests/kms_content_protection: check sink capability
> after modeset
>
> 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))

This is weird that after a modeset that the sink starts showing HDCP capable.
Does output_hdcp_capable belong in the outer loop instead of the inner loop
Which iterates over crtc. Why keep checking output_hdcp_capable for each crtc if the
Output remains same.
I think optimization in that line could fix this issue with lot less code movement

Regards,
Suraj Kandpal

> + 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