From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.
Date: Wed, 8 Jun 2016 13:25:32 +0200 [thread overview]
Message-ID: <1465385132-17605-2-git-send-email-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <1465385132-17605-1-git-send-email-maarten.lankhorst@linux.intel.com>
This reduces the runtime of the tests from ~200s on my 30 fps 4k panel
to 10s.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
tests/kms_chv_cursor_fail.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
index 11d01f54e511..8f878cbffe96 100644
--- a/tests/kms_chv_cursor_fail.c
+++ b/tests/kms_chv_cursor_fail.c
@@ -109,24 +109,26 @@ static void cursor_move(data_t *data, int x, int y, int i)
}
#define XSTEP 8
-#define YSTEP 32
-#define XOFF 0
+#define YSTEP 8
#define NCRC 128
static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
{
igt_crc_t *crc = NULL;
- int i, n, x, xdir;
+ int i, n, x, xdir, dx;
if (sx > ex)
xdir = -1;
else
xdir = 1;
+ dx = (ex - sx)/XSTEP;
+
igt_pipe_crc_start(data->pipe_crc);
i = 0;
- for (x = sx + XOFF; xdir * (x - ex - XOFF) <= 0; x += xdir * XSTEP) {
+
+ for (x = sx; xdir * (x - ex) <= 0; x += dx) {
int xx, yy;
if (swap_axis) {
@@ -168,21 +170,23 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
static void test_edge(data_t *data, int sy, int ey, int sx, int ex, bool swap_axis)
{
int crtc_id = data->output->config.crtc->crtc_id;
- int y, ydir;
+ int y, ydir, dy;
if (sy > ey)
ydir = -1;
else
ydir = 1;
+ dy = (ey - sy) / YSTEP;
+
igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
igt_assert_eq(drmModeSetCursor(data->drm_fd, crtc_id, data->fb.gem_handle, data->curw, data->curh), 0);
for (y = sy; ydir * (y - ey) <= 0; ) {
test_edge_pos(data, sx, ex, y, swap_axis);
- y += ydir * YSTEP;
+ y += dy;
test_edge_pos(data, ex, sx, y, swap_axis);
- y += ydir * YSTEP;
+ y += dy;
}
igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
--
2.5.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-06-08 11:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 11:25 [PATCH i-g-t 1/2] tests/kms_chv_cursor_fail: Remove extra igt_pipe_crc_start Maarten Lankhorst
2016-06-08 11:25 ` Maarten Lankhorst [this message]
2016-06-08 13:12 ` [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps Ville Syrjälä
2016-06-08 13:23 ` Maarten Lankhorst
2016-06-08 13:35 ` Ville Syrjälä
2016-06-08 14:47 ` Maarten Lankhorst
2016-06-08 14:52 ` Ville Syrjälä
2016-06-13 13:45 ` Maarten Lankhorst
2016-06-08 13:14 ` [PATCH i-g-t 1/2] tests/kms_chv_cursor_fail: Remove extra igt_pipe_crc_start Ville Syrjälä
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=1465385132-17605-2-git-send-email-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.