I got kms_flip in hung state with the backtrace below, while the parent process
waiting for the signal helper to exit. It was quite easy to reproduce the bug
by running
kms_flip --run-subtest=flip-vs-dpms-off-vs-modeset
With the change I couldn't reproduce it.
TODO: audit/fix other signal handlers with signal-unsafe functions
0 0x00007f9a1362018b in ?? () from /lib/x86_64-linux-gnu/libc.so.6
1 0x00007f9a1359df81 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
2 0x00007f9a1359b6cf in ?? () from /lib/x86_64-linux-gnu/libc.so.6
3 0x00007f9a13628eb6 in __vasprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6
4 0x00007f9a13628e72 in __asprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6
5 0x000000000040a4a2 in asprintf (__fmt=0x417441 "/dev/dri/card%u", __ptr=0x7fff1a972c08)
at /usr/include/x86_64-linux-gnu/bits/stdio2.h:178
6 drm_get_card () at drmtest.c:190
7 0x000000000040a54a in __drm_open_any () at drmtest.c:229
8 0x000000000040a846 in quiescent_gpu_at_exit (sig=<optimized out>) at drmtest.c:281
9 0x0000000000408759 in call_exit_handlers (sig=3) at drmtest.c:1519
10 fatal_sig_handler (sig=3) at drmtest.c:1543
11 <signal handler called>
12 0x00007f9a13596770 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
13 0x00007f9a135d8f3f in fork () from /lib/x86_64-linux-gnu/libc.so.6
14 0x000000000040b3af in __igt_fork_helper (proc=0x61d8cc <signal_helper>) at drmtest.c:1199
15 0x000000000040b4ce in igt_fork_signal_helper () at drmtest.c:751
16 0x0000000000404167 in main (argc=<optimized out>, argv=<optimized out>) at kms_flip.c:1533
v2:
- can't use snprintf as that's also signal-unsafe, so just use a dup'ed fd (Chris,Daniel)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Exercise that calling madvise produces expected results
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Bunch of explicit include paths needed adjustments and
eviction_common.c needs to be added to the dist files.
This has been broken in the following three commits:
commit 42bcd05eb3f1545fbf9c397c3f37c3f6a27c5da4
Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Date: Mon Feb 3 10:59:41 2014 +0000
tests/eviction_common: Avoid submitting duplicate objects
commit b92b397d5e4ffe10ed92fb2fc6711758ef5bcf89
Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Date: Tue Dec 3 15:09:57 2013 +0000
build: Make sure asserts are enabled for tests
commit 8c33e9ad111d27b84db4daac43809a807f262632
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date: Fri Dec 6 20:35:29 2013 -0800
intel-gpu-tools: Version informatio
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Make sure selection loop does not generate duplicates
when it picks a subset of objects for a single exec buffer.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
In preparation for userptr test we move the eviction logic
into a common file so it can be used from both test cases.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The goal of this test is to ensure that we respect inter ring
dependencies. A more detailed description of what it tests is in a
comment.
The tests relies on having a blit function for the ring, so is currently
only checking synchronization between the render and blitter ring.
v2: Actually create an inter-ring dependency by making the first copy on
ring2 and the second on ring2, not both on ring2.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Instead of recompiling the lib directory for every tool or tests we can just
re-use the static library. This also has the nice side effect of fixing the
android "mm" command to allow android users to only rebuild the local changes
in either the test or tools directory.
Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
The lib directory is used by all the tests & tools so it should really be
the place where the generate files are created.
Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
The lib directory should really be compiled as a static library on its own
and be re-used by any tests or tools that require it.
Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
All the Android.mk files had the same directives to find the path of
libdrm & libpciaccess. These are no longer required as the android system
now allows the libraries being used to export include paths to dependant
modules & programs.
Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Not all versions of Android have the mmap64 call, thus a suitable alternative
must be called.
Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
-f, or --file will simply dump the file in the specified format. All
other options will be skipped. This is helpful when one wants to create
their own list for temporary debug, or if one requires a subset of
registers to work around things like fused off PCH.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Extract everything possible, and create a main function which is pretty
darn simple. The goal is to make the various paths the program can take
based on command line options (one more is coming) more decipherable.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
When printing the errno, it is important that we capture the user errno
before we make any library calls - as they may alter the value.
References: https://bugs.freedesktop.org/show_bug.cgi?id=74007
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This makes it a bit more like the kernel, so we can go poke at DPIO and
other IOSF regs a bit more easily.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Storing values avoids some unnecessary overhead but more importantly
allows all of our processing to be atomic.
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Add a function that methodically varies min and max to exercise
several valid and invalid combinations. Allow the caller to
define what is to be checked between each step.
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Note that we use twice the number of buffers, and so we need to restrict
num_buffers appropriately to fit within RAM.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we stop all the rings, we can end up blaming the innocent
rings on hangcheck.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=73652
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
My git failures are truly remarkable. I ended up pushing the wrong
commit here:
commit 1552aa21124cabe762862bb414490510415a2b2d
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date: Mon Jan 13 06:28:45 2014 -0800
gem_storedw_batches_loop: Fix for BDW
This puts the offset of the reloc in the wrong place for pre-BDW
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73866
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
As a flip is outstanding, there is an issue that the kernel may not be
able to release one of the fences that userspace requires and erroneous
report EDEADLK (on gen2, gen3).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696
Simple addition to the parser to add the following full line comments:
{';', '#', "//"}
Empty lines will also be ignored
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Fix the spaces to use [the python standard] 4 soft spaces for tabe.
While here, add the proper vim tag so we don't do it again.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
quick_dump which is python, generates files in __pycache__ which are the
moral equivalent of object files. Don't let people add them to the index
accidentally.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
- We need to drop root to actually hit the limits. This requires us to
fork the actual test since otherwise the exit handlers (which
require root) fail the entire test.
- Don't assert that the gem create ioctl succeeds, it won't on the
final run of the loop.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Exhausts the system limit on open files and then tries to create
a new shmem-backed gem object. Linus Torvalds reported that this
blows up on a null obj->base.filp, but I can't reproduce this here:
http://lists.freedesktop.org/archives/intel-gfx/2014-January/038433.html
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
If it's not in the multi-test target group testrunners won't pick up
on the fact that they need to enumerate subtests first.
Cc: jeff.mcgee@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>