Again required a bit of shuffling to avoid expensive setup and some
logic to properly handling 'skip' when only running a subtest.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Small changes to avoid expensive setup just to print out the subtest
list, and setting up the source buffers such that "early-read" works
without having run "overwrite-soure" right beforehand.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
To make the testnames easier to handle in scripts, replace all
spaces with dashes.
The important part is to not print anything to stdout when enumerating
subtests, so protect the timestamp test with the right check.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Results in spurious 'warn' results in piglit. Also don't print
progress indicators when not outputting to a terminal.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This is getting in the way of piglit integration. If we want this
functionality again, we should integrate it into the IGT piglit runner
as an option.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Piglit needs a way to grab the latest list of tests to run, so add new
make targets to dump those. Note that for future extendability we'll
dump 2 different lists, one for single-testcase tests and one for
testcases with enumerable subcases. Some support code for the later
will follow in subsequent patches.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Since monotonic timestamps are now the preferred time format, change
timestamps checks to compare against monotonic instead of real time.
Also add two tests for DRM's compatibility mode where it returns real
timestamps.
v2: drop the tests for the compatibilty mode (Daniel)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The old way worked too, but just skipping the test for the first event
is more logical/simpler thing to do.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
In v2:
- Wait for the seq that just completed (current_seq) not last_seq - 1.
- Do an equality check for ts and seq instead of >=. The previous
issue didn't let us do this before.
- Simplify the condition when we do an "expired sequence" check by
only using the last flip event as a reference.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
We need a big enough duration, so the hotplug event's affect doesn't
distort our final frame count too much.
Without this these tests will exit with a "dropped frames" error.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
... using a fine roll of duct-tape. Dunno what exactly leaks out from
the previous testcase, but the bo gets moved about a bit and makes the
self-check of the test fail.
pageflip vs. pan is interesting since we wait for outstanding flips
before updating the fb base address. For vblank absolutely nothing
interesting happens.
15 seconds for timestamp checkers (to at least hit the dreaded hotplug
once), 5 seconds for fast tests that check every vblank something, 30
for slow test (dpms/modeset cycles).
Signed-off-by: Imre Deak <imre.deak@intel.com>
[danvet: add {} for multi-line but single-statement if block.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
At the moment select() would time out in case we don't get any event.
When we add vblank events in a later patch, it's possible that we
receive one type of events but not the other type. In this case select()
doesn't time out and we need another way to detect this.
Signed-off-by: Imre Deak <imre.deak@intel.com>
When we add the vblank tests later, it can happen that one type of event
is pending while we are servicing another. Prepare for that by
maintaining a pending/completed event mask.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Since later we want to add vblank tests where we don't want to flip,
make the flips and corresponding state checks conditional.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
For DRM_IOCTL_WAIT_VBLANK we'll have to pass the pipe id - as opposed to
the crtc id required by the rest of the IOCTLs we use.
Thanks for Chris Wilson for pointing this out.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
So far we skipped some tests for seq#0 and #1, since at that point we
were missing the 'last' state against which we could compare the current
state. Since in the previous patches we fixed the ordering in the test
loop and moved the increment of count to the update state phase, we have
a proper 'last' state for seq#1, so enable the tests already at that
point.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Factor out the status vars that are specific to the flip events into a
separate structure. This will allow us tracking the vblank events with
the same code.
We move the increment of the flip event counter to the end of the test
loop, but this shouldn't affect anything. This is the only functional
change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
At the moment we first check the state then run the test step in our
test loop. Swapping the order makes the starting state of each iteration
better defined, allowing an easier extension of these steps in the
future.
Since now it's guaranteed that we exit the event loop with no pending
flips, we can also get rid of the final flushing of events.
We don't want the first initializing flip to affect the test loop other
than setting an initial FB, so before starting the test loop wait for it
to complete by calling wait_for_events() and leave the flip event
counter at zero.
Signed-off-by: Imre Deak <imre.deak@intel.com>
The handler consits of handle_event/run_test/check_state/update_state
logical steps, split the function accordingly. This is needed by the
following patches that need to do part of these steps for both flip and
vblank events.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
This is needed by the next patch that splits the flip handler function
into logical parts. Make the timestamps accesible to these parts.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Needed by an upcoming patch where we want to make a final state check
for both the flip and vblank events.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Needed by an upcoming patch where we want to wait for an event without
starting a new round of test run.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Move the panning to a more logical place where the rest of the test
steps are performed. As Daniel Vetter pointed it out, the proper place
is _after_ the flip command is sent, so that fb_set_base correctly waits
for any outstanding flip. So move the function between the flip and the
dpms/modeset off calls.
Signed-off-by: Imre Deak <imre.deak@intel.com>
We will need these in event handlers, so store them where the handlers
have access to them.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
For better readability and to prepare for the upcoming patch marking
pending flip events with a flag.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The intent for the time limit seems to be 2ms, but the current condition
will result in a 1s limit and makes the check against tv_usec redundant.
Fix the condition to check for a 2ms limit.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>