[igt-dev] [PATCH i-g-t v1] tests/kms_cursor_legacy: Add check for overlay planes
Mark Yacoub
markyacoub at chromium.org
Tue Jul 19 14:10:59 UTC 2022
On Mon, Jul 18, 2022 at 6:16 PM Jessica Zhang <quic_jesszhan at quicinc.com> wrote:
>
> For the dynamic subtests atomic-transitions and
> atomic-transitions-varying-size, check if the pipe has an overlay plane
> before forking the process.
>
> This will avoid the test trying to skip within a forked process and
> throwing a SIGABRT.
>
> Signed-off-by: Jessica Zhang <quic_jesszhan at quicinc.com>
Reviewed-by: Mark Yacoub <markyacoub at chromium.org>
> ---
> tests/kms_cursor_legacy.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> index fc4a291d85b6..06751bac4f40 100644
> --- a/tests/kms_cursor_legacy.c
> +++ b/tests/kms_cursor_legacy.c
> @@ -438,6 +438,11 @@ static void flip(igt_display_t *display,
> if (mode >= flip_test_atomic)
> igt_require(display->is_atomic);
>
> + if (mode == flip_test_atomic_transitions ||
> + mode == flip_test_atomic_transitions_varying_size)
> + igt_require(igt_pipe_get_plane_type(&display->pipes[flip_pipe],
> + DRM_PLANE_TYPE_OVERLAY));
> +
nit: because it's spanning multiple lines, i'd prefer putting the
if-statement in { }
otherwise it looks reasonable to me.
> igt_require((output = set_fb_on_crtc(display, flip_pipe, &fb_info)));
> if (flip_pipe != cursor_pipe) {
> igt_require((output2 = set_fb_on_crtc(display, cursor_pipe, &fb_info2)));
> --
> 2.31.0
>
More information about the igt-dev
mailing list