platform/upstream/intel-gpu-tools.git
9 years agoUpdate version to 1.9 and add the release date intel-gpu-tools-1.9
Thomas Wood [Fri, 12 Dec 2014 15:26:36 +0000 (15:26 +0000)]
Update version to 1.9 and add the release date

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoDemos/Android.mk: dont build intel_sprite_on
Tim Gore [Fri, 12 Dec 2014 14:29:00 +0000 (14:29 +0000)]
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>
9 years agoNEWS: Updates
Thomas Wood [Fri, 12 Dec 2014 14:28:38 +0000 (14:28 +0000)]
NEWS: Updates

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib: fix a few documentation warnings
Thomas Wood [Fri, 12 Dec 2014 14:18:07 +0000 (14:18 +0000)]
lib: fix a few documentation warnings

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoAndroid.mk: replace std=c99 with std=gnu99
Tim Gore [Fri, 12 Dec 2014 12:14:33 +0000 (12:14 +0000)]
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>
9 years agoDemos/Android.mk: dont build intel_sprite_on
Tim Gore [Fri, 12 Dec 2014 11:55:21 +0000 (11:55 +0000)]
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>
9 years agolib: Fix out of tree build of version.h
Joonas Lahtinen [Thu, 11 Dec 2014 13:11:53 +0000 (15:11 +0200)]
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>
9 years agolib: add a function to lock memory into RAM
Thomas Wood [Mon, 8 Dec 2014 11:12:51 +0000 (11:12 +0000)]
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>
9 years agolib: add optional log domain filtering
Thomas Wood [Tue, 2 Dec 2014 11:37:26 +0000 (11:37 +0000)]
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>
9 years agolib: introduce log domains
Thomas Wood [Tue, 2 Dec 2014 10:54:54 +0000 (10:54 +0000)]
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>
9 years agotests/gem_tiled_swapping: use igt_info logging wrapper
Thomas Wood [Tue, 2 Dec 2014 10:53:47 +0000 (10:53 +0000)]
tests/gem_tiled_swapping: use igt_info logging wrapper

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: replace 3D test images
Thomas Wood [Wed, 10 Dec 2014 16:24:03 +0000 (16:24 +0000)]
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>
9 years agotools: add missing copyright headers
Thomas Wood [Wed, 10 Dec 2014 14:47:45 +0000 (14:47 +0000)]
tools: add missing copyright headers

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoNEWS: Updates
Thomas Wood [Fri, 5 Dec 2014 14:46:28 +0000 (14:46 +0000)]
NEWS: Updates

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoAdd a MAINTAINERS file
Thomas Wood [Fri, 5 Dec 2014 14:07:53 +0000 (14:07 +0000)]
Add a MAINTAINERS file

Acked-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoUpdate README
Thomas Wood [Wed, 29 Oct 2014 11:18:27 +0000 (11:18 +0000)]
Update README

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/kms_cursor_crc: Restore the valid pipe/connector combo check
Ville Syrjälä [Tue, 9 Dec 2014 20:33:16 +0000 (22:33 +0200)]
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>
9 years agotests/kms_mmio_vs_cs_flip: Count valid tests for all crtcs
Ville Syrjälä [Tue, 9 Dec 2014 12:44:02 +0000 (14:44 +0200)]
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>
9 years agolib/igt_debugfs: Throw away the two first CRCs
Ville Syrjälä [Tue, 9 Dec 2014 13:27:59 +0000 (15:27 +0200)]
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>
9 years agodrv_hangman: Remove unused function
Damien Lespiau [Tue, 9 Dec 2014 17:10:42 +0000 (17:10 +0000)]
drv_hangman: Remove unused function

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_cursor_crc: Remove value to 'return' in a void function
Damien Lespiau [Tue, 9 Dec 2014 17:07:22 +0000 (17:07 +0000)]
kms_cursor_crc: Remove value to 'return' in a void function

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agotools: terminate getopt_long long option arrays properly
Jani Nikula [Wed, 12 Feb 2014 14:29:54 +0000 (16:29 +0200)]
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>
9 years agotests/kms_flip: Target the back buffer with the dummy load
Ville Syrjälä [Fri, 28 Nov 2014 07:30:45 +0000 (09:30 +0200)]
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>
9 years agotests/kms_flip: Calibrate the dummy load delay in kms_flip
Ville Syrjälä [Thu, 27 Nov 2014 14:51:34 +0000 (16:51 +0200)]
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>
9 years agotests/kms_flip: Use fixed size (2kx2k) buffers for dummy load
Ville Syrjälä [Wed, 3 Dec 2014 13:25:25 +0000 (15:25 +0200)]
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>
9 years agotests/kms_flip: Refactor blit code
Ville Syrjälä [Wed, 3 Dec 2014 12:59:22 +0000 (14:59 +0200)]
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>
9 years agotests: Run lib/igt.cocci
Ville Syrjälä [Wed, 3 Dec 2014 12:51:16 +0000 (14:51 +0200)]
tests: Run lib/igt.cocci

Found some open coded min()/max()/swap() macros.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
9 years agolib/igt.cocci: Deal with min/max/swap
Ville Syrjälä [Fri, 28 Nov 2014 09:11:17 +0000 (11:11 +0200)]
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>
9 years agolib: Add swap() macro
Ville Syrjälä [Fri, 28 Nov 2014 08:03:38 +0000 (10:03 +0200)]
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>
9 years agotests/pm_rps: vlv: round middle point to freq supported by HW
Imre Deak [Thu, 4 Dec 2014 15:23:05 +0000 (17:23 +0200)]
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>
9 years agotests/pm_rps: vlv: load gpu for idle min/max tests
Imre Deak [Thu, 4 Dec 2014 15:05:25 +0000 (17:05 +0200)]
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>
9 years agotests/pm_rps: vlv: wait for freq to settle
Imre Deak [Thu, 4 Dec 2014 14:40:19 +0000 (16:40 +0200)]
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>
9 years agoigt/drm_read: Require that pipe 0 is active
Chris Wilson [Mon, 8 Dec 2014 07:49:49 +0000 (07:49 +0000)]
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>
9 years agoigt/drm_read: Abuse read(drm)
Chris Wilson [Fri, 5 Dec 2014 13:12:37 +0000 (13:12 +0000)]
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>
9 years agointel_error_decode: Decode the ERROR register on Sandybridge and Ivybridge
Chris Wilson [Fri, 5 Dec 2014 11:04:42 +0000 (11:04 +0000)]
intel_error_decode: Decode the ERROR register on Sandybridge and Ivybridge

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agogem_bad_reloc: Don't flip-flop between SKIP and PASS
Damien Lespiau [Thu, 4 Dec 2014 13:42:12 +0000 (13:42 +0000)]
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>
9 years agotests: add gem_gpgpu_fill to .gitignore
Thomas Wood [Thu, 4 Dec 2014 11:13:04 +0000 (11:13 +0000)]
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>
9 years agolib: always reset connectors after the state is forced
Thomas Wood [Wed, 3 Dec 2014 14:38:45 +0000 (14:38 +0000)]
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>
9 years agolib: remove igt_edid.h
Thomas Wood [Wed, 8 Oct 2014 15:16:39 +0000 (16:16 +0100)]
lib: remove igt_edid.h

This has been replaced by igt_kms_get_base_edid().

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: use base edid
Thomas Wood [Wed, 8 Oct 2014 14:24:36 +0000 (15:24 +0100)]
tests: use base edid

Use the base edid for testing, which includes several different display
modes.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/kms_force_connector: split into subtests
Thomas Wood [Wed, 8 Oct 2014 13:49:36 +0000 (14:49 +0100)]
tests/kms_force_connector: split into subtests

v2: fix the initial mode count

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoigt_kms: add a base edid
Thomas Wood [Wed, 8 Oct 2014 13:11:30 +0000 (14:11 +0100)]
igt_kms: add a base edid

Add a basic edid block that includes several different display modes.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: add more test descriptions
Thomas Wood [Fri, 28 Nov 2014 11:02:44 +0000 (11:02 +0000)]
tests: add more test descriptions

Add more test descriptions based on exiting comments.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodocs: treat the test description as cdata
Thomas Wood [Fri, 28 Nov 2014 11:37:33 +0000 (11:37 +0000)]
docs: treat the test description as cdata

Enclose the test description in cdata tags since the test descriptions
come from the tests themselves and may not be escaped for use in xml.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodocs: add a glossary of test name terms
Thomas Wood [Wed, 19 Nov 2014 15:44:00 +0000 (15:44 +0000)]
docs: add a glossary of test name terms

Add a glossary of test name terms based on the details in
tests/NAMING-CONVENTION.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodocs: add exit status documentation
Thomas Wood [Wed, 26 Nov 2014 18:20:03 +0000 (18:20 +0000)]
docs: add exit status documentation

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodocs: add subtest lists to test descriptions
Thomas Wood [Fri, 28 Nov 2014 11:49:49 +0000 (11:49 +0000)]
docs: add subtest lists to test descriptions

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodocs: split the test program documentation into sections
Thomas Wood [Mon, 17 Nov 2014 11:51:51 +0000 (11:51 +0000)]
docs: split the test program documentation into sections

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: Add gem_gpgpu_fill upstream
Zhenyu Wang [Wed, 3 Dec 2014 11:09:13 +0000 (19:09 +0800)]
tests: Add gem_gpgpu_fill

This is simply a copy of gem_media_fill but using new
GPGPU fill operation.

v2: Use general fill func pointer.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
9 years agolib: Add GPGPU fill
Zhenyu Wang [Wed, 3 Dec 2014 11:05:09 +0000 (19:05 +0800)]
lib: Add GPGPU fill

This is to add fill operation using GPGPU pipeline which is similar to
current media fill. This can be used to simply verify GPGPU pipeline
and help to enable it on newer HW, currently it works on Gen7 only and
will add support on later platform.

Now this sets very simply thread group dispatch for one thread per
thread group on SIMD16 dispatch. So the fill shader just uses thread
group ID for buffer offset.

v2: No new fill func typedef but adapt to igt_fillfunc_t.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
9 years agolib: rename igt_media_fillfunc_t typedef to igt_fillfunc_t
Zhenyu Wang [Wed, 3 Dec 2014 10:56:39 +0000 (18:56 +0800)]
lib: rename igt_media_fillfunc_t typedef to igt_fillfunc_t

This makes fill function more general to prepare for other
fill method using GPGPU pipeline.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
9 years agotests/drv_hangman: remove check for other drm clients
Tim Gore [Mon, 1 Dec 2014 14:42:37 +0000 (14:42 +0000)]
tests/drv_hangman: remove check for other drm clients

This test will not run on Android as the coreu service
remains running even after the android system is stopped.
Coreu is a client of drm and when the test finds this it
fails an assert.
Coreu is started by the init process and there is no
tidy, non invasive way to stop it (init just restarts it).
Coreu isn't doing anything and would not be expected to
interfere with this test. In addition, all the other
igt tests just rely on the user/test script to ensure
that there are no other drm clients, so this test can
do the same. On Android we must rely on coreu being
dormant when this test runs.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agotests/Android.mk: Add kms_pwrite_crc to cairo test list
Tim Gore [Tue, 18 Nov 2014 14:59:25 +0000 (14:59 +0000)]
tests/Android.mk: Add kms_pwrite_crc to cairo test list

kms_pwrite_crc was recently added and requires cairo, so
add this to the list of tests to exclude if cairo is not
avaiable

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/kms_flip: Fix assert about vblank wait duration
Ville Syrjälä [Fri, 28 Nov 2014 09:13:45 +0000 (11:13 +0200)]
tests/kms_flip: Fix assert about vblank wait duration

If we wait for one vblank, we may end up returning almost immediately,
so trying to assert anything but >0 about the minimum duration is
bogus.

Instead wait for two vblanks and then we can assert that we should have
be blocked for at least one frame. And move the upper bound to a little
over two frames to match.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79050
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
9 years agotests/gem_ring_sync_copy: reduce memory usage
Tim Gore [Fri, 28 Nov 2014 14:46:24 +0000 (14:46 +0000)]
tests/gem_ring_sync_copy: reduce memory usage

gem_ring_sync_copy uses a lot of memory and gets OOM killed on smaller
systems (eg android devices).  Most of the allocation is for "busy work"
to keep the render rings busy and for this we can just re-use the same
few buffers over and over. This enables the test to be run on low end
devices.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agolib: ensure subtests are not added to simple tests
Thomas Wood [Tue, 25 Nov 2014 14:10:04 +0000 (14:10 +0000)]
lib: ensure subtests are not added to simple tests

Simple tests do not support subtests, so fail if igt_subtest is used in
one.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: use subtests in gem_tiled_swapping
Thomas Wood [Tue, 25 Nov 2014 14:03:40 +0000 (14:03 +0000)]
tests: use subtests in gem_tiled_swapping

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib: fix symbol names in documentation comments
Thomas Wood [Tue, 25 Nov 2014 11:59:37 +0000 (11:59 +0000)]
lib: fix symbol names in documentation comments

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodemos/intel_sprite_on: Added support to compile intel_sprite_on on Android.
Gagandeep S Arora [Thu, 13 Nov 2014 18:12:46 +0000 (23:42 +0530)]
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>
9 years agolib: fix igt_reset_connectors
Thomas Wood [Mon, 24 Nov 2014 14:16:25 +0000 (14:16 +0000)]
lib: fix igt_reset_connectors

Use igt_debugfs_open to open the connector file, since the
forced_connectors array now only stores the connector path relative to
the debugfs path. Also add some extra error checking to ensure a test
failure if the reset fails.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85829
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_debugfs: Don't setup crc in _new
Daniel Vetter [Mon, 24 Nov 2014 15:08:32 +0000 (16:08 +0100)]
lib/igt_debugfs: Don't setup crc in _new

The problem is that this causes writes to registers, and if the pipe
is off they might go nowhere (e.g. when runtime pm is enabled).
Furthermore we can only really check once the modeset setup is done,
but again most tests set up the CRC structure before calling
igt_commit and friends. We could add crc restore support to the
kernel's rpm code, but that will end up being rather invasive and
fragile hard-to-test code.

Now originally this was needed back when CRC support wasn't available
everywhere. But that's fixed now.

So given all this just drop that sanity check and make sure that we
only touch the debugfs file (and so the hw state) when we know the
pipe is running in the desired configuration.

A complementary kernel patch will try to catch offenders by returning
-EIO if the pipe is off.

v2: Forgot to git add one hunk.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agotests/kms_render: gen2/3 can't do 10bpc
Daniel Vetter [Tue, 18 Nov 2014 14:17:43 +0000 (15:17 +0100)]
tests/kms_render: gen2/3 can't do 10bpc

So skip those.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86236
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agotests/prime_self_import: Track leaked objects accurately
Daniel Vetter [Tue, 18 Nov 2014 12:49:29 +0000 (13:49 +0100)]
tests/prime_self_import: Track leaked objects accurately

drm_open_any keeps a buffer handle around for the cleanup sync work,
so we can only grab the buffer count after the latst drm_open_any
call. Otherwise we'll detect a fake leak.

This broke in

commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84
Author: Mika Kuoppala <mika.kuoppala@intel.com>
Date:   Fri Mar 28 10:52:46 2014 +0200

    lib/drmtest: don't dup quiescent fd

since that additional open drm fd keeps a gem object for the default
context around. Hence why this also only blows up on gen6+ - earlier
platforms don't have hw context support.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79821
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agolib/aux: Make it clear that rtcwake failures aren't bugs
Daniel Vetter [Tue, 18 Nov 2014 09:39:38 +0000 (10:39 +0100)]
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>
9 years agolib/os: Push simulation test down into intel_require_memory
Daniel Vetter [Mon, 17 Nov 2014 13:46:50 +0000 (14:46 +0100)]
lib/os: Push simulation test down into intel_require_memory

