Commit 5763c890 authored by Gabriel Krisman Bertazi's avatar Gabriel Krisman Bertazi Committed by Arkadiusz Hiler

lib/igt_kms: Fix off-by-one bug on skip of missing pipe

display->n_pipes is zero-indexed, so N returned in
igt_display_get_n_pipes is already not a valid pipe.  This patch
prevents kms_ccs from going nuts when testing the first unexisting pipe.
Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Ben Widawsky's avatarBen Widawsky <ben@bwidawsk.net>
parent 5ab074fc
......@@ -1955,7 +1955,7 @@ void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe)
{
igt_output_t *output;
igt_skip_on_f(igt_display_get_n_pipes(display) < pipe,
igt_skip_on_f(pipe >= igt_display_get_n_pipes(display),
"Pipe %s does not exist.\n", kmstest_pipe_name(pipe));
for_each_valid_output_on_pipe(display, pipe, output)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment