i915 validates that requested offset is in canonical form, so tests need
to convert the offsets as required.
Also add test to verify non-canonical 48-bit address will be rejected.
v2: Use sign_extend64 for converting to canonical form (Tvrtko)
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
line[strlen(line)] will always evaluate to NULL so line_continuation
was always true. That prevented the program name, pid and log level
ever being printed.
Changed to [strlen(line) - 1] so the last character before the null
terminator is compared with '\n' to determine line_continuation.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The default is too low for panels that are 30 fps or lower.
Bump the timeout to 50 ms to prevent spurious errors on those
displays.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
In order to do concurrency checks using different allocation functions,
we need to hook those functions up to gem_concurrent_all. So let's add
another layer of combinations! The actual enabling for create2-ioctl
will come in the future.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Like the previous patch to gem_exec_ctx, retrict gem_exec_nop to running
for a fixed length of time, rather than over a range of different
execution counts. In order to retain some measurement of that range,
allow measuring individual execution versus continuous dispatch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than investigate the curve for dispatch latency, just run for a
fixed time and report an average latency. Instead offer two modes,
average single dispatch latency, average continuous dispatch latency.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we didn't recognise the different buffer type, we confused it with
whatever we last decoded (i.e. the render ring buffer).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Recent kernels compress the active objects using zlib + ascii85
encoding. This adapts the tool to decompress those inplace.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we autotune the workload to only take 0.1s and then repeat the
measurements over 2s, we can bound the benchmark runtime. (Roughly of
course! Sometimes the dispartity between main memory CPU bandwidth, and
GPU execution bandwidth throws off the runtime, but that's the purpose
of the benchmark!)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Due to the clever way the whole sequence block is specified without
forward compatibility, it's not possible to dump most blocks without
this.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
It's nice to see just how many components the crc claims to have
when the count don't match what we expect.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The extra_long_opts passed to igt_*_parse_opts() isn't modified,
so let's make it const.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The joy of our hardware; don't let two threads attempt to read the same
register at the same time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Allow the producers to be set with maximum RT priority to verify that
the waiters are not exhibiting priorty-inversion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Try a different pattern to cascade the cancellation from producers to
their consumers in order to avoid one potential deadlock.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Do the workload before the nop, so that if combining both, there is a
better chance for the spurious interrupts. Emit just one workload batch
(use the nops to generate spurious interrupts) and apply the factor to
the number of copies to make inside the workload - the intention is that
this gives sufficient time for all producers to run concurrently.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Split the distinct phases (generate interrupts, busywork, measure
latency) into separate batches for finer control.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Knowing how long it takes to execute the workload (and how that scales)
is interesting to put the latency figures into perspective.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Late last night I forgot I had only added the llc CPU mmaping and not
the !llc GTT mapping for byt/bsw.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The goal is measure how long it takes for clients waiting on results to
wakeup after a buffer completes, and in doing so ensure scalibilty of
the kernel to large number of clients.
We spawn a number of producers. Each producer submits a busyload to the
system and records in the GPU the BCS timestamp of when the batch
completes. Then each producer spawns a number of waiters, who wait upon
the batch completion and measure the current BCS timestamp register and
compare against the recorded value.
By varying the number of producers and consumers, we can study different
aspects of the design, in particular how many wakeups the kernel does
for each interrupt (end of batch). The more wakeups on each batch, the
longer it takes for any one client to finish.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The upper bound for SLOW_QUICK was added for the benefit of the slow
simulator, not because, as I wrongly thought, of the latency
measurements.
SLOW_QUICK was added in
commit d1e862324b747a0ab5d985eaa6830076817231c5
Author: Damien Lespiau <damien.lespiau@intel.com>
Date: Mon Mar 25 20:06:20 2013 +0000
tests: Instrument tests run in simulation to run quickly
and dropped in
commit 89bcdb9022fb7a1f66635b9f2546356ad0c0761a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Dec 8 13:42:50 2015 +0000
igt/gem_exec_nop: Remove nop latency measurements
Reported-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So there's 3 competing proposals for what wait_ioctl should do wrt
-EIO:
- return -EIO when the gpu is wedged. Not terribly useful for
userspace since it might race with a hang and then there's no
guarantee that a subsequent execbuf won't end up in an -EIO.
Terminally wedge really can only be reliably signalled at execbuf
time, and userspace needs to cope with that (or decide not to
bother).
- EIO for any obj that suffered from a reset. This means big internal
reorginazation in the kernel since currently we track reset stats
per-ctx and not on the obj. That's also what arb robustness wants.
We could do this, but this feels like new ABI territory with the
usual userspace requirements and high hurdles.
- No -EIO at all. Consistent with set_domain_ioctl and simplest to
implement. Which is what this patch does.
We can always opt to change this later on if there's a real need.
To make the test really exercise this do a full wedged gpu hang, to
make sure -EIO doesn't leak out at all.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
gem_flink_race and prime_self_import have subtests which read the
number of open gem objects from debugfs to determine if objects have
leaked during the test. However the test can fail sporadically if
the number of gem objects changes due to other process activity.
This patch introduces a change to check the number of gem objects
several times to filter out any fluctuations.
v2: Moved the common code to a library and made the loop android
specific (Daniel Vetter)
v3: Renamed get_stable_obj_count -> igt_get_stable_obj_count
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
We get build error as we try to cast from ptr to integer
of different size on 32 bit platforms. Use unsigned long
as the cast, it will work with both 32 and 64 bit
systems.
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Since we hold an exclusive write lock we expect 2 writes to happen
serially, but we expect 2 reads to happen in parallel. Expand the testing
to demonstrate this effect (i.e. we expect read-read to be roughly 2x
faster than write-write for small copies on big core.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Many warnings of the form
gem_pread.c: In function ‘main’:
gem_pread.c:128:8: warning: assignment discards ‘const’ qualifier from
pointer target type [-Wdiscarded-qualifiers]
bps = bytes_per_sec(buf, object_size/usecs*1e6);
Regression from
commit 48c945322b4c5f6443758143cccb9c4c04da4aaa
Author: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Date: Wed Dec 2 14:54:51 2015 +0530
igt/gem_pread: Support to verify pread/pwrite for non-shmem backed obj
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This reverts commit 4f5efc5c844f6fe69209982463f9220f8f3951ed.
There was a bit a misunderstanding on IRC between Chris&me. We want
basic tests as sanity test to be run in the BAT CI. It's just unfortunate
that right now we have fairly limited ability to absorb new ones, both
because of a pile of existing bugs in the kernel and because the CI
infrastructure is still being scaled out.
The idea was just to remove the BAT tests added yesterday, not all of
the ones we've had for a while longer.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Grumpily-acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
In times past, I added "basic" variants of tests just to ensure that the
general principle of operation was sound before proceeding on to the
main test (which typically looked at thrashing, i.e. were long and
tedious and pointless if the test didn't even work in the normal
situation). Since "basic" now collides with BAT, rename my trivial tests
to "sanitycheck".
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>