[Intel-gfx] [PATCH i-g-t 3/5] lib/kms: Skip rather than fail when a suitable plane can't be found

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Thu Sep 7 16:11:18 UTC 2017


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

If the system doesn't have the plane the test wants, let's skip the
test rather than fail it.

Signed-off-by: Ville Syrjälä <ville.syrjala at 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 14e2701c3afd..72fde792ba89 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2035,9 +2035,9 @@ igt_plane_t *igt_pipe_get_plane_type(igt_pipe_t *pipe, int plane_type)
 		break;
 	}
 
-	igt_assert_f(plane_idx >= 0 && plane_idx < pipe->n_planes,
-		"Valid pipe->planes idx not found. plane_idx=%d plane_type=%d n_planes=%d\n",
-		plane_idx, plane_type, pipe->n_planes);
+	igt_require_f(plane_idx >= 0 && plane_idx < pipe->n_planes,
+		      "Valid pipe->planes idx not found. plane_idx=%d plane_type=%d n_planes=%d\n",
+		      plane_idx, plane_type, pipe->n_planes);
 
 	return &pipe->planes[plane_idx];
 }
-- 
2.13.5



More information about the Intel-gfx mailing list