[PATCH i-g-t v2 2/2] tests/kms_content_protection: Whitelist check for panel support
Santhosh Reddy Guddati
santhosh.reddy.guddati at intel.com
Mon May 26 12:38:22 UTC 2025
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.
Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
tests/kms_content_protection.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 6fe1edbc4..c50842375 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
@@ -578,6 +580,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_hdcp(sink_name);
+}
+
static void
test_content_protection(enum igt_commit_style commit_style, int content_type)
{
@@ -595,6 +623,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 +954,8 @@ static const struct {
},
};
+
+
igt_main
{
igt_fixture {
--
2.34.1
More information about the igt-dev
mailing list