From 7296e09ee7f17e6d564e52cf64ee900670849429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 27 May 2014 21:33:10 +0300 Subject: [PATCH] tests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure DSPSURF will change during the panning operation in flip-vs-panning-vs-hang. This will now test agains bugs between the kernel's mmio vs. CS flip race handling and GPU resets. If the kernel is buggy if will fail to notice that the panning operation changed the base address before the GPU reset had a chance to deal with the pending page flips, and so the flip would never complete due to DSPSURFLIVE not matching the expected value. Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter --- tests/kms_flip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index f6c25a28..6fb291c9 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -925,6 +925,10 @@ static unsigned int run_test_step(struct test_output *o) o->flip_state.count : o->vblank_state.count; int x_ofs = min(count * 10, o->fb_width - o->kmode[0].hdisplay); + /* Make sure DSPSURF changes value */ + if (o->flags & TEST_HANG) + o->current_fb_id = !o->current_fb_id; + /* Make sure DSPSURF changes value */ if (o->flags & TEST_HANG) o->current_fb_id = !o->current_fb_id;