3208 Commits

Author SHA1 Message Date
Chris Wilson
0be9766952 overlay: A couple of valgrind pleasers
Make sure we initialise values to keep valgrind happy

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-21 13:56:04 +00:00
Chris Wilson
7f9d14aa51 overlay: Negative modulus
Don't use a negative index into the array if the desired element is
negative, just wrap around properly into the ring for the chart.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-21 13:56:04 +00:00
Chris Wilson
c537cdb08e igt/gem_ctx_thrash/threads: Allow bo resuse
We already allocate enough objects to thrash the ppGTT VMs, so allow us
to reuse the batch buffers for some efficiency gains and through the
contention more towards the ctx->vm.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18 16:22:59 +00:00
Chris Wilson
4bde754349 igt/gem_ctx_thread/processes: Serialise after forking children
Play nice, especially with the subtest, and wait for the children to
exit before finishing the test. If we don't we end up with a fork bomb
for some unknown reason...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18 16:22:59 +00:00
Chris Wilson
9f389d00cf igt/gem_ctx_thrash: Boost workloads
Now that we are no longer busy-spinning inside random(), we can spend
more time exercising i915.ko

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18 11:49:11 +00:00
Chris Wilson
14c661599b lib/gen8: Make rendercopy threadsafe
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18 11:49:11 +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
Tim Gore
6999b70a84 Demos/Android.mk: build intel_sprite_on
This reverts the effect of two commits
06fb6c233dd82aac766aa9206644f6eff668ca99
264e1ac10ac14a098a78cc9f96c4e7cabb124ee5

Both of these were to stop demos/intel_sprite_on
from being built, but the first was just broken.

So this commit re-enables building intel_sprite_on.
However, intel_sprite_on will not build in recent
Android trees. To overcome this the version
of IGT kept in the Android repository will carry a patch
to intel_sprite_on, and the automatic build test of
IGT on android will patch the freedesktop code on the fly.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-17 21:53:34 +01:00
Thomas Wood
f73697aa8b NEWS: New heading for 1.10
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-17 14:34:47 +00:00
Chris Wilson
959a7db668 igt: Add gem_ctx_thrash to fill the GGTT with contexts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17 11:32:15 +00:00
Daniel Vetter
739790d7ed tests/gem_exec_blt: Add subtest that uses dumb buffers
Just to make sure this keeps working since a patch to WARN_ON using
dumb buffers in execbuf was accidentally merged.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-12-17 09:05:10 +01:00
Thomas Wood
6262f353bb Update version to 1.9 and add the release date
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 15:27:08 +00:00
Tim Gore
06fb6c233d Demos/Android.mk: dont build intel_sprite_on
intel_sprite_on wont build on Android. Previous
attempt to disable was just wrong!

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 14:41:45 +00:00
Thomas Wood
267b352c4f NEWS: Updates
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 14:28:38 +00:00
Thomas Wood
f59bbf7e8f lib: fix a few documentation warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 14:18:12 +00:00
Tim Gore
a11117e42f Android.mk: replace std=c99 with std=gnu99
The android makefiles were passing the -std=c99 flag to the
compiler which disables the typeof keyword. This causes a
build fail for a recent addition to igt_aux.h.
Change this to -std=gnu99, which is the flag used in the
linux build

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 12:18:22 +00:00
Tim Gore
264e1ac10a Demos/Android.mk: dont build intel_sprite_on
intel_sprite_on wont build on Android.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 12:18:22 +00:00
Joonas Lahtinen
6414707bdc lib: Fix out of tree build of version.h
Write the version.h.tmp file into the build directory instead of source
directory. This allows out of tree building when those two are not the
same.

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 12:18:22 +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
Thomas Wood
5fe9c88bda lib: add optional log domain filtering
v2: add an "application" filter for the default domain (used by
    applications)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11 17:57:03 +00:00
Thomas Wood
8161a21762 lib: introduce log domains
Log domains can be used to identify the source of log messages, such as
the test being run or the helper library.

v2: Add separate domains for different parts of the helper library and
    use an empty default domain for applications.
    Expand the log output to include the process name and the log level
    of the message in addition to the domain and pid.
    Print the expanded message only for warning and debug messages.

v3: check for glibc before using program_invocation_short_name

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11 17:55:15 +00:00
Thomas Wood
85b74d5c14 tests/gem_tiled_swapping: use igt_info logging wrapper
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11 11:50:22 +00:00
Thomas Wood
16f1506ff6 tests: replace 3D test images
Use images with a smaller file size, created by saving the left and
right stereo output of glxgears.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-10 17:11:35 +00:00
Thomas Wood
bdbf78db01 tools: add missing copyright headers
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-10 15:55:58 +00:00
Thomas Wood
f3ae3deb4f NEWS: Updates
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-10 15:55:58 +00:00
Thomas Wood
e80922eba6 Add a MAINTAINERS file
Acked-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-10 15:49:14 +00:00
Thomas Wood
84f23415c4 Update README
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-10 14:21:22 +00:00
Ville Syrjälä
5d46f68eab tests/kms_cursor_crc: Restore the valid pipe/connector combo check
The valid pipe/connector combo check was lost in
 commit 57259d714d3fe1170cf931af72648219856a9918
 Author: Daniel Vetter <daniel.vetter@ffwll.ch>
 Date:   Mon Nov 24 16:08:32 2014 +0100

    lib/igt_debugfs: Don't setup crc in _new

