Age | Commit message (Collapse) | Author |
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc.
When a render-only device is opened and gem_quiescent_gpu is called, we
need to use the debugfs dir for the master device instead.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When opening a DRM debugfs file, locate the right path based on the
given DRM device FD.
This is needed so, in setups with more than one DRM device, any
operations on debugfs files affect the expected DRM device.
v2: - rebased and fixed new API additions
v3: - updated chamelium test, which was missed previously
- use the minor of the device for the debugfs path, not the major
- have a proper exit handler for calling igt_hpd_storm_reset with the
right device fd.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Introduce a new fork helper that spawns a process that just repeatedly
calls i915_gem_shrink_all() and watch what happens as we try to use
objects that have been shrunk.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The opposite direction of to_user_pointer() is from_user_pointer().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Just to tidy a discrepancy where doing the compare using the GTT (i.e. a
readback) is now faster than setting the contents initially (as the
readback only checks one pixel per page, do the same for setting the
object).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
vgem provides WC mmap on its dmabufs, so reading and comparing these is
slow. We can employ a similar w/a to the other WC mmaps (i.e. mmap__gtt
or mmap__wc) and only check one pixel per page. This will speed up those
tests, but I don't know if it makes detecting coherency issues more or
less likely. :|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Otherwise we inherit the bufmgr and fd across the fork, try to clean it
up in the child (affecting the parent's device), then try to clean it up
in the parent (triggering warns).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
To stop igt from tripping over itself with the combinatorial explosion
and skips.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The copy size passed to the CPU copy routines were only for a single row
not the full bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It access hardware, hence why the simple igt_only_list_subtests()
check from igt_fork/stop_signal_helper() isn't enough.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
- Give __ prefix to internal funcstion and structs, only
igt_interruptible is used by tests.
- Move docs to igt_interruptible and adjust.
- Explain more clearly how the timeout is getting doubled each
iteration until no more interruptions happen. Also rename the
argument to give it a more meaningful name in the docs.
- Link from other functions to this one for cross-referencing.
- Rename to igt_do_interruptible to make it clearer it's a loop,
inspired by do {} while () loops.
v2: Rename instead to igt_while_interruptible and fix typos (Chris).
And add gtk-doc for igt_ioctl, too.
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
As we reuse the parent arrays under the assumption that the child uses
fewer buffers, make sure that is true.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Remember that we allocate and use twice as many buffers as specified (we
have a num_buffers array of src and dst) and so adjust the computation
such that the combined allocation matches the target.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When forking, the entire VM is cloned including the VMA backed by GEM
objects from the libdrm buffer cache. This is not only slow, but can also
cause the system to exceed the maximum number of VMA and premature test
failure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Only fail the dmabuf tests if we cannot prep the system to support
"unlimited" fd.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When we aren't deliberately injecting hangs, we don't expect to see any
GPU hang. Detect them and fail early.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Also test a hang across all rings, rather than just one engine.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Assume that we may halt partway through buffers_create() and so be
careful to clear up the partial state in buffers_destroy().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since dmabuf requires an actual fd for every object, we need to increase
the number of files our process is allowed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
v2: Because I managed to push the wrong version.
Make --list-subtests happer by creating the name before the igt_fixture,
not inside it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order to keep the dmabuf mmap around whilst we keep the object alive,
we need a file descriptor for each. Check that the VFS supports that
many fd.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Use the igt_sigiter interface to only repeat the -interruptible tests
when we can make further progress with another change at injecting a
signal.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Looks tidy again, and doesn't break igt assumptions.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Searching for coherency problems that may arise with
smaller-then-cache/large-then-cache objects.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Now that we started packaging all parameters in one handy struct, pass
them everywhere. This allows us to pass along requirements so that we
can perform the checks inside each indvidual subtest and so not anger
the igt gods.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
gem_concurrent_all.c: In function ‘__real_main1556’:
gem_concurrent_all.c:1642:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint64_t’ [-Wformat=]
igt_debug("Pinning %ld MiB\n", pin_sz);
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
More num_buffers onto the local struct passed down into the tests to
avoid the issue with having to modify the global value inside the tests
leading to hilarity if the test asserts.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Allow read-only synchronisation on dmabuf mmaps, useful to allow
concurrent read-read testing between the CPU and GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Create and use dmabuf mmaps as well to ensure correct synchronisation
between concurrent rendering and CPU access.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For many tests, the relevant aperture is not the ppGTT but the internal
global GTT managed by the kernel. Use this limit appropriately.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This patch moves userptr definitions and helpers implementation that were
locally in gem_userptr_benchmark and gem_userptr_blits to the library, so other
tests can make use of them as well. There's no functional changes.
v2: added __ function to differentiate when errors want to be handled back in
the caller; bring gem_userptr_sync back to gem_userptr_blits; added gtkdoc.
v8: remove local_i915_gem_userptr from gem_concurrent_all.c to use the global
helpers instead.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
It just ends up with buffer leaks all over. On the flip side, it does
allow us to inherit the bufmgr directly without worry of stomping over
the aliased entries (and causing double closes).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order reduce the number of parameters being passed everywhere, whilst
simultaneously making more information available to the lower levels,
pass the struct buffers around.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The bufmgr import creates a new handle from a name for the userptr - we
can discard our original handle immediately.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Replace the open-coded ioctls with the thin gem wrappers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we use a MAP_SHARED mmaping for the our backing storage for userptr,
then it will be inherited across the fork with the same address. ideal
for continuity testing of children.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We have to avoid the COW alias for the intel_bufmgr and intel_batch
cache as the child may close the object (in its local cache) leaving an
alias in the parent cache pointing to a stale object.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The issue here is that the pointer inherited upon the child is
copied-on-write, i.e. the pointer is private to each process, but the
handle is shared. This means that writes and reads in the child are
going to a different set of pages than the GPU's object - the test is
simply broken. To overcome this we would need to mmap the shared buffer
into the child.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The current forked modes recreate their handles in the children and just
look at any complications arising from contention. This mode looks at
inheriting the fd+handles from the parent into the child and seeing if
we can use them within the child.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we have the same function in a few places to read the
debugfs/i915_ring_missed_irq file, move it to the core.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As the hang injection now itself checks for validity before use, the
tests don't need to do so themselves. Except in certain situations! If
the test forks, it should do requirement checks before the fork (so that
we don't anger the igt gods) and if the test plays around i915.reset
then it needs to do an early igt_require_hang_ring() that is not
affected by the changes to i915.reset.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|