From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Mika Kahola <mika.kahola@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 2/2] tests/kms_plane_multiple: Cleanup in favor of library functions
Date: Mon, 16 Jan 2017 14:27:01 +0100 [thread overview]
Message-ID: <f73d195e-dbe6-d5cb-1221-e7c10d93b44e@linux.intel.com> (raw)
In-Reply-To: <1484572153-28840-3-git-send-email-mika.kahola@intel.com>
Op 16-01-17 om 14:09 schreef Mika Kahola:
> Cleaunup by replacing get_vblank() function with library function
> kmstest_get_vblank().
>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
> tests/kms_plane_multiple.c | 27 +++------------------------
> 1 file changed, 3 insertions(+), 24 deletions(-)
>
> diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
> index 6257a8b..f66f41a 100644
> --- a/tests/kms_plane_multiple.c
> +++ b/tests/kms_plane_multiple.c
> @@ -67,28 +67,6 @@ struct {
> .seed = 1,
> };
>
> -static inline uint32_t pipe_select(int pipe)
> -{
> - if (pipe > 1)
> - return pipe << DRM_VBLANK_HIGH_CRTC_SHIFT;
> - else if (pipe > 0)
> - return DRM_VBLANK_SECONDARY;
> - else
> - return 0;
> -}
> -
> -static unsigned int get_vblank(int fd, int pipe, unsigned int flags)
> -{
> - union drm_wait_vblank vbl;
> -
> - memset(&vbl, 0, sizeof(vbl));
> - vbl.request.type = DRM_VBLANK_RELATIVE | pipe_select(pipe) | flags;
> - if (drmIoctl(fd, DRM_IOCTL_WAIT_VBLANK, &vbl))
> - return 0;
> -
> - return vbl.reply.sequence;
> -}
> -
> /*
> * Common code across all tests, acting on data_t
> */
> @@ -263,7 +241,8 @@ test_atomic_plane_position_with_output(data_t *data, enum pipe pipe,
> while (i < iterations || loop_forever) {
> prepare_planes(data, pipe, &blue, tiling, max_planes, output);
>
> - vblank_start = get_vblank(data->display.drm_fd, pipe, DRM_VBLANK_NEXTONMISS);
> + vblank_start = kmstest_get_vblank(data->display.drm_fd, pipe,
> + DRM_VBLANK_NEXTONMISS);
>
> igt_display_commit_atomic(&data->display,
> DRM_MODE_PAGE_FLIP_EVENT,
> @@ -274,7 +253,7 @@ test_atomic_plane_position_with_output(data_t *data, enum pipe pipe,
> ret = read(data->display.drm_fd, buf, sizeof(buf));
> igt_assert(ret >= 0);
>
> - vblank_stop = get_vblank(data->display.drm_fd, pipe, 0);
> + vblank_stop = kmstest_get_vblank(data->display.drm_fd, pipe, 0);
> igt_assert_eq(e->type, DRM_EVENT_FLIP_COMPLETE);
> igt_reset_timeout();
>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2017-01-16 13:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-16 13:09 [PATCH i-g-t 0/2] tests/kms_plane_multiple: Fix CI issues Mika Kahola
2017-01-16 13:09 ` [PATCH i-g-t 1/2] tests/kms_plane_multiple: Relax atomic commit time requirement Mika Kahola
2017-01-16 13:26 ` Maarten Lankhorst
2017-01-16 13:31 ` Mika Kahola
2017-01-16 13:09 ` [PATCH i-g-t 2/2] tests/kms_plane_multiple: Cleanup in favor of library functions Mika Kahola
2017-01-16 13:27 ` Maarten Lankhorst [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f73d195e-dbe6-d5cb-1221-e7c10d93b44e@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kahola@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox