[PATCH i-g-t v1 2/2] tests/kms_content_protection: Whitelist check for panel support

Santhosh Reddy Guddati santhosh.reddy.guddati at intel.com
Wed Apr 9 16:57:27 UTC 2025


Verify the connected output is not blacklisted and if the blacklist is
found , skip the test on the output.

Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
 tests/kms_content_protection.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 6fe1edbc4..6e93f7f46 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_whitelist.h"
 
 /**
  * SUBTEST: lic-type-0
@@ -578,6 +580,29 @@ test_fini(igt_output_t *output, enum igt_commit_style commit_style)
 	igt_display_commit2(&data.display, commit_style);
 }
 
+static bool is_output_whitelist(igt_output_t *output)
+{
+	drmModePropertyBlobPtr edid_blob = NULL;
+	uint64_t edid_blob_id;
+	const struct edid *edid;
+	char edid_vendor[4];
+
+	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';
+
+	drmModeFreePropertyBlob(edid_blob);
+
+	return is_panel_blacklisted_hdcp(edid_vendor);
+}
+
 static void
 test_content_protection(enum igt_commit_style commit_style, int content_type)
 {
@@ -595,6 +620,7 @@ test_content_protection(enum igt_commit_style commit_style, int content_type)
 	}
 
 	for_each_connected_output(display, output) {
+		igt_require_f(!is_output_whitelist(output), "Skipped as the panel is blacklisted");
 		for_each_pipe(display, pipe) {
 			igt_display_reset(display);
 
@@ -923,6 +949,8 @@ static const struct {
 	},
 };
 
+
+
 igt_main
 {
 	igt_fixture {
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list