25 Commits

Author SHA1 Message Date
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