[Intel-gfx] [PATCH i-g-t 1/6] lib/igt_kms: Don't assert on non-existent plane
Petri Latvala
petri.latvala at intel.com
Wed Sep 27 11:53:31 UTC 2017
On Thu, Sep 21, 2017 at 05:39:28PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at 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.
Do you have a list of such tests? I didn't see any results in CI
change from fail to skip so I presume this means all existing tests
check the number of planes available.
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala at 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list