platform/upstream/intel-gpu-tools.git
11 years agotests/gem_cacheing: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 10:41:33 +0000 (11:41 +0100)]
tests/gem_cacheing: convert to subtest infrastructure

11 years agotests/gem_basic: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 10:16:44 +0000 (11:16 +0100)]
tests/gem_basic: convert to subtest infrastructure

11 years agotests/flip_test: use subtest infrastructure
Daniel Vetter [Tue, 27 Nov 2012 19:33:15 +0000 (20:33 +0100)]
tests/flip_test: use subtest infrastructure

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>
11 years agolib/drmtest: subtest infrastructure
Daniel Vetter [Tue, 27 Nov 2012 19:03:25 +0000 (20:03 +0100)]
lib/drmtest: subtest infrastructure

To make these helpers as least invasive as possible simply initialize
the options with a getopt parser and let the control flow be steered
with a simple helper which gets the subtest name as an argument.

The only tricky part for using it is that the subtest check helper
doubles up as the conduit to enumerate tests (and in that mode
prevents any test from being run). It is therefore important that
nothing gets printed to stdout outside of these checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: dont polute stderr if the test succeeds/skips
Daniel Vetter [Tue, 27 Nov 2012 19:04:15 +0000 (20:04 +0100)]
tests: dont polute stderr if the test succeeds/skips

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>
11 years agotests: remove ZZ_check_dmesg from runner
Daniel Vetter [Tue, 27 Nov 2012 15:38:43 +0000 (16:38 +0100)]
tests: remove ZZ_check_dmesg from runner

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>
11 years agotests: infrastructure for piglit runner
Daniel Vetter [Wed, 28 Nov 2012 10:08:31 +0000 (11:08 +0100)]
tests: infrastructure for piglit runner

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>
11 years agotestdisplay: Use the fb stride when painting the color key
Damien Lespiau [Tue, 27 Nov 2012 19:14:05 +0000 (19:14 +0000)]
testdisplay: Use the fb stride when painting the color key

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55901

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: add gem_non_secure_batch
Daniel Vetter [Sun, 25 Nov 2012 12:55:55 +0000 (13:55 +0100)]
tests: add gem_non_secure_batch

11 years agoflip_test: switch to using monotonic timestamps (v2)
Imre Deak [Thu, 22 Nov 2012 14:46:36 +0000 (16:46 +0200)]
flip_test: switch to using monotonic timestamps (v2)

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>
11 years agoflip_test: use monotonic time to measure the test duration
Imre Deak [Thu, 22 Nov 2012 13:25:05 +0000 (15:25 +0200)]
flip_test: use monotonic time to measure the test duration

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: skip check for last_received_ts for the first event
Imre Deak [Thu, 22 Nov 2012 13:25:04 +0000 (15:25 +0200)]
flip_test: skip check for last_received_ts for the first event

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>
11 years agoflip_test: add wf-vblank test for expired sequence
Imre Deak [Tue, 23 Oct 2012 09:07:52 +0000 (12:07 +0300)]
flip_test: add wf-vblank test for expired sequence

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>
11 years agoflip_test: add comment about the race between flip vs. vblank events
Imre Deak [Mon, 22 Oct 2012 17:40:07 +0000 (20:40 +0300)]
flip_test: add comment about the race between flip vs. vblank events

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: check if the vblank and flip states correlate
Imre Deak [Mon, 22 Oct 2012 17:40:06 +0000 (20:40 +0300)]
flip_test: check if the vblank and flip states correlate

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: fixup zero timestamp for premature vblanks
Imre Deak [Mon, 22 Oct 2012 17:40:05 +0000 (20:40 +0300)]
flip_test: fixup zero timestamp for premature vblanks

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: increase duration for vbl+flip tests with ts check
Imre Deak [Mon, 22 Oct 2012 17:40:04 +0000 (20:40 +0300)]
flip_test: increase duration for vbl+flip tests with ts check

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>
11 years agotests/gem_cs_tlb: make it more robust
Daniel Vetter [Thu, 18 Oct 2012 20:37:20 +0000 (22:37 +0200)]
tests/gem_cs_tlb: make it more robust

... 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.

11 years agoflip_test: check whether wait_vblank fails when it should
Daniel Vetter [Wed, 17 Oct 2012 09:09:13 +0000 (11:09 +0200)]
flip_test: check whether wait_vblank fails when it should

