[PATCH i-g-t RFC 09/13] tests/chamelium: Introduce 4k stress edid
Louis Chauvet
louis.chauvet at bootlin.com
Wed Jun 5 14:30:21 UTC 2024
Introduce some helpers to uses monitor edid and upload them to the
chamelium.
Complement the EDID test to also test 4k screens. The current database
contains EDID for HDMI and DP ports.
Signed-off-by: Louis Chauvet <louis.chauvet at bootlin.com>
---
tests/chamelium/v3/kms_chamelium_v3_edid.c | 45 ++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/tests/chamelium/v3/kms_chamelium_v3_edid.c b/tests/chamelium/v3/kms_chamelium_v3_edid.c
index acf62ba78a32..76bdddd81174 100644
--- a/tests/chamelium/v3/kms_chamelium_v3_edid.c
+++ b/tests/chamelium/v3/kms_chamelium_v3_edid.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: MIT
#include <igt.h>
+#include "monitor_edids/monitor_edids_helper.h"
#include "chamelium/v3/igt_chamelium.h"
static void collect_and_compare_edid(int drm_fd,
@@ -54,6 +55,22 @@ static void igt_custom_edid_type_read(int drm_fd, struct igt_chamelium_rpc *cham
upload_and_read_edid(drm_fd, chamelium, port_mapping, igt_kms_get_custom_edid(edid));
}
+static void edid_stress_resolution(int drm_fd, struct igt_chamelium_rpc *chamelium,
+ struct chamelium_rpc_port_mapping *port_mapping,
+ monitor_edid edids_list[],
+ size_t edids_list_len)
+{
+ for (int i = 0; i < edids_list_len; i++) {
+ struct edid *edid = edid_from_monitor_edid(&edids_list[i]);
+
+ igt_info("Testing out the EDID for %s\n",
+ monitor_edid_get_name(&edids_list[i]));
+ upload_and_read_edid(drm_fd, chamelium, port_mapping, edid);
+ free(edid);
+ }
+}
+
+
igt_main {
struct igt_chamelium_rpc *chamelium;
int drm_fd;
@@ -86,6 +103,34 @@ igt_main {
}
}
+ igt_describe("Read many different 4k EDID from the chamelium");
+ igt_subtest_with_dynamic("edid-stress-4k") {
+ struct chamelium_rpc_port_mapping *port, *tmp;
+
+ igt_list_for_each_entry_safe(port, tmp, chamelium_rpc_get_port_mapping(chamelium),
+ link) {
+ igt_dynamic_f("port-%d", port->port_id) {
+ drmModeConnectorPtr connector;
+ size_t edid_count;
+ char *name;
+
+ name = chamelium_get_port_name_rpc(chamelium, port->port_id);
+ igt_info("Testing port %s (%s)\n", port->connector_name, name);
+ free(name);
+
+ connector = chamelium_rpc_port_mapping_get_connector(port, drm_fd);
+ igt_assert(connector);
+ edid_stress_resolution(drm_fd, chamelium, port,
+ get_edid_for_connector_type(connector->connector_type,
+ &edid_count,
+ true),
+ edid_count);
+
+ drmModeFreeConnector(connector);
+ }
+ }
+ }
+
igt_fixture {
chamelium_rpc_uninit(chamelium);
drm_close_driver(drm_fd);
--
2.43.2
More information about the igt-dev
mailing list