This has the upside that we'll never forget to add it to thrashing
tests. But we'll also never miss to move it when adding basic
functionality tests to existing binaries. Chris already started this
refining work in e.g.

commit d77eda6614a1955717f224be023dedf74eb7735d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Nov 14 07:45:40 2014 +0000

    igt/gem_linear_blits: Require that we do the full test

by moving igt_skip_on_simulation into subtests.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agolib/os: Pust igt_require into memory check function
Daniel Vetter [Mon, 17 Nov 2014 13:43:33 +0000 (14:43 +0100)]
lib/os: Pust igt_require into memory check function

More in line with the usual igt pattern and simplifies the code -
every called just wrapped it in igt_require.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agoconfigure: update bug reporting url
Thomas Wood [Fri, 7 Nov 2014 14:45:01 +0000 (14:45 +0000)]
configure: update bug reporting url

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoigt/gem_tiled_blits: Require that we do the full test
Chris Wilson [Fri, 14 Nov 2014 07:45:40 +0000 (07:45 +0000)]
igt/gem_tiled_blits: Require that we do the full test

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_linear_blits: Require that we do the full test
Chris Wilson [Fri, 14 Nov 2014 07:45:40 +0000 (07:45 +0000)]
igt/gem_linear_blits: Require that we do the full test

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agotests/pm_rpm: add gem-evict-pwrite subtest
Imre Deak [Thu, 13 Nov 2014 11:33:54 +0000 (13:33 +0200)]
tests/pm_rpm: add gem-evict-pwrite subtest

This triggers a device suspended WARN in the kernel in
gen6_ggtt_insert_entries() while calling the GEM pwrite ioctl.

The sequence is suggested by Daniel.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agotests/kms_pwrite_crc: Add pwrite vs display coherency test
Ville Syrjälä [Thu, 13 Nov 2014 15:24:57 +0000 (17:24 +0200)]
tests/kms_pwrite_crc: Add pwrite vs display coherency test

Add a test to verify that pwriting to a future scanout buffer works
correctly. The specific problem occurs when the buffer is already
UC/WT before the pwrite, not the current scanout buffer, and not
currently in the CPU write domain. With the buggy kernel no clflush
will be performed after the pwrite, and hence we end up with cache
dirt on the display.

The problem only affects LLC platforms (non-LLC would clflush anyway
after pwrite), but we can let the test run on all platforms.

v2: Fix typos in commit message and add to .gitignore

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
9 years agolib: only skip subsequent tests if a timeout occurs outside of a subtest
Thomas Wood [Thu, 13 Nov 2014 11:47:19 +0000 (11:47 +0000)]
lib: only skip subsequent tests if a timeout occurs outside of a subtest

Make timeout behaviour more consistent with igt_fail, where subsequent
subtests are only skipped if the failure occurs outside of a subtest.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/kms_flip: add a timeout for the nonblocking-read test
Thomas Wood [Mon, 10 Nov 2014 15:09:51 +0000 (15:09 +0000)]
tests/kms_flip: add a timeout for the nonblocking-read test

kms_flip/nonblocking-read will block indefinitely if it fails, so
introduce a timeout to indicate test failure.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib/tests: add a test for igt_set_timeout
Thomas Wood [Fri, 7 Nov 2014 16:25:59 +0000 (16:25 +0000)]
lib/tests: add a test for igt_set_timeout

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/gem_exec_parse: Go OCD about C-style comments
Daniel Vetter [Fri, 7 Nov 2014 09:40:32 +0000 (10:40 +0100)]
tests/gem_exec_parse: Go OCD about C-style comments

Cc: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agotests/gem_madvise: set execbuf.batch_len before doing an execbuf
Brad Volkin [Mon, 3 Nov 2014 19:19:00 +0000 (11:19 -0800)]
tests/gem_madvise: set execbuf.batch_len before doing an execbuf

The command parser's batch_len optimization causes the parser to
reject this batch as not having an MI_BATCH_BUFFER_END because
the length was not set correctly.

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agotests/gem_exec_parse: fix batch_len setting for cmd-crossing-page
Brad Volkin [Mon, 3 Nov 2014 19:18:59 +0000 (11:18 -0800)]
tests/gem_exec_parse: fix batch_len setting for cmd-crossing-page