11 years agoflip_test: drop vblank vs. pan
Daniel Vetter [Tue, 16 Oct 2012 22:35:43 +0000 (00:35 +0200)]
flip_test: drop vblank vs. pan

pageflip vs. pan is interesting since we wait for outstanding flips
before updating the fb base address. For vblank absolutely nothing
interesting happens.

11 years agoflip_test: tune test-durations a bit
Daniel Vetter [Tue, 16 Oct 2012 22:34:43 +0000 (00:34 +0200)]
flip_test: tune test-durations a bit

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).

11 years agoflip_test: add wait-for-vblank tests
Imre Deak [Tue, 16 Oct 2012 02:43:19 +0000 (05:43 +0300)]
flip_test: add wait-for-vblank tests

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>
11 years agoflip_test: add check to see if any event has occured
Imre Deak [Tue, 16 Oct 2012 01:11:43 +0000 (04:11 +0300)]
flip_test: add check to see if any event has occured

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>
11 years agoflip_test: add event sequence number tracking
Imre Deak [Tue, 16 Oct 2012 01:09:43 +0000 (04:09 +0300)]
flip_test: add event sequence number tracking

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agoflip_test: add logic to track pending events
Imre Deak [Mon, 15 Oct 2012 22:47:15 +0000 (01:47 +0300)]
flip_test: add logic to track pending events

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>
11 years agoflip_test: make page flip tests conditional
Imre Deak [Mon, 15 Oct 2012 22:47:15 +0000 (01:47 +0300)]
flip_test: make page flip tests conditional

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>
11 years agoflip_test: unify the name of the current test in status messages
Imre Deak [Mon, 15 Oct 2012 18:18:40 +0000 (21:18 +0300)]
flip_test: unify the name of the current test in status messages

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agoflip_test: store the pipe id in the test context obj
Imre Deak [Mon, 15 Oct 2012 18:15:18 +0000 (21:15 +0300)]
flip_test: store the pipe id in the test context obj

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>
11 years agoflip_test: don't skip checks for sequence #1
Imre Deak [Tue, 16 Oct 2012 13:18:08 +0000 (16:18 +0300)]
flip_test: don't skip checks for sequence #1

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>
11 years agoflip_test: factor out the event state
Imre Deak [Mon, 15 Oct 2012 17:37:01 +0000 (20:37 +0300)]
flip_test: factor out the event state

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>
11 years agoflip_test: swap the order of check state/run test step
Imre Deak [Mon, 15 Oct 2012 23:41:02 +0000 (02:41 +0300)]
flip_test: swap the order of check state/run test step

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>
11 years agoflip_test: split the flip handler into logical parts
Imre Deak [Mon, 15 Oct 2012 23:37:15 +0000 (02:37 +0300)]
flip_test: split the flip handler into logical parts

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>
11 years agoflip_test: store current flip/received timestamps in the context obj
Imre Deak [Mon, 15 Oct 2012 23:26:35 +0000 (02:26 +0300)]
flip_test: store current flip/received timestamps in the context obj

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>
11 years agoflip_test: factor out the final state check
Imre Deak [Tue, 16 Oct 2012 02:50:22 +0000 (05:50 +0300)]
flip_test: factor out the final state check

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>
11 years agoflip_test: factor out the event loop/wait for event logic
Imre Deak [Fri, 12 Oct 2012 10:31:25 +0000 (13:31 +0300)]
flip_test: factor out the event loop/wait for event logic

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>
11 years agoflip_test: move output panning inside the flip_handler
Imre Deak [Wed, 10 Oct 2012 11:47:51 +0000 (14:47 +0300)]
flip_test: move output panning inside the flip_handler

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>
11 years agoflip_test: store fb width, height in test context object
Imre Deak [Wed, 10 Oct 2012 09:01:28 +0000 (12:01 +0300)]
flip_test: store fb width, height in test context object

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>
11 years agoflip_test: factor out drmModePageFlip
Imre Deak [Tue, 16 Oct 2012 14:34:41 +0000 (17:34 +0300)]
flip_test: factor out drmModePageFlip

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>
11 years agotest_flip: fix checking for delayed event reception
Imre Deak [Tue, 16 Oct 2012 14:34:39 +0000 (17:34 +0300)]
test_flip: fix checking for delayed event reception

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>
11 years agoflip_test: check drmHandleEvents()' return value
Imre Deak [Tue, 16 Oct 2012 14:34:38 +0000 (17:34 +0300)]
flip_test: check drmHandleEvents()' return value

Signed-off-by: Imre Deak <imre.deak@intel.com>
[danvet: s/assert/do_or_die]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: reset the state for each test run
Imre Deak [Tue, 16 Oct 2012 14:34:37 +0000 (17:34 +0300)]
flip_test: reset the state for each test run

Each test run needs a clean state.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: free FBs after each test run
Imre Deak [Tue, 16 Oct 2012 14:34:36 +0000 (17:34 +0300)]
flip_test: free FBs after each test run

Though the FBs will be freed implicitly at process exit, with the
growing number of test cases it's probably better not to let them
accumulate and free them as soon as we can.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrmtest: add function to remove an DRM FB
Imre Deak [Tue, 16 Oct 2012 14:34:35 +0000 (17:34 +0300)]
drmtest: add function to remove an DRM FB

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agosysfs_rps: Add negative test case for bad values
Ben Widawsky [Mon, 15 Oct 2012 17:05:56 +0000 (10:05 -0700)]
sysfs_rps: Add negative test case for bad values

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agolib/mmio: gen2 has a bigger register window, too
Daniel Vetter [Fri, 12 Oct 2012 08:45:52 +0000 (10:45 +0200)]
lib/mmio: gen2 has a bigger register window, too

It's split up into two parts, with the gtt pte range in between.
Without this I couldn't read the ADPA register ...

11 years agofix warn in testdisplay: ignoring return value of 'chdir'
Imre Deak [Wed, 10 Oct 2012 13:04:45 +0000 (16:04 +0300)]
fix warn in testdisplay: ignoring return value of 'chdir'

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofix warn in prime_nv_*: ignoring return value of ‘fgets’
Imre Deak [Wed, 10 Oct 2012 13:04:44 +0000 (16:04 +0300)]
fix warn in prime_nv_*: ignoring return value of â€˜fgets’

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofix warn in gem_reg_read: 'read' shadows a global declaration
Imre Deak [Wed, 10 Oct 2012 13:04:43 +0000 (16:04 +0300)]
fix warn in gem_reg_read: 'read' shadows a global declaration

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofix warn in sysfs_{rc6, rps}*: ignoring return value of 'fscanf'
Imre Deak [Wed, 10 Oct 2012 13:04:42 +0000 (16:04 +0300)]
fix warn in sysfs_{rc6, rps}*: ignoring return value of 'fscanf'

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofix warn in gem_readwrite: 'read/write' shadows a global declaration
Imre Deak [Wed, 10 Oct 2012 13:04:41 +0000 (16:04 +0300)]
fix warn in gem_readwrite: 'read/write' shadows a global declaration

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofix warn in intel_reg_snapshot: ignoring return value of 'write'
Imre Deak [Wed, 10 Oct 2012 13:04:40 +0000 (16:04 +0300)]
fix warn in intel_reg_snapshot: ignoring return value of 'write'

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofix warn in intel_error_decode: ignoring return value of 'asprintf'
Imre Deak [Wed, 10 Oct 2012 13:04:39 +0000 (16:04 +0300)]
fix warn in intel_error_decode: ignoring return value of 'asprintf'

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agofix warn: 'div' shadows a global declaration
Imre Deak [Wed, 10 Oct 2012 13:04:38 +0000 (16:04 +0300)]
fix warn: 'div' shadows a global declaration

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_exec_big: fixups
Daniel Vetter [Tue, 9 Oct 2012 20:47:59 +0000 (22:47 +0200)]
tests/gem_exec_big: fixups

- don't emit a self-modifying batch, the kernel doesn't like those
- also change the buffer size, to exercise all corner-cases of the
  sg_table stuff

11 years agotests/gem_exec_big: add a reloc at the end of the big batch
Daniel Vetter [Tue, 9 Oct 2012 17:43:28 +0000 (19:43 +0200)]
tests/gem_exec_big: add a reloc at the end of the big batch

Since that's the other place where the broken get_page blows up.

Actually it seems to only blow up on specific pages ...

11 years agotests: add big batchbuffer test
Daniel Vetter [Tue, 9 Oct 2012 17:29:02 +0000 (19:29 +0200)]
tests: add big batchbuffer test

... and use it in the hangman to stress the error_state capture a bit more.

Uncovered a bug in the obj->pages ->obj->sg_list rework.

11 years agolib: remove auto-quiescenting of the gpu
Daniel Vetter [Tue, 9 Oct 2012 17:27:41 +0000 (19:27 +0200)]
lib: remove auto-quiescenting of the gpu

In retrospective, this is an ugly idea. Any tests that needs this
can call it themselves.

11 years agolib: make drmtest_progress more robust
Daniel Vetter [Tue, 9 Oct 2012 15:50:40 +0000 (17:50 +0200)]
lib: make drmtest_progress more robust

11 years agotests: update .gitignore
Daniel Vetter [Tue, 9 Oct 2012 15:32:00 +0000 (17:32 +0200)]
tests: update .gitignore

I've thought I've fixed this, but looks like I've failed to commit.

11 years agotests: add gem_cs_tlb
Daniel Vetter [Tue, 9 Oct 2012 15:30:59 +0000 (17:30 +0200)]
tests: add gem_cs_tlb

Should test tlb coherency, but somehow it fails to hit the bug I want
it to hit ... needs more work.

11 years agotests/gem_cs_prefetch: clarify what it tests
Daniel Vetter [Tue, 9 Oct 2012 13:51:13 +0000 (15:51 +0200)]
tests/gem_cs_prefetch: clarify what it tests

I've forgotten ;-)

11 years agotests/flip_test: check -EBUSY and -EINVAL behaviour
Daniel Vetter [Thu, 4 Oct 2012 19:40:54 +0000 (21:40 +0200)]
tests/flip_test: check -EBUSY and -EINVAL behaviour

We want -EBUSY for a pending flip and -EINVAL if the pipe is off
(either dpms off or completely off). With the small exception that
someone thought it would be funny to return -EBUSY when the crtc is
fully off.

11 years agotests/*storedw*: add subcases with more outstanding batches
Daniel Vetter [Thu, 4 Oct 2012 11:22:16 +0000 (13:22 +0200)]
tests/*storedw*: add subcases with more outstanding batches

Just in case this is better at hitting seqno signalling races ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: fix timestamp order
Daniel Vetter [Wed, 3 Oct 2012 21:16:18 +0000 (23:16 +0200)]
flip_test: fix timestamp order

When grabbing the timestamp after a flip, it has a decent chance to
actually be after the flip. Surprising.

11 years agotests/gem_caching: only disable on vintage i965g/gm
Daniel Vetter [Wed, 3 Oct 2012 16:57:40 +0000 (18:57 +0200)]
tests/gem_caching: only disable on vintage i965g/gm

Hooray for confusing macros!

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: add drm_threaded_access_tiled
Daniel Vetter [Wed, 3 Oct 2012 11:44:30 +0000 (13:44 +0200)]
tests: add drm_threaded_access_tiled

This catches parallel access to bo->virtual causing sigbus

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: applied some bikeshed
- changed prefix from drm_ to gem_, it's a kernel gem test
- added autohell magic to link with pthreads
- .gitignore entry
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: add an explicit flag for timing checks
Daniel Vetter [Tue, 2 Oct 2012 19:29:57 +0000 (21:29 +0200)]
flip_test: add an explicit flag for timing checks

We'll need this for the wait_vblank test cases.

11 years agogem_cpu_reloc: Do another pass explicitly moving to the CPU write domain
Chris Wilson [Tue, 2 Oct 2012 20:40:46 +0000 (21:40 +0100)]
gem_cpu_reloc: Do another pass explicitly moving to the CPU write domain

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agogem_cpu_reloc: Use the mappable aperture size!
Chris Wilson [Tue, 2 Oct 2012 20:04:36 +0000 (21:04 +0100)]
gem_cpu_reloc: Use the mappable aperture size!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agogem_cpu_reloc: And run the test in reverse to check with already bound batches
Chris Wilson [Tue, 2 Oct 2012 20:02:22 +0000 (21:02 +0100)]
gem_cpu_reloc: And run the test in reverse to check with already bound batches

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agogem_cpu_reloc: Fix for running on SNB+
Chris Wilson [Tue, 2 Oct 2012 19:50:17 +0000 (20:50 +0100)]
gem_cpu_reloc: Fix for running on SNB+

I work with these everyday and I still made a basic mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agoflip_test: increase runtime of the plain flip to 15s
Daniel Vetter [Tue, 2 Oct 2012 17:42:11 +0000 (19:42 +0200)]
flip_test: increase runtime of the plain flip to 15s

This ensures that we'll hit the stupid hpd poll handler in every run.

Also don't yell around about jitter for tv outputs ...

11 years agotests/flip_test: measure inter-frame ts jitter
Daniel Vetter [Tue, 2 Oct 2012 17:33:30 +0000 (19:33 +0200)]
tests/flip_test: measure inter-frame ts jitter

Yell if it's wrong.

For some odd reason this blows up on my snb. And always on the same
o->count frame on the 2nd crtc ... And we have to thank the hpd poll
helper for that. Comment explaining this added, also made the error
non-fatal.

11 years agoflip_test: race against modesets, too
Daniel Vetter [Tue, 2 Oct 2012 15:38:04 +0000 (17:38 +0200)]
flip_test: race against modesets, too

Even slower than dpms switching ;-)

11 years agogem_wait_render_timeout: Fix SKIP return code
Chris Wilson [Tue, 2 Oct 2012 18:22:37 +0000 (19:22 +0100)]
gem_wait_render_timeout: Fix SKIP return code

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: Add gem_cpu_reloc
Chris Wilson [Tue, 2 Oct 2012 16:27:16 +0000 (17:27 +0100)]
tests: Add gem_cpu_reloc

Attempt to stress test performing relocations whilst the batch is in the
CPU domain.

A freshly allocated buffer starts in the CPU domain, and the pwrite
should also be performed whilst in the CPU domain and so we should
execute the relocations within the CPU domain. If for any reason one of
those steps should land it in the GTT domain, we take the secondary
precaution of filling the mappable portion of the GATT.

In order to detect whether a relocation fails, we first fill a target
buffer with a sequence of invalid commands that would cause the GPU to
immediate hang, and then attempt to overwrite them with a legal, if
short, batchbuffer using a BLT. Then we come to execute the bo, if the
relocation fail and we either copy across all zeros or garbage, then the
GPU will hang.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/flip_test: also test pannning with dummy load
Daniel Vetter [Tue, 2 Oct 2012 15:22:09 +0000 (17:22 +0200)]
tests/flip_test: also test pannning with dummy load

Needs a bit more relaxed select timeout to work (which is not
required when testing dummy_load vs. dpms, since the dpms forces the
sync, not the select timeout).

11 years agotests/flip_test: test interaction with panning
Daniel Vetter [Tue, 2 Oct 2012 15:17:40 +0000 (17:17 +0200)]
tests/flip_test: test interaction with panning

Since panning with set_crtc is synchronous, we need to stall for any
outstanding pageflips. This new testcase exercise that code. Unfortunately
we still need eyes to check whether we don't loose the offset :(

11 years agotests/flip_test: robustifications
Daniel Vetter [Tue, 2 Oct 2012 15:01:06 +0000 (17:01 +0200)]
tests/flip_test: robustifications

- don't yell around about dropped frames on tv connectors (and explain
  why in a comment)
- wait a bit when using a test config that checks for dropped frames before
  starting. Also allow for 1% of fudge, this makes it reliably work
- make the dummy load more variable, took too long on older machines.

11 years agotests/flip_test: don't complain about timestamps in the future
Daniel Vetter [Tue, 2 Oct 2012 14:09:00 +0000 (16:09 +0200)]
tests/flip_test: don't complain about timestamps in the future

those can happen due to the scanline vblank timestamp adjuster ...

11 years agotests/flip_test: actually try to check what I want to check
Daniel Vetter [Tue, 2 Oct 2012 13:59:58 +0000 (15:59 +0200)]
tests/flip_test: actually try to check what I want to check

/me sucks

11 years agotests/flip_test: check whether timestamp isn't in the past
Daniel Vetter [Tue, 2 Oct 2012 13:42:34 +0000 (15:42 +0200)]
tests/flip_test: check whether timestamp isn't in the past

This is mostly useful for when we add support for other clock sources,
e.g. clock_monotic, to check whether the kernel picked the right
clock.

11 years agotests/flip_test: check whether the pageflip event took too long
Daniel Vetter [Tue, 2 Oct 2012 13:37:24 +0000 (15:37 +0200)]
tests/flip_test: check whether the pageflip event took too long

We're suspecting that something is fishy with the event deliver/vblank
timestamp handling on gmch platforms. Unfortunately, this isn't it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: count the number of flips and check we don't drop any
Chris Wilson [Tue, 2 Oct 2012 11:59:16 +0000 (12:59 +0100)]
flip_test: count the number of flips and check we don't drop any

In the basic case of just flipping between two buffers with no
additional work, we should neve drop a frame.

11 years agotests/flip_test: re-enable disabled testcases
Daniel Vetter [Tue, 2 Oct 2012 09:50:20 +0000 (11:50 +0200)]
tests/flip_test: re-enable disabled testcases

oops

11 years agotests/flip_test: new testcase with a busy load before the flip
Daniel Vetter [Tue, 2 Oct 2012 08:33:13 +0000 (10:33 +0200)]
tests/flip_test: new testcase with a busy load before the flip

I've hoped that this would be good enough to hang pch platforms, but
it looks like those just complete the flip immediately on disabled pipes.

11 years agofixup .gitignore for newly add sysfs_rps test
Daniel Vetter [Tue, 2 Oct 2012 08:32:25 +0000 (10:32 +0200)]
fixup .gitignore for newly add sysfs_rps test

11 years agolib: helper to convert gem_hanlde to drm_intel_bo
Daniel Vetter [Tue, 2 Oct 2012 08:32:10 +0000 (10:32 +0200)]
lib: helper to convert gem_hanlde to drm_intel_bo

11 years agodrmtest: use do_or_die
Daniel Vetter [Mon, 1 Oct 2012 09:34:10 +0000 (11:34 +0200)]
drmtest: use do_or_die

11 years agotests/flip_test: Revamp to demonstrate race with modeset/dpms and pageflips
Chris Wilson [Fri, 28 Sep 2012 12:03:02 +0000 (13:03 +0100)]
tests/flip_test: Revamp to demonstrate race with modeset/dpms and pageflips

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agointel_infoframes: Dump HDMI vendor infoframes
Damien Lespiau [Wed, 26 Sep 2012 17:17:53 +0000 (18:17 +0100)]
intel_infoframes: Dump HDMI vendor infoframes

Those infoframes are programmed when using stereo 3D modes.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoAdd option -o <number>, which can test only one specified mode.
Yi Sun [Tue, 25 Sep 2012 09:13:17 +0000 (17:13 +0800)]
Add option -o <number>, which can test only one specified mode.

Each mode line has a number just like '[i]'. So we can only test the specified mode with giving the number of mode to '-o' parameter.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/module_reload: Silence warnings when unloaded shared modules
Chris Wilson [Tue, 18 Sep 2012 13:04:58 +0000 (14:04 +0100)]
tests/module_reload: Silence warnings when unloaded shared modules

So long as we spit out critical errors during i915 reload, or detect any
oops the test will do its job.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55040

11 years agosysfs rps test added
Ben Widawsky [Sat, 8 Sep 2012 01:12:07 +0000 (18:12 -0700)]
sysfs rps test added

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agogem_gtt_speed: Add a test that caches the mmapping across iterations
Chris Wilson [Thu, 13 Sep 2012 14:05:34 +0000 (15:05 +0100)]
gem_gtt_speed: Add a test that caches the mmapping across iterations

Repeat the memset streaming performance test on the same mapping so that
we can factor out the overhead of establishing the GTT/CPU mmaps.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agogem_gtt_speed: Use a memset() to test streaming performance
Chris Wilson [Thu, 13 Sep 2012 13:55:53 +0000 (14:55 +0100)]
gem_gtt_speed: Use a memset() to test streaming performance

This make the reasonable assumption that the libc code for memset() can
saturate the memory bandwidth -- at any rate it should do better than
the copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agointel_sprite_on: plane needs 16.16 width and height
Ben Widawsky [Thu, 13 Sep 2012 00:48:21 +0000 (17:48 -0700)]
intel_sprite_on: plane needs 16.16 width and height

This only ever worked because we used to have a bug in our driver which
was fixed months ago by:

commit b4db1e35ac59c144965f517bc575a0d75b60b03f
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Tue Mar 20 10:59:09 2012 -0700

    drm/i915: treat src w & h as fixed point in sprite handling code

Reported-by: Armin Reese <armin.c.reese@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agointel_sprite_on: coding style fixes
Ben Widawsky [Thu, 13 Sep 2012 00:27:08 +0000 (17:27 -0700)]
intel_sprite_on: coding style fixes

It was driving me nuts...

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agointel_sprite_on: Idententation + Copyright fix
Ben Widawsky [Sat, 8 Sep 2012 20:40:04 +0000 (13:40 -0700)]
intel_sprite_on: Idententation + Copyright fix

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agotools: Update gitignore with intel_dpio_{read, write}
Damien Lespiau [Fri, 7 Sep 2012 10:42:20 +0000 (11:42 +0100)]
tools: Update gitignore with intel_dpio_{read, write}

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>