[PATCH i-g-t v3 1/2] lib/igt_panel: Skip hdcp tests on unsupported panels
Kandpal, Suraj
suraj.kandpal at intel.com
Thu May 29 04:57:33 UTC 2025
> Subject: [PATCH i-g-t v3 1/2] lib/igt_panel: Skip hdcp tests on unsupported
> panels
>
> 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
>
> V2: Refactor variable ,function names and fix coding style (Kamil)
>
> V3: Remove extra wrapper and maintain blocklist array in test instead of
> in library (Suraj)
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
LGTM,
Reviewed-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
> lib/igt_edid.c | 27 +++++++++++++++++++++++++++ lib/igt_edid.h | 1 +
> lib/igt_panel.c | 35 +++++++++++++++++++++++++++++++++++
> lib/igt_panel.h | 17 +++++++++++++++++
> lib/meson.build | 1 +
> 5 files changed, 81 insertions(+)
> create mode 100644 lib/igt_panel.c
> create mode 100644 lib/igt_panel.h
>
> diff --git a/lib/igt_edid.c b/lib/igt_edid.c index 80dcea112..627201c34 100644
> --- a/lib/igt_edid.c
> +++ b/lib/igt_edid.c
> @@ -210,6 +210,33 @@ void edid_get_mfg(const struct edid *edid, char
> out[static 3])
> out[2] = (edid->mfg_id[1] & 0x1F) + '@'; }
>
> +void edid_get_monitor_name(const struct edid *edid, char *name, size_t
> +name_size) {
> + const struct detailed_timing *dt;
> + const struct detailed_non_pixel *np;
> + const struct detailed_data_string *ds;
> + size_t i;
> +
> + assert(name_size > 0);
> + name[0] = '\0';
> +
> + for (i = 0; i < DETAILED_TIMINGS_LEN; i++) {
> + dt = &edid->detailed_timings[i];
> + np = &dt->data.other_data;
> +
> + if (np->type != EDID_DETAIL_MONITOR_NAME)
> + continue;
> +
> + ds = &np->data.string;
> + strncpy(name, ds->str, name_size - 1);
> + name[name_size - 1] = '\0';
> + igt_debug("Monitor name: %s\n", name);
> + return;
> + }
> + igt_debug("No monitor name found in EDID\n");
> + name[0] = '\0';
> +}
> +
> static void edid_set_mfg(struct edid *edid, const char mfg[static 3]) {
> edid->mfg_id[0] = (mfg[0] - '@') << 2 | (mfg[1] - '@') >> 3; diff --git
> a/lib/igt_edid.h b/lib/igt_edid.h index 02645345f..be0ccf529 100644
> --- a/lib/igt_edid.h
> +++ b/lib/igt_edid.h
> @@ -456,5 +456,6 @@ void *dispid_block_tiled(void *ptr,
> int htile, int vtile,
> int hsize, int vsize,
> const char *topology_id);
> +void edid_get_monitor_name(const struct edid *edid, char *name, size_t
> +name_size);
>
> #endif
> diff --git a/lib/igt_panel.c b/lib/igt_panel.c new file mode 100644 index
> 000000000..c89bf9123
> --- /dev/null
> +++ b/lib/igt_panel.c
> @@ -0,0 +1,35 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2025 Intel Corporation
> + */
> +
> +#include <stdbool.h>
> +#include <string.h>
> +
> +#include "drmtest.h"
> +#include "igt_panel.h"
> +
> +/**
> + * igt_is_panel_blocked - Checks if a given vendor name is present in a
> blocklist.
> + *
> + * @vendor_name: The name of the vendor to check for in the blocklist.
> + * @blocklist: An array of strings representing the blocklist.
> + * @blocklist_size: The number of entries in the blocklist array.
> + *
> + * Returns:
> + * true if the vendor name is found in the blocklist, false otherwise.
> + */
> +bool igt_is_panel_blocked(const char *vendor_name,
> + const char *const blocklist[],
> + size_t blocklist_size)
> +{
> + int i;
> +
> + for (i = 0; i < blocklist_size; i++) {
> + if (strstr(blocklist[i], vendor_name) != NULL)
> + return true;
> + }
> +
> + return false;
> +}
> +
> diff --git a/lib/igt_panel.h b/lib/igt_panel.h new file mode 100644 index
> 000000000..b9fb88cc7
> --- /dev/null
> +++ b/lib/igt_panel.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2025 Intel Corporation
> + */
> +
> +#ifndef IGT_PANEL_H
> +#define IGT_PANEL_H
> +
> +#include <stdbool.h>
> +#include <string.h>
> +
> +bool igt_is_panel_blocked(const char *vendor_name,
> + const char *const blocklist[],
> + size_t blocklist_size);
> +
> +#endif
> +
> diff --git a/lib/meson.build b/lib/meson.build index f54198051..139855f2e
> 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -94,6 +94,7 @@ lib_sources = [
> 'igt_draw.c',
> 'igt_list.c',
> 'igt_map.c',
> + 'igt_panel.c',
> 'igt_pm.c',
> 'igt_dummyload.c',
> 'igt_store.c',
> --
> 2.34.1
More information about the igt-dev
mailing list