The size of the batch buffer passed to the kernel is significantly
larger than the size of the batch buffer passed to the function. A
proposed optimization as part of the batch copy kernel series is to
use batch_len for the copy and parse operations, which leads to a
false "batch without MI_BATCH_BUFFER_END" failure for this test.

To fix this, modify the test to set batch_start_offset and batch_len
such that they define the range of actual commands in the batch,
including a few of the surrounding nops for alignment purposes.

v2: update batch_start_offset as well

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoconfigure: require automake 1.12
Thomas Wood [Wed, 12 Nov 2014 10:47:30 +0000 (10:47 +0000)]
configure: require automake 1.12

The check tests require AM_TESTS_ENVIRONMENT, which was added in
automake 1.12.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: ensure the script based tests are included in the distribution
Thomas Wood [Wed, 12 Nov 2014 10:39:41 +0000 (10:39 +0000)]
tests: ensure the script based tests are included in the distribution

TESTS_scripts was accidentally removed from EXTRA_DIST in commit 685e577
(Move library selftests to lib/tests).

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/gem_reset_stats: add defer-hangcheck test
Mika Kuoppala [Fri, 7 Nov 2014 13:33:34 +0000 (15:33 +0200)]
tests/gem_reset_stats: add defer-hangcheck test

to see if one can fool hangcheck by keeping non hanging
ring busy

v2: break from loop instead of return (Daniel Vetter)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
9 years agotests: use igt_debugfs where possible
Thomas Wood [Mon, 3 Nov 2014 13:48:51 +0000 (13:48 +0000)]
tests: use igt_debugfs where possible

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/drm_lib.sh: add a "--help-description" option
Thomas Wood [Thu, 30 Oct 2014 15:54:44 +0000 (15:54 +0000)]
tests/drm_lib.sh: add a "--help-description" option

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotestdisplay: add a test description
Thomas Wood [Thu, 30 Oct 2014 15:54:02 +0000 (15:54 +0000)]
testdisplay: add a test description

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodocs: include descriptions for the test programs
Thomas Wood [Tue, 14 Oct 2014 14:02:54 +0000 (15:02 +0100)]
docs: include descriptions for the test programs

v2: fix various distcheck issues

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoBuild the docs directory last
Thomas Wood [Tue, 14 Oct 2014 12:46:57 +0000 (13:46 +0100)]
Build the docs directory last

Ensure that other components are built before generating the
documentation.

v2: build the docs directory after any optional directories

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agodocs: add some test descriptions
Thomas Wood [Mon, 13 Oct 2014 10:40:12 +0000 (11:40 +0100)]
docs: add some test descriptions

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib: add the ability to include a description with a test
Thomas Wood [Fri, 10 Oct 2014 15:56:20 +0000 (16:56 +0100)]
lib: add the ability to include a description with a test

The IGT_TEST_DESCRIPTION macro can be used to define a description for a
test.

v2: Remove semicolon from end of macro (Damien Lespiau)
    Add API documentation for the macro.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoconfigure: fix issues when running outside the source tree
Thomas Wood [Fri, 31 Oct 2014 15:45:09 +0000 (15:45 +0000)]
configure: fix issues when running outside the source tree

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotestdiplay: add a "--help" option
Thomas Wood [Fri, 31 Oct 2014 15:00:03 +0000 (15:00 +0000)]
testdiplay: add a "--help" option

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotestdisplay: ensure invalid long option exit status is non-zero
Thomas Wood [Fri, 31 Oct 2014 12:32:22 +0000 (12:32 +0000)]
testdisplay: ensure invalid long option exit status is non-zero

The optopt variable is not set if an invalid long option is used, so
check the current option character instead.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib/tests: don't use hard error status to indicate test failure
Thomas Wood [Fri, 31 Oct 2014 11:45:16 +0000 (11:45 +0000)]
lib/tests: don't use hard error status to indicate test failure

