diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-09-20 21:00:09 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-10-09 20:48:11 +0300 |
commit | 4ac32f48a8668d928ccddfae1b4213fe7f35c390 (patch) | |
tree | 4c4917fde3eaaa67969025628bfdd685d074eef6 /lib | |
parent | eb57c0289dbd2bfb573bb1c104d80eaf5edc7228 (diff) |
lib/igt_kms: Don't assert on non-existent plane
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>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_kms.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index a572fc60..379bd0c3 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]; } |