igt_output_from_connector should be used for disconnected outputs too, this is useful for chamelium testing, where disconnected outputs may reappear. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> --- lib/igt_kms.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 239f4f17d22e..fe0ef2bd6f38 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1884,9 +1884,13 @@ igt_output_t *igt_output_from_connector(igt_display_t *display, drmModeConnector *connector) { igt_output_t *output, *found = NULL; + int i; + + for (i = 0; i < display->n_outputs; i++) { + output = &display->outputs[i]; - for_each_connected_output(display, output) { - if (output->config.connector->connector_id == + if (output->config.connector && + output->config.connector->connector_id == connector->connector_id) { found = output; break; -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx