Age | Commit message (Collapse) | Author |
|
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>
|
|
Now that we have actual functions for kms_test_*_str since
commit 2d432fc5773df17f04283f4780dab161dd2e1c85
Author: Jani Nikula <jani.nikula@intel.com>
Date: Wed May 11 12:42:06 2016 +0300
lib/igt_aux: define actual functions for kmstest_*_str
move also the gtk-doc comments next to the definitions, for consistency.
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@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>
|
|
Macro generated function definitions considered harmful. You can't find
them with code search tools or grep. There may be places where such
things might be useful, but this is not it.
Define actual functions for kmstest_encoder_type_str(),
kmstest_connector_status_str() and kmstest_connector_type_str(). While
at it, make the arrays static const.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Virtual, DSI, DP MST.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
If we assume that the first settimer and clock_gettime() itself have
appreciable overhead, try to exclude those from the calibration delay.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
disk.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
The timer is tied to the creator thread, i.e. it is not inheritable
across fork() or clone()/pthread_create(). Using it thus causes an
assertion failure in the test after the one that aborts (and so on until
we perform an interruptible test correctly) - one mistake snowballs. We
can stop the snowball by doing an initial check and diverting back to
drmIoctl().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since the last errno doesn't correspond with the signal, reporting it
when we detect the GPU hang is confusing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Fixes gem_exec_suspend complaining that the hang detector spontaneously
combusts.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we listen to the uevents from the kernel, we can detect when the GPU
hangs. This requires us to fork a helper process to do so and send a
signal back to the parent.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We wish to delay the first signal from the igt_sigiter_ioctl
sufficiently to skip over the timer_settime() and into the drmIoctl
kernel context before firing. If we fire too early, we will think that
the ioctl doesn't respond to signals and ignore it in future. If we fire
too late, we won't probe the ioctl for signal handling at all. Let's try
measuring the timer_settime() call time as a first approximation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The goal of injecting signals into the ioctl() is to trigger an EINTR.
If we did not succeed on the last pass, we are not going to on the next
or subsequent passes either.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
To simplify and speed up running interruptible tests, use a custom
ioctl() function that control the signaling and detect when we need no
more iterations to trigger an interruption.
We use a realtime timer to inject the signal after a certain delay,
increasing the delay on every loop to try and exercise different code
paths within the function. The first delay is very short such that we
hopefully enter the kernel with a pending signal.
Clients should use
struct igt_sigiter iter = {};
while (igt_sigiter_repeat(&iter, enable_interrupts=true))
do_test()
to automatically repeat the test until we can inject no more signals
into the ioctls. This is condensed into a macro
igt_interruptible(enable_interrupts=true)
do_test();
for convenience.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When performing a dummy-run of rtcwake, hide the output as it doesn't
print anything useful (just when it will wake up).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Include the system("") in the debug output for the assertion failure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Move power management related code to a separate library.
Initially this is done only for workarounds that apply to external
components. Modify the users of such workarounds accordingly.
This currently involves HD audio and SATA link power management.
For SATA link PM there's also code to save the previous settings,
to allow for resetting the values after we've finished testing.
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Some stress tests create both the signal helper and a lot of competing
processes. In these tests, the parent is just waiting upon the children,
and the intention is not to keep waking up the waiting parent, but to
keep interrupting the children (as we hope to trigger races in our
kernel code). kill(-pid) sends the signal to all members of the process
group, not just the target pid.
We also switch from using SIGUSR1 to SIGCONT to paper over a race
condition when forking children that saw the default signal action being
run (and thus killing the child).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Disable output of terminal control characters and progress meters when
IGT_PLAIN_OUTPUT is set in the environment.
Cc: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Do a dry run with rtcwake first to determine if the system even supports
the intended suspend state. If not, skip the test.
Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
igt_wan and other log functions are not async-signal safe, so should not
be used in signal handlers.
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
igt_save_module_param is an internal static function and therefore isn't
included in the public API documentation.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Looks better!
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Some i915.ko features have very nice IGT tests, which are never
executed because the features are disabled by default. This leads to
unnoticed regressions both in the Kernel and in the IGT tests. We
have seen this multiple times, for example, on FBC and PSR.
We want to be able to run IGT and actually test these
disabled-by-default features in order to make sure we at least don't
break them even more. Sometimes they may be disabled for some specific
reason, and we don't want to increase the set of reasons without
noticing.
To help solving this problem, this commit adds some helper functions
that should make it easier to change certain i915.ko parameters and
then restore their original values at the end of the test. With this,
I'm hoping QA will be able to detect any regressions and automatically
bisect them - or, with PRTS, reject the patches before they are even
merged.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Those messages where missing a new line at the end. Take the opportunity
to re-format the messages to fit in the 80 chars limit.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Just a little helper for code that needs to wait for a certain
condition to happen. It has the nice advantage that it can survive the
signal helper.
Despite the callers added in this patch, there is another that will go
in a separate patch, and another in a new IGT test file that I plan to
push later.
v2: Check COND again before returning in case we hit the timeout.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Avoid having to escape certain characters in documentation comments by
not allowing docbook markup tags. Markdown formatting in documentation
comments is still supported.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
This is an extention of igt_debug_wait_for_keypress that also can have
customized message and return key pressed.
v2: This is actualy a v2. V1 was an extension of original
igt_debug_wait_for_keypress but it was nacked.
v3: Make [Y/n] check inside aux function as suggested by Daniel.
Also renaming and adding first use case along with the axu function.
v4: Simplify function name and make it assert pressed key
is different from n/N as suggested by Daniel.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
intel-gpu-tools currently has a bunch of tests for suspend,
but currently none (that I could find) for hibernate.
Attached is a rudimentary patch to add said test. It does so
by repurposing the drv_suspend driver to handle both suspend
and hibernate, since the difference is miniscule.
I decided to split the suspend/autoresume functions in
igt_aux.c though, to be able to leave the igt_system_uspend_autoresume()
function unchanged (the other option would be to
introduce a boolean function argument and have that
decide what parameters to pass to rtcwake).
The timeout passed to rtcwake probably needs tuning (it might
even need to be dynamically adjusted, since the time hibernation takes
varies wildly depending on the amount of non-cache memory in use).
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
|
|
Also move forcewake and stop_rings code from igt_debugfs to igt_gt
since it fits better. And move the hang injection fork helpers from
igt_aux to igt_gt, too.
Also push the intel_gen call into igt_hang_ring while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Use entities for the special characters '<' and '>' to avoid "<var>" being
treated as a tag.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Use cmdline variable for interactive debug instead of env var.
v2: Make interactive-debug domain optional and use "all" when not set.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
random() being a good multithread-safe RNG is too slow to be used in
stress tests, especially for a seemingly trivial task of randomising the
order of an array.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add a function to lock memory into RAM and use it in the
gem_tiled_swapping test to reduce the amount of allocated memory
required to force swapping. This also reduces the amount of time
required for the test to complete, since the data set is smaller.
The following durations were recorded with gem_tiled_swapping on a
haswell system before the change:
Subtest non-threaded: SUCCESS (55.889s)
Subtest threaded: SUCCESS (810.532s)
and after:
Subtest non-threaded: SUCCESS (11.804s)
Subtest threaded: SUCCESS (268.336s)
v2: add various assertions and requirements and make sure
gem_tiled_swapping works on systems with less RAM (Daniel Vetter)
v3: fix allocation size calculation
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Added Android.mk for intel_sprite_on.
v2: Addressed review comments by Daniel Vetter.
- Moved the cairo independent functions from igt_kms.c to igt_aux.c.
Signed-off-by: Gagandeep S Arora <gagandeep.s.arora@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Because QA has a bunch of shitty machines with old distros and tends
to re-port this all the time.
References: https://bugs.freedesktop.org/show_bug.cgi?id=82232
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
If we don't enable audio runtime PM, the audio driver won't release
its reference, the refcount won't ever become zero, so we will never
actually runtime suspend. So move this code from pm_rpm.c to
igt_aux.c, so kms_flip - and any other IGT test case using RPM - can
benefit from it.
Previously, if you ran pm_rpm before running the other tests - or if
you just didn't have snd_hda_intel loaded - you wouldn't notice this
bug.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
If the signal helper is active, the usleep() calls return earlier, and
we may end up returning false way before the 10s timeout, failing the
subtests. This currently happens on the kms_flip RPM interruptible
subtests.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
With the structured logging it makes more sense to tune this down a
bit. Also, this way it is consistent with Thomas Wood's new activity
indicator helper.
Spotted while discussing Thomas' patch with him.
v2: Thomas noticed that I've forgotten the fflush. Extract
igt_interactive_info for both igt_progress and igt_print_activity.
v3: Interactive output should go to stderr. Also extract the "is this
a terminal" check.
Cc: Thomas Wood <thomas.wood@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
commit 1649ef0d1f5c0e4f995a437bd24f1574a8b5100f
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Tue Aug 26 15:26:21 2014 +0200
lib/igt_* Use igt macros in igt libaries
went a little too far here as the replacement macro was too clever.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
- Use keys in just one env variable to enable/disable it.
- Add an informational message so that the users knows when to press
the key (more useful over ssh than when run on the terminal ofc).
- Improve the documentation so that it's clearer how to use this
when running tests.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Except in igt_core since that would lead to some hilarious recursions.
v2: Don't fflush any more, spotted by Chris.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Move version.h generation into lib/Makefile.sources so that it can be
shared between the Autotools and Android build systems. Also make sure the
"updating version.h" message is only displayed when version.h actually
changes and remove unnecessary includes of version.h.
This also includes changes from Tvrtko Ursulin to prevent a build from
within the git repository failing when git is not available.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|