[Intel-gfx] [PATCH i-g-t 2/4] lib/igt_kms: Make igt_output_from_connector probe all outputs
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Thu Nov 16 12:45:20 UTC 2017
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 at linux.intel.com>
---
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
More information about the Intel-gfx
mailing list