summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-05-27 21:33:10 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-10-24 16:25:39 +0200
commit7296e09ee7f17e6d564e52cf64ee900670849429 (patch)
tree349aaf51c29dbff5ac54b89c5cae443fe560edd5 /tests/kms_flip.c
parente497600fb73d138e51a641f7792f11822c20a929 (diff)
tests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURF
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ä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r--tests/kms_flip.c4
1 files changed, 4 insertions, 0 deletions
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
@@ -929,6 +929,10 @@ static unsigned int run_test_step(struct test_output *o)
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;
+
igt_assert_f(set_mode(o, o->fb_ids[o->current_fb_id], x_ofs, 0) == 0,
"failed to pan (%dx%d@%dHz)+%d: %s\n",
o->kmode[0].hdisplay, o->kmode[0].vdisplay, o->kmode[0].vrefresh,