[PATCH i-g-t v1 1/2] lib/igt_whitelist: Add Hdcp Whitelist support
Santhosh Reddy Guddati
santhosh.reddy.guddati at intel.com
Wed Apr 9 16:57:26 UTC 2025
This introduces a mechanism to handle specific panels
like emulators/dummies that are known to face issues with certain
features like HDCP.
Tests are skipped for those outputs connected to prevent false negatives
and unnecessary debugging,
Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
lib/igt_whitelist.c | 61 +++++++++++++++++++++++++++++++++++++++++++++
lib/igt_whitelist.h | 15 +++++++++++
lib/meson.build | 1 +
3 files changed, 77 insertions(+)
create mode 100644 lib/igt_whitelist.c
create mode 100644 lib/igt_whitelist.h
diff --git a/lib/igt_whitelist.c b/lib/igt_whitelist.c
new file mode 100644
index 000000000..6a210406f
--- /dev/null
+++ b/lib/igt_whitelist.c
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#include <stdbool.h>
+#include <string.h>
+
+#include "drmtest.h"
+#include "igt_whitelist.h"
+
+/**
+ * Blacklist array for HDCP.
+ *
+ * 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_blacklist[] = {
+ "DPF90435", // Example monitor name
+ // Add more monitor names here as needed
+};
+
+/**
+ * is_in_blacklist - Checks if a given vendor name is present in a blacklist.
+ *
+ * @vendor_name: The name of the vendor to check for in the blacklist.
+ * @blacklist: An array of strings representing the blacklist.
+ * @blacklist_size: The number of entries in the blacklist array.
+ *
+ * Returns:
+ * true if the vendor name is found in the blacklist, false otherwise.
+ */
+static bool is_in_blacklist(const char *vendor_name,
+ const char *const blacklist[],
+ size_t blacklist_size)
+{
+ int i;
+
+ for (i = 0; i < blacklist_size; i++) {
+ if (strstr(blacklist[i], vendor_name) != NULL)
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * is_panel_blacklisted_hdcp - Checks if a panel vendor is blacklisted for HDCP.
+ * @vendor_name: The name of the panel vendor to check.
+ *
+ * Returns:
+ * true if the vendor is blacklisted for HDCP, false otherwise.
+ */
+bool is_panel_blacklisted_hdcp(const char *vendor_name)
+{
+ return is_in_blacklist(vendor_name, hdcp_blacklist,
+ ARRAY_SIZE(hdcp_blacklist));
+}
diff --git a/lib/igt_whitelist.h b/lib/igt_whitelist.h
new file mode 100644
index 000000000..3ffa35db9
--- /dev/null
+++ b/lib/igt_whitelist.h
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#ifndef IGT_WHITELIST_H
+#define IGT_WHITELIST_H
+
+#include <stdbool.h>
+#include <string.h>
+
+bool is_panel_blacklisted_hdcp(const char *vendor_name);
+
+#endif
+
diff --git a/lib/meson.build b/lib/meson.build
index d7bb72c57..3bf55a9ef 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -112,6 +112,7 @@ lib_sources = [
'igt_msm.c',
'igt_dsc.c',
'igt_hook.c',
+ 'igt_whitelist.c',
'xe/xe_gt.c',
'xe/xe_ioctl.c',
'xe/xe_mmio.c',
--
2.34.1
More information about the Intel-gfx-trybot
mailing list