Re: [PATCH i-g-t v7 30/48] tests/unigraf: Add basic unigraf tests

Kory Maincent
2026-02-23T15:11:55Z

On Mon, 23 Feb 2026 13:09:37 +0100
Louis Chauvet <louis.chauvet@bootlin.com> wrote:

> Adds two tests to validate unigraf communication.
>
> unigraf-connect checks if the device is connected and if the EDID is
> properly applied.
>
> ungiraf-reconnect checks if the device can be connected/reconnected
> using SST and MST configurations.
>
> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---

...

> +
> + igt_describe("Make sure that the unigraf device can be used as a MST
> device");
> + igt_subtest("ungiraf-connect-mst") {

*unigraf*
Else I don't think the test will be triggered right?

> + int newly_connected_count, already_connected_count, diff_len;
> + uint32_t *newly_connected = NULL, *already_connected = NULL,
> *diff = NULL;
> + int max_count;
> +
> + unigraf_require_device(drm_fd);
> + max_count = unigraf_get_mst_stream_max_count();
> +
> + unigraf_hpd_deassert();
> +
> + already_connected_count =
> igt_get_connected_connectors(drm_fd, &already_connected); +
> + igt_debug("Already connected count: %d\n",
> already_connected_count); +
> + // i = 0 is SST so we need to process max_count + 1 streams
> + for (int i = 0; i <= max_count; i++) {
> + unigraf_hpd_deassert();
> + // Let the hardware detect the new state
> + sleep(igt_default_display_detect_timeout());
> +
> + unigraf_set_mst_stream_count(max(i, 1));
> + if (!i)
> + unigraf_set_sst();
> + else
> + unigraf_set_mst();
> +
> + unigraf_hpd_assert();
> + // Let the hardware detect the new state
> + sleep(igt_default_display_detect_timeout());
> +
> + newly_connected_count =
> kms_wait_for_new_connectors(&newly_connected,
> +
> already_connected,
> +
> already_connected_count,
> +
> drm_fd); +
> + diff_len = get_list_diff(newly_connected,
> newly_connected_count,
> + already_connected,
> already_connected_count, &diff); +
> + igt_assert_f(diff_len == max(i, 1),
> + "Invalid connected connector count,
> expected %d found %d\n",
> + max(i, 1), diff_len);
> + }
> + }
> +}
>

--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering