[PATCH i-g-t v3 2/2] tests/kms_content_protection: Whitelist check for panel support
Reddy Guddati, Santhosh
santhosh.reddy.guddati at intel.com
Tue Jun 3 03:54:55 UTC 2025
Hi Suraj,
Thanks for the review.
On 29-05-2025 11:31, Kandpal, Suraj wrote:
>
>
>> -----Original Message-----
>> From: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
>> Sent: Thursday, May 29, 2025 7:25 AM
>> To: igt-dev at lists.freedesktop.org
>> Cc: Nautiyal, Ankit K <ankit.k.nautiyal at intel.com>; Kandpal, Suraj
>> <suraj.kandpal at intel.com>; Thasleem, Mohammed
>> <mohammed.thasleem at intel.com>; Konieczny, Kamil
>> <kamil.konieczny at intel.com>; Reddy Guddati, Santhosh
>> <santhosh.reddy.guddati at intel.com>
>> Subject: [PATCH i-g-t v3 2/2] tests/kms_content_protection: Whitelist check for
>> panel support
>>
>> Verify the connected output is not blacklisted and if the blacklist is found ,
>> skip the test on the output.
>>
>> V2: Rename the function names to reflect the test exemption on panels.
>>
>> V3: Add blocklist array to content_protection and use igt_is_panel_blocked
>> (Suraj)
>>
>> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
>> ---
>> tests/kms_content_protection.c | 47
>> ++++++++++++++++++++++++++++++++++
>> 1 file changed, 47 insertions(+)
>>
>> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
>> index 6fe1edbc4..90e2ee79c 100644
>> --- a/tests/kms_content_protection.c
>> +++ b/tests/kms_content_protection.c
>> @@ -36,9 +36,11 @@
>> #include <sys/stat.h>
>> #include <libudev.h>
>> #include "igt.h"
>> +#include "igt_edid.h"
>> #include "igt_sysfs.h"
>> #include "igt_kms.h"
>> #include "igt_kmod.h"
>> +#include "igt_panel.h"
>>
>> /**
>> * SUBTEST: lic-type-0
>> @@ -128,6 +130,20 @@ __u8 facsimile_srm[] = {
>> 0x83, 0xAA, 0xC2, 0x5B, 0x24, 0xB3, 0x36, 0x84, 0x94, 0x75, 0x34,
>> 0xDB,
>> 0x10, 0x9E, 0x3B, 0x23, 0x13, 0xD8, 0x7A, 0xC2, 0x30, 0x79, 0x84};
>>
>> +/**
>> + * List of Panels that should be excluded from hdcp tests
>> + *
>> + * This array is used to identify and handle scenarios where the test
>> +is
>> + * executed on dummy monitors, such as those found on shard machines.
>> + * Since these dummy monitors are not real and always the test is not
>> +consistent,
>> + * the test is skipped in such cases to avoid false negatives or
>> + * irrelevant test results.
>> + */
>> +static const char *const hdcp_blocklist[] = {
>> + "DPF90435", /* Example monitor name */
>> + /* Add more monitor names here as needed */ };
>> +
>> static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
>> unsigned int tv_usec, void *_data)
>> {
>> @@ -578,6 +594,32 @@ test_fini(igt_output_t *output, enum
>> igt_commit_style commit_style)
>> igt_display_commit2(&data.display, commit_style); }
>>
>> +static bool is_output_hdcp_test_exempt(igt_output_t *output) {
>> + drmModePropertyBlobPtr edid_blob = NULL;
>> + uint64_t edid_blob_id;
>> + const struct edid *edid;
>> + char edid_vendor[4];
>> + char sink_name[20];
>> +
>> + igt_assert(kmstest_get_property(data.drm_fd,
>> + output->config.connector-
>>> connector_id,
>> + DRM_MODE_OBJECT_CONNECTOR,
>> "EDID", NULL,
>> + &edid_blob_id, NULL));
>> +
>> + igt_assert(edid_blob = drmModeGetPropertyBlob(data.drm_fd,
>> +edid_blob_id));
>> +
>> + edid = (const struct edid *)edid_blob->data;
>> + edid_get_mfg(edid, edid_vendor);
>> + edid_vendor[3] = '\0';
>> +
>> + edid_get_monitor_name(edid, sink_name, ARRAY_SIZE(sink_name));
>> +
>> + drmModeFreePropertyBlob(edid_blob);
>> +
>> + return igt_is_panel_blocked(sink_name, hdcp_blocklist,
>> +ARRAY_SIZE(hdcp_blocklist)); }
>> +
>> static void
>> test_content_protection(enum igt_commit_style commit_style, int
>> content_type) { @@ -595,6 +637,9 @@ test_content_protection(enum
>> igt_commit_style commit_style, int content_type)
>> }
>>
>> for_each_connected_output(display, output) {
>> + igt_require_f(!is_output_hdcp_test_exempt(output),
>> + "Skipped as the panel is blacklisted");
>> +
>> for_each_pipe(display, pipe) {
>> igt_display_reset(display);
>>
>> @@ -923,6 +968,8 @@ static const struct {
>> },
>> };
>>
>> +
>> +
>
> No need for these extra lines
Will fix this while merging the patch. Thanks>
> With that fixed
> Reviewed-by: Suraj Kandpal <suraj.kandpal at intel.com>
>
>> igt_main
>> {
>> igt_fixture {
>> --
>> 2.34.1
>
More information about the igt-dev
mailing list