35 Commits

Author SHA1 Message Date
Thomas Wood
d01ebbd97d docs: various documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-02 08:17:17 +01:00
Thomas Wood
85f6d82d3c docs: fix "no link" warning
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>
2015-07-02 08:17:17 +01:00
Damien Lespiau
6ebd8c2dc3 doc: Remove i-g-t/intel prefixes and capitalize section titles
Looks better!

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27 16:04:07 +01:00
Paulo Zanoni
d9ff9b3971 lib/igt_aux: add functions to manipulate i915.ko parameters
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>
2015-06-11 10:41:51 -03:00
Damien Lespiau
d9dd33c0d9 lib: Add missing '\n' to error message
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>
2015-05-11 15:10:19 +01:00
Paulo Zanoni
9bb04d3aa6 lib: add igt_wait()
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>
2015-05-05 17:27:49 -03:00
Thomas Wood
5b7edb9cb0 docs: avoid escaping characters in documentation comments
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>
2015-04-21 10:52:14 +01:00
Rodrigo Vivi
ae9c685133 lib/igt_aux: Introduce igt_interactive_debug_manual_check.
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>
2015-04-16 11:08:37 -07:00
David Weinehall
7890b09348 tests/drv_suspend: hibernation test
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>
2015-02-24 16:46:22 +02:00
Daniel Vetter
3cd45dec2e lib/igt_gt: Document and consolidate
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>
2015-02-13 09:35:36 +01:00
Thomas Wood
fa94e01ee7 docs: fix parsing issue
Use entities for the special characters '<' and '>' to avoid "<var>" being
treated as a tag.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-22 10:12:24 +00:00
Rodrigo Vivi
3d65ff780d lib: s/IGT_DEBUG_INTERACTIVE/--interactive-debug=var
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>
2015-01-20 11:36:10 +01:00
Chris Wilson
a315476a6b igt/gem_evict_(alignment|everything): contend with GPU hangs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07 17:35:14 +00:00
Chris Wilson
71e9e9c564 lib: random() is too slow
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>
2014-12-18 11:49:11 +00:00
Thomas Wood
42b02c284e lib: add a function to lock memory into RAM
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>
2014-12-11 17:57:03 +00:00
Gagandeep S Arora
b8f193bbbf demos/intel_sprite_on: Added support to compile intel_sprite_on on Android.
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>
2014-11-25 11:49:24 +00:00
Daniel Vetter
120d6d1b2c lib/aux: Make it clear that rtcwake failures aren't bugs
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>
2014-11-18 10:39:38 +01:00
Paulo Zanoni
ac2079596c lib/igt_aux: move audio RPM code to igt_setup_runtime_pm()
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>
2014-10-22 16:23:42 -02:00
Paulo Zanoni
fc6d464a59 lib/igt_aux: make igt_wait_for_pm_status() resist the signal helper
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>
2014-10-17 16:20:26 -03:00
Daniel Vetter
711199b8ec lib/aux: Print progress output at INFO level
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>
2014-09-30 22:55:18 +02:00
Thomas Wood
6a8d33c2bb lib: add a function to indicate activity
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30 17:54:12 +01:00
Thomas Wood
519f377ddd doc: various spelling and typo fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30 17:54:02 +01:00
Chris Wilson
d35cc3ea8c aux: Squelch warning when emitting progress indicator
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>
2014-09-06 12:45:44 +01:00
Daniel Vetter
c49542af07 lib/igt_aux: Improve wait_for_keypress helper a bit
- 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>
2014-09-05 09:30:53 +02:00
Daniel Vetter
1649ef0d1f lib/igt_* Use igt macros in igt libaries
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>
2014-08-26 21:29:14 +02:00
Thomas Wood
743dc7997a build: improve version.h generation
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>
2014-07-23 16:43:05 +01:00
Thomas Wood
e73008bae3 tests: remove unused getopt header includes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-23 15:23:53 +01:00
Thomas Wood
52a3a2e205 lib: various documentation fixes
Fix some documentation comments and mark some struct members private.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-06-12 10:12:13 +01:00
Rodrigo Vivi
82ad15fd10 Fix make distclean by fixing includes of version.h
Actually only the igt_core was breaking the make distcheck,
but let's make it consistent and let the code cleaner.

Credits-to: Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2014-06-09 11:17:20 -07:00
Daniel Vetter
bd521b493e lib/igt_aux: Extract runtime pm helpers from pm_pc8
I want to use them elsewhere ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-15 14:25:47 +02:00
Daniel Vetter
288e80f278 lib/igt_aux: Lost doc polish hunk.
Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Daniel Vetter
7bb40944e2 lib: Use @include tag for include files
Occasionally useful to read documentation ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23 14:45:13 +01:00
Daniel Vetter
8221fda087 lib: s/igt_env_set/igt_check_boolean_env_var
So I wasn't really happy with env_set since it's way too close to
setenv(), whic actually _sets_ and environment variable. So use check
instead of set as the verb (well adjective for env_set).

Also sprinkle in some hints that we talk about a boolean setting here.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23 14:38:17 +01:00
Daniel Vetter
47575c7710 lib/igt_aux: api documentation
I'm not really happy with the name of the igt_env_set function, I'll
follow up with a patch to change it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23 14:18:23 +01:00
Daniel Vetter
f5daeec724 lib: extract igt_aux.[hc]
And shovel all the various helpers in there.

Also move igt_set_vt_graphics_mode to igt_kms.h since the function is
implemented in igt_kms.c. And it fits better. I kinda missed this in
the prep work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23 13:47:09 +01:00