[PATCH i-g-t v5 2/2] tests/kms_content_protection: Handle EDID lookup failures

Santhosh Reddy Guddati
2026-03-19T06:43:46Z

During output selection, connectors may disconnect or AUX reads may
timeout. In that cases, EDID blob read fails instead of assert log
the failure so test dont asserts.

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

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index caf3d7a56..006aeb510 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -683,13 +683,24 @@ static bool is_output_hdcp_test_exempt(igt_output_t *output)
const struct edid *edid;
char edid_vendor[4];
char sink_name[20];
+ bool ok;
+
+ ok = kmstest_get_property(data.drm_fd,
+ output->config.connector->connector_id,
+ DRM_MODE_OBJECT_CONNECTOR, "EDID", NULL,
+ &edid_blob_id, NULL);
+ if (!ok || !edid_blob_id) {
+ igt_debug("Unable to get EDID blob id for %s\n",
+ output->name);
+ return false;
+ }

- 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_blob = drmModeGetPropertyBlob(data.drm_fd, edid_blob_id);
+ if (!edid_blob) {
+ igt_debug("Unable to fetch EDID blob for %s (blob id=%" PRIu64 ")\n",
+ output->name, edid_blob_id);
+ return false;
+ }

edid = (const struct edid *)edid_blob->data;
edid_get_mfg(edid, edid_vendor);
@@ -724,7 +735,6 @@ static int get_hdcp_outputs(igt_display_t *display, int content_type,
continue;
}

-
if (count < MAX_HDCP_OUTPUTS)
hdcp_outputs[count++] = output;
}
--
2.34.1