[Intel-gfx] [PATCH i-g-t] tests/kms_flip: Make panning tests actually pan all the time
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Fri Jun 30 14:57:37 UTC 2017
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
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 at linux.intel.com>
---
tests/kms_flip.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 14396d860c5e..ede5fd2ba9c5 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)
--
2.13.0
More information about the Intel-gfx
mailing list