tests/kms_cursor_legacy: Rework the 2x-*-vs-cursor-* tests.

Using the fancy new DRM_CAP_CRTC_IN_VBLANK_EVENT cap I can finally
make this test the work I originally intended to.

For the !modeset case that means performing a pageflip on both crtc's,
then requeueing as soon as the event is delivered and then check the
vblank counter against the original value, it should be advanced by 1.

The modeset case is slightly more complicated, ideally it's handled
the same, but if we can't perform a modeset and pageflip at the same
time, fall back to queueing both in a single commit, in which case
we can say nothing about the vblank counter.

There is a small race between flip_done and hw_done, so make
flip_nonblocking retry for a second when encountering -EBUSY.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101634
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
1 file changed