summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-06-30 17:51:47 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2017-07-07 17:10:10 +0300
commitf877275b1361f4d31e015a69a6c0c04b6ad38baf (patch)
tree338afdc4724dc04621f21fc5390d304ed38674ea /tests/kms_flip.c
parentb389bdb28424f7d271cbb82070116c0934eabc2f (diff)
tests/kms_flip: Make panning tests actually pan all the time
Currently the panning tests actually stop panning when they hit the right edge fo the framebuffer. Let's make them ping-pong across the fb to make it clear that they are indeed trying to pan around all the time. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r--tests/kms_flip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 14396d86..ede5fd2b 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -834,7 +834,10 @@ static unsigned int run_test_step(struct test_output *o)
if (o->flags & TEST_PAN) {
int count = do_flip ?
o->flip_state.count : o->vblank_state.count;
- int x_ofs = min(count * 10, o->fb_width - o->kmode[0].hdisplay);
+ int width = o->fb_width - o->kmode[0].hdisplay;
+ int x_ofs = count * 10 % (2 * width);
+ if (x_ofs >= width)
+ x_ofs = 2 * width - x_ofs;
/* Make sure DSPSURF changes value */
if (o->flags & TEST_HANG)