An exit status of 99 is reported separately in the test summary as an
error, rather than as a test failure.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib/tests: fix tests and test list location
Thomas Wood [Fri, 31 Oct 2014 11:38:02 +0000 (11:38 +0000)]
lib/tests: fix tests and test list location

The igt_command_line.sh script was moved by commit 685e577 (Move library
selftests to lib/tests), but the location of the tests and the test
lists was not updated.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotools/quick_dump: don't include generated sources in the distribution
Thomas Wood [Wed, 5 Nov 2014 15:58:54 +0000 (15:58 +0000)]
tools/quick_dump: don't include generated sources in the distribution

This also ensures that "make dist" works even if SWIG is not available.

BUILT_SOURCES is not required because the files are already explicit
dependencies of other rules.

v2: make sure SWIG is not invoked with the incorrect output filename

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoMediafill/skl: Remove redundant field to fix GPU hang
Zhao Yakui [Thu, 6 Nov 2014 08:02:31 +0000 (16:02 +0800)]
Mediafill/skl: Remove redundant field to fix GPU hang

After applying the commit(982f7eb238a0898c456e0574dee7c4507738d75f), the
OUT_RELOC is updated on Broadwell and later, which is to handle the
64-bit field of gfx address internally. In such case some commands
should be fixed, otherwise GPU hang will be triggered when running
gem_media_fill.  (It is already fixed on Broadwell)

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agoRendercopy/skl: Remove redundant field to fix GPU hang
Zhao Yakui [Thu, 6 Nov 2014 08:02:30 +0000 (16:02 +0800)]
Rendercopy/skl: Remove redundant field to fix GPU hang

After applying the commit(982f7eb238a0898c456e0574dee7c4507738d75f), the
OUT_RELOC is updated on Broadwell and later, which is to handle the
64-bit field of gfx address internally. In such case some commands
should be fixed, otherwise GPU hang will be triggered when running
rendercopy.  (It is already fixed on Broadwell)

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agotests/drv_hangman: skip a few asserts when using the cmd parser
Brad Volkin [Tue, 4 Nov 2014 22:00:43 +0000 (14:00 -0800)]
tests/drv_hangman: skip a few asserts when using the cmd parser

This test has a few checks that batch buffer addresses in the error
state match the expected  address for the userspace supplied batch.
But the batch buffer copy piece of the command  parser means that
the logged addresses are actually _supposed_ to be different. So
skip just those checks.

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agotests: Remove spurious binaries from gem_tiled_wb commit
Chris Wilson [Tue, 4 Nov 2014 16:34:40 +0000 (16:34 +0000)]
tests: Remove spurious binaries from gem_tiled_wb commit

commit c45216b26d223ffd7f68c5794870214445a64b5c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Nov 4 07:30:57 2014 +0000

    igt/gem_tiled_wb: Exercise CPU mmaps with swizzling

brought along a few interlopers.

9 years agotests/prime_nv_test: Skip cpu mmap testcase
Daniel Vetter [Tue, 4 Nov 2014 16:24:55 +0000 (17:24 +0100)]
tests/prime_nv_test: Skip cpu mmap testcase

It's not implemented yet, so no point in running the test really.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68638
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agoigt/gem_tiled_wb: Remove extraneous mmap(wc) requirement
Chris Wilson [Tue, 4 Nov 2014 12:13:11 +0000 (12:13 +0000)]
igt/gem_tiled_wb: Remove extraneous mmap(wc) requirement

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_tiled_wb: Exercise CPU mmaps with swizzling
Chris Wilson [Tue, 4 Nov 2014 07:30:57 +0000 (07:30 +0000)]
igt/gem_tiled_wb: Exercise CPU mmaps with swizzling

This exercises the the extended get_tiling ioctl in order to determine
proper swizzling for direct access to objects through WB.
Userspace cannot handle bit17 swizzling through wc mmaps (because bit17
requires swizzling based on the actual physical address of the page -
which is unknown to userspace) and so we need an extended get_tiling
ioctl to report the actual as well as the logical swizzling on an
object.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>