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

Reddy Guddati, Santhosh
2026-03-09T06:07:54Z

On 02-03-2026 08:24, Kandpal, Suraj wrote:
>
>> 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

My Bad! There are two issues here.
1. After rechecking I observed that the regression is not because of the
mentioned Fixes, but it is because of the (86971fa4d531
"tests/kms_content_protection: Check for HDCP before setting displays" )

2. As you mentioned, will move the checks to outer loop, This will avoid
printing log messages repeatedly for unsupported outputs per crtc but
this wont fix the current issue.

I will work on this and float a new revision.

Thanks,
Santhosh

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