[igt-dev] [PATCH i-g-t v2] tests/kms_cursor_crc: Wait extra vblank
Rob Clark
robdclark at chromium.org
Wed Sep 21 21:47:58 UTC 2022
On Wed, Sep 21, 2022 at 12:52 PM Abhinav Kumar
<quic_abhinavk at quicinc.com> wrote:
>
> Adding Ville
>
> On 9/20/2022 3:28 PM, Jessica Zhang wrote:
> > Wait an extra vblank for legacy cursor ioctl to finish.
> >
> > Extra vblank wait is needed for both HW and SW test as the legacy cursor
> > ioctl is called in both cases.
> >
> > Based on Rob's patch [1] and, similarly, fixes flaky results on MSM.
> >
> > Changes since V1:
> > - Only wait for an extra vblank for MSM driver
> >
> > Signed-off-by: Jessica Zhang <quic_jesszhan at quicinc.com>
>
> CI is happy with this one, this LGTM,
>
> Reviewed-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
Reviewed-by: Rob Clark <robdclark at chromium.org>
>
> >
> > [1] https://patchwork.freedesktop.org/series/105999/
> > ---
> > tests/kms_cursor_crc.c | 9 +++++----
> > 1 file changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> > index 53f18f4f1add..7c1f74be568d 100644
> > --- a/tests/kms_cursor_crc.c
> > +++ b/tests/kms_cursor_crc.c
> > @@ -185,6 +185,7 @@ static void do_single_test(data_t *data, int x, int y, bool hw_test,
> > igt_pipe_crc_t *pipe_crc = data->pipe_crc;
> > igt_crc_t crc;
> > int ret = 0, swbufidx;
> > + int vblank_wait_count = is_msm_device(data->drm_fd) ? 2 : 1;
> >
> > igt_print_activity();
> >
> > @@ -202,8 +203,8 @@ static void do_single_test(data_t *data, int x, int y, bool hw_test,
> > igt_display_commit(display);
> >
> > /* Extra vblank wait is because nonblocking cursor ioctl */
> > - igt_wait_for_vblank(data->drm_fd,
> > - display->pipes[data->pipe].crtc_offset);
> > + igt_wait_for_vblank_count(data->drm_fd,
> > + display->pipes[data->pipe].crtc_offset, vblank_wait_count);
> >
> > igt_pipe_crc_get_current(data->drm_fd, pipe_crc, hwcrc);
> >
> > @@ -243,8 +244,8 @@ static void do_single_test(data_t *data, int x, int y, bool hw_test,
> > igt_plane_set_fb(data->primary, &data->primary_fb[swbufidx]);
> >
> > igt_display_commit(display);
> > - igt_wait_for_vblank(data->drm_fd,
> > - display->pipes[data->pipe].crtc_offset);
> > + igt_wait_for_vblank_count(data->drm_fd,
> > + display->pipes[data->pipe].crtc_offset, vblank_wait_count);
> >
> > igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
> > igt_assert_crc_equal(&crc, hwcrc);
More information about the igt-dev
mailing list