Restore it to make the test again useful on CHV.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09 22:35:36 +02:00
Ville Syrjälä
b6f68c10b4 tests/kms_mmio_vs_cs_flip: Count valid tests for all crtcs
Report SKIP only if none of the pipe/connector combos worked, instead of
trying to report for each pipe separately.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09 20:41:18 +02:00
Ville Syrjälä
1b6eb414f3 lib/igt_debugfs: Throw away the two first CRCs
On CHV we sometimes see not just one but two bad CRCs. No real idea
what would cause that, but let's just throw away the second CRC as
well to gain some stability for the tests.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09 20:41:18 +02:00
Damien Lespiau
01153e7d5f drv_hangman: Remove unused function
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-09 17:10:42 +00:00
Damien Lespiau
d49ef76e98 kms_cursor_crc: Remove value to 'return' in a void function
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-09 17:07:22 +00:00
Jani Nikula
c252c77dbf tools: terminate getopt_long long option arrays properly
The last element of the long options array has to be filled with zeros.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2014-12-09 15:49:10 +02:00
Ville Syrjälä
f333981e1a tests/kms_flip: Target the back buffer with the dummy load
Aim the dummy load to the current back buffer instead if the front
buffer. Assuming the idea is to get the next flip to be stuck behind
the dummy load?

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
092682a3e5 tests/kms_flip: Calibrate the dummy load delay in kms_flip
Try to tune the dummy load to ~1 second. The calibration happens the
first time dummy load is generated.

v2: Actually do the number of ops intended and
    calibrate to 1 second and not 2

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
b0cb1e1f9d tests/kms_flip: Use fixed size (2kx2k) buffers for dummy load
Make the dummy load independent of the display resolution by using a
two fixed size dummy bos to generate the load. As a final step do
another copy from one of the dummy bos to the fb to make sure there's
a dependency between the dummy load and any subsequent operation on
the fb.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
21db302c9b tests/kms_flip: Refactor blit code
Pull the code to emit a single blit to a separate function.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
8032f526ef tests: Run lib/igt.cocci
Found some open coded min()/max()/swap() macros.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
e1bdab9973 lib/igt.cocci: Deal with min/max/swap
Replace open coded min/max/swap with the macro invocation.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
1658edceee lib: Add swap() macro
swap() will swap its two arguments while keeping the required
tmp variable hidden. Makes for neater code.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Imre Deak
b32b5327a2 tests/pm_rps: vlv: round middle point to freq supported by HW
When setting the calculated middle frequency value the test assumes that
the HW/kernel rounds this value according to a 50MHz step value. This is
not so at least on VLV/CHV, on my B0 BYT-M for example this step value
is 22MHz, so there the test will fail.

To fix this get the nearest supported value by setting the target
frequency as a min or max frequency and read it back. The kernel will
round the returned value to the nearest supported.

v2:
- remove the 50MHz rounding that was done for non-VLV platforms, the new
  way of rounding should provide the correct value for all platforms
  (Ville)

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08 12:36:59 +02:00
Imre Deak
f70afed4c7 tests/pm_rps: vlv: load gpu for idle min/max tests
When changing the sysfs GT min/max frequencies, the kernel won't
explicitly change the current frequency, unless it becomes out of bound
based on the new min/max values. The test happens to work on non-VLV
platforms because on those the kernel resets the current frequency
unconditionally (to adjust the RPS interrupt mask as a side-effect) and
that will lead to an RPS interrupt setting the minimum frequency.

To fix this load the GPU after decreasing the min frequency and before
checking the current frequency. This should set the current frequency to
the minimum.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08 12:36:54 +02:00
Imre Deak
aabf2d0952 tests/pm_rps: vlv: wait for freq to settle
At least on VLV when forcing a new GT frequency by writing to the
min/max freq sysfs entries the kernel doesn't wait until the new
frequency settles, so the subsequent readback check might fail. To fix
this wait until the current frequency is between the min/max values
using a 10ms timeout.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08 12:36:28 +02:00
Chris Wilson
470071d4ab igt/drm_read: Require that pipe 0 is active
As we require a pipe enabled to generate vblanks, the first step is to
then to check that pipe 0 is active or else skip the test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-08 07:58:13 +00:00
Chris Wilson
819e68f2ed igt/drm_read: Abuse read(drm)
Check that the more obvious userspace error conditions are handled by
the kernel, ideally without loss of data. These include nonblocking
waits, passing invalid buffers and passing buffers of the incorrect
length.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-05 14:34:33 +00:00
Chris Wilson
b64704673e intel_error_decode: Decode the ERROR register on Sandybridge and Ivybridge
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-05 11:28:04 +00:00
Damien Lespiau
88ff1cec3a gem_bad_reloc: Don't flip-flop between SKIP and PASS
Here is a cheap way for this test to give consistent results. This
doesn't change the usefulness of this test, hopefully.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85270
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-04 16:48:06 +00:00
Thomas Wood
b3cce757b5 tests: add gem_gpgpu_fill to .gitignore
gem_gpgpu_fill was added in commit 4ec8479 (tests: Add gem_gpgpu_fill),
but wasn't added to .gitignore.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
c76f35386c lib: always reset connectors after the state is forced
Install the exit handler to reset connector states whenever
kmstest_force_connector is called, so that the connector states are
always reset even if a test fails.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
8d82e5b5ef lib: remove igt_edid.h
This has been replaced by igt_kms_get_base_edid().

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00