summaryrefslogtreecommitdiff
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-05-27 21:03:59 +0200
commite4ba3b75e6de35483b2edea21ceda145ef0b3311 (patch)
tree149327785977de82e0a36973fd915979c771b37c
parent3805288f1a28abebb9313b515d5e48ba06350020 (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>
-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 dd641821..6711f095 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -923,6 +923,10 @@ static unsigned int run_test_step(struct test_output *o)
o->flip_state.count : o->vblank_state.count;
int x_ofs = count * 10 > o->fb_width - o->kmode[0].hdisplay ? o->fb_width - o->kmode[0].hdisplay : count * 10;
+ /* 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,