All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/6] lib/igt_kms: Don't assert on non-existent plane
@ 2017-09-21 14:39 Ville Syrjala
  2017-09-21 14:39 ` [PATCH i-g-t 2/6] tests/kms_mmio_vs_cs_flip: Reduce blit width Ville Syrjala
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Ville Syrjala @ 2017-09-21 14:39 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Skip when a test can't find a plane by the index. Previously
in commit 5426dc0a889a ("lib/kms: Skip rather than fail when
a suitable plane can't be found") we added similar handling for
tests trying to find a non-existent plane by type. Saves from
every test with hardcoded plane numbers having to check the
number of planes available.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_kms.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7bcafc072f70..83ebb42e6c9a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2008,9 +2008,9 @@ static igt_pipe_t *igt_output_get_driving_pipe(igt_output_t *output)
 
 static igt_plane_t *igt_pipe_get_plane(igt_pipe_t *pipe, int plane_idx)
 {
-	igt_assert_f(plane_idx >= 0 && plane_idx < pipe->n_planes,
-		"Valid pipe->planes plane_idx not found, plane_idx=%d n_planes=%d",
-		plane_idx, pipe->n_planes);
+	igt_require_f(plane_idx >= 0 && plane_idx < pipe->n_planes,
+		      "Valid pipe->planes plane_idx not found, plane_idx=%d n_planes=%d",
+		      plane_idx, pipe->n_planes);
 
 	return &pipe->planes[plane_idx];
 }
-- 
2.13.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-09-27 11:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 14:39 [PATCH i-g-t 1/6] lib/igt_kms: Don't assert on non-existent plane Ville Syrjala
2017-09-21 14:39 ` [PATCH i-g-t 2/6] tests/kms_mmio_vs_cs_flip: Reduce blit width Ville Syrjala
2017-09-21 14:39 ` [PATCH i-g-t 3/6] lib/igt_fb: Add igt_cairo_image_surface_create_from_png() Ville Syrjala
2017-09-22  9:52   ` Petri Latvala
2017-09-22 12:05     ` Ville Syrjälä
2017-09-22 12:33       ` Petri Latvala
2017-09-21 14:39 ` [PATCH i-g-t 4/6] tests/kms_panel_fitting: Use igt_cairo_image_surface_create_from_png_file() Ville Syrjala
2017-09-22  9:53   ` Petri Latvala
2017-09-21 14:39 ` [PATCH i-g-t 5/6] tests/kms_panel_fitting: Skip sprite test if we exceed sprite scaling limits Ville Syrjala
2017-09-27 11:34   ` Petri Latvala
2017-09-21 14:39 ` [PATCH i-g-t 6/6] tests/kms_draw_crc: Skip tests for unsupported formats Ville Syrjala
2017-09-27 11:38   ` Petri Latvala
2017-09-21 16:20 ` ✗ Fi.CI.BAT: warning for series starting with [1/6] lib/igt_kms: Don't assert on non-existent plane Patchwork
2017-09-22 15:53 ` ✓ Fi.CI.BAT: success " Patchwork
2017-09-22 21:41 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-27 11:53 ` [PATCH i-g-t 1/6] " Petri Latvala

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.