From: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@intel.com, tomeu.vizoso@collabora.com
Subject: [PATCH i-g-t v4 2/6] lib/igt_kms: Fix off-by-one bug on skip of missing pipe
Date: Wed, 27 Sep 2017 15:34:15 -0300 [thread overview]
Message-ID: <20170927183419.13904-2-krisman@collabora.co.uk> (raw)
In-Reply-To: <20170927183419.13904-1-krisman@collabora.co.uk>
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 unxesting pipe.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
lib/igt_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7bcafc072f70..c7b169afba54 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1865,7 +1865,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)
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-27 18:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 18:34 [PATCH i-g-t v4 1/6] tests/kms_ccs: Test pipes other than pipe A Gabriel Krisman Bertazi
2017-09-27 18:34 ` Gabriel Krisman Bertazi [this message]
2017-09-28 8:33 ` [PATCH i-g-t v4 2/6] lib/igt_kms: Fix off-by-one bug on skip of missing pipe Petri Latvala
2017-09-27 18:34 ` [PATCH i-g-t v4 3/6] tests/kms_ccs: Prevent segfault if pipe is not supported Gabriel Krisman Bertazi
2017-10-03 10:49 ` Arkadiusz Hiler
2017-10-03 16:07 ` Ben Widawsky
2017-09-27 18:34 ` [PATCH i-g-t v4 4/6] tests/kms_ccs: Test case where the CCS buffer was not provided Gabriel Krisman Bertazi
2017-10-03 11:32 ` Arkadiusz Hiler
2017-10-03 16:35 ` Ben Widawsky
2017-10-09 6:14 ` Gabriel Krisman Bertazi
2017-10-30 16:02 ` Ville Syrjälä
2017-10-31 1:33 ` Gabriel Krisman Bertazi
2017-09-27 18:34 ` [PATCH i-g-t v4 5/6] tests/kms_ccs: Test case where CCS is on a different BO Gabriel Krisman Bertazi
2017-10-03 11:00 ` Arkadiusz Hiler
2017-10-03 16:38 ` Ben Widawsky
2017-10-09 6:18 ` Gabriel Krisman Bertazi
2017-09-27 18:34 ` [PATCH i-g-t v4 6/6] tests/kms_ccs: Test case for wrong aux buffer stride size Gabriel Krisman Bertazi
2017-10-03 10:57 ` Arkadiusz Hiler
2017-10-30 15:59 ` Ville Syrjälä
2017-10-03 16:40 ` Ben Widawsky
2017-10-09 6:03 ` Gabriel Krisman Bertazi
2017-10-30 16:04 ` Ville Syrjälä
2017-09-27 18:58 ` ✓ Fi.CI.BAT: success for series starting with [v4,1/6] tests/kms_ccs: Test pipes other than pipe A Patchwork
2017-09-27 23:42 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-09-28 16:06 ` Patchwork
2017-10-03 10:44 ` [PATCH i-g-t v4 1/6] " Arkadiusz Hiler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170927183419.13904-2-krisman@collabora.co.uk \
--to=krisman@collabora.co.uk \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tomeu.vizoso@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.