[Intel-gfx] [PATCH i-g-t 2/4] lib/igt_kms: Make igt_output_from_connector probe all outputs
Lyude Paul
lyude at redhat.com
Sat Nov 18 00:14:51 UTC 2017
Reviewed-by: Lyude Paul <lyude at redhat.com>
On Thu, 2017-11-16 at 13:45 +0100, Maarten Lankhorst wrote:
> 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;
More information about the Intel-gfx
mailing list