tests/kms_flip: Make panning tests actually pan all the time
PATCH 1/1 tests/kms_flip: Make panning tests actually pan all the time
From: Ville Syrjälä <[email protected]>
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ä <[email protected]>
--- tests/kms_flip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tests/kms_flip.c +4 -1
@@ -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 )
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx