[Intel-gfx] [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit()
Marius Vlad
marius.c.vlad at intel.com
Fri Feb 19 13:25:30 UTC 2016
On Fri, Feb 19, 2016 at 02:34:52PM +0200, Gabriel Feceoru wrote:
> On Cherryview PIPE_C can only be connected to PORT_D (bspec).
> The driver properly reports the crtc_mask for the encoder, however the
> mismatch between pipe and port is not reported back to the test.
>
> Add support for detecting this case so the test can be skipped.
>
> Signed-off-by: Gabriel Feceoru <gabriel.feceoru at intel.com>
> ---
> lib/igt_kms.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 90c8da7..b18a317 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1669,6 +1669,7 @@ static int do_display_commit(igt_display_t *display,
> bool fail_on_error)
> {
> int i, ret;
> + int valid_outs = 0;
>
> LOG_INDENT(display, "commit");
>
> @@ -1680,12 +1681,16 @@ static int do_display_commit(igt_display_t *display,
> if (!output->valid)
> continue;
>
> + valid_outs++;
> ret = igt_output_commit(output, s, fail_on_error);
> CHECK_RETURN(ret, fail_on_error);
> }
>
> LOG_UNINDENT(display);
>
> + if (valid_outs == 0)
> + return -1;
> +
> igt_debug_wait_for_keypress("modeset");
>
> return 0;
> @@ -1712,9 +1717,7 @@ static int do_display_commit(igt_display_t *display,
> int igt_display_commit2(igt_display_t *display,
> enum igt_commit_style s)
> {
> - do_display_commit(display, s, true);
> -
> - return 0;
> + return do_display_commit(display, s, true);
Wouldn't igt_display_try_commit2() achieve the same thing?
> }
>
> /**
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20160219/2da64576/attachment.sig>
More information about the Intel-gfx
mailing list