[igt-dev] [PATCH i-g-t] tests/kms_content_protection: Convert tests to Dynamic

Karthik B S karthik.b.s at intel.com
Mon Sep 12 10:19:43 UTC 2022


On 9/9/2022 4:03 PM, Kamil Konieczny wrote:
> Hi Karthik,
>
> On 2022-09-09 at 10:34:27 +0530, Karthik B S wrote:
>> On 9/5/2022 3:13 PM, Modem, Bhanuprakash wrote:
>>> On Thu-01-09-2022 12:07 pm, Karthik B S wrote:
>>>> Covert the existing subtests to dynamic subtests at pipe/output level.
>>>> Also move the cleanup part outside the subtest so that it is run even if
>>>> a failure is seen in the subtest.
>>>>
>>>> Signed-off-by: Karthik B S <karthik.b.s at intel.com>
>>>> ---
>>>>    tests/kms_content_protection.c | 366 ++++++++++++++++++---------------
>>>>    1 file changed, 196 insertions(+), 170 deletions(-)
>>>>
>>>> diff --git a/tests/kms_content_protection.c
>>>> b/tests/kms_content_protection.c
>>>> index 3041f1cd..dde6345c 100644
> [cut]
>
>>>> +
>>>>    static void
>>>>    test_content_protection(enum igt_commit_style s, int content_type)
>>>>    {
>>>>        igt_display_t *display = &data.display;
>>>>        igt_output_t *output;
>>>> +    enum pipe pipe;
>>>>        int valid_tests = 0;
>>>>          if (data.cp_tests & CP_MEI_RELOAD)
>>>>            igt_require_f(igt_kmod_is_loaded("mei_hdcp"),
>>>>                      "mei_hdcp module is not loaded\n");
>>>>    +    if (data.cp_tests & CP_UEVENT) {
>>>> +        data.uevent_monitor = igt_watch_uevents();
>>>> +        igt_flush_uevents(data.uevent_monitor);
>>>> +    }
>>>> +
>>>> +    igt_display_reset(display);
>>> Reset could be inside igt_dynamic()?
>> I actually found an issue with the current test. Since the modeset is not
>> being done before checking if output is HDCP capable, the test is skipping
>> on the second output on MST configuration. So will move the modeset before
>> the HDCP capable check and so will retain igt_reset also outside. Sounds
>> good?
> imho if it is a fix, is it worth to do fix before convert to dynamic ?
> What about sending fix first ?

Thank you for the review. Sure will split the patch and add the clean up 
in first patch and dynamic in second patch.

Regards,
Karthik.B.S
>
> --
> Kamil
>
> [cut]
>>> https://cgit.freedesktop.org/drm/igt-gpu-tools/tree/tests/kms_content_protection.c#n840
>>>
>>>
>>> Can we move test_content_protection_cleanup() to test_fini()?
>> This wouldn't be possible as we're using the same fb across all the
>> subtests, we're removing the fb directly at the end.  And making sure all
>> outputs have CP disabled. So could this be retained as is?
>>
>> Thanks,
>> Karthik.B.S
>>
>>> - Bhanu
>>>
>>>



More information about the igt-dev mailing list