3076 Commits

Author SHA1 Message Date
Thomas Wood
ebab9f080b 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>
2014-11-13 14:27:57 +00:00
Thomas Wood
f6aa80ca18 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>
2014-11-13 14:27:57 +00:00
Thomas Wood
34424138bc lib/tests: add a test for igt_set_timeout
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-13 14:27:57 +00:00
Daniel Vetter
6ee3337b28 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>
2014-11-12 13:43:04 +01:00
Brad Volkin
bf31ed80e0 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>
2014-11-12 13:43:04 +01:00
Brad Volkin
c1fdc2f0e9 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>
2014-11-12 13:43:04 +01:00
Thomas Wood
4dd6e0edcf 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>
2014-11-12 10:47:36 +00:00
Thomas Wood
10aacc7334 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>
2014-11-12 10:39:41 +00:00
Mika Kuoppala
50d539efeb 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>
2014-11-11 17:38:46 +02:00
Thomas Wood
c049c39f35 tests: use igt_debugfs where possible
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06 13:25:03 +00:00
Thomas Wood
4f689d52e7 tests/drm_lib.sh: add a "--help-description" option
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06 13:24:30 +00:00
Thomas Wood
895204fc62 testdisplay: add a test description
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06 13:24:30 +00:00
Thomas Wood
98188b4b41 docs: include descriptions for the test programs
v2: fix various distcheck issues

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06 13:24:30 +00:00
Thomas Wood
e6fec38cf7 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>
2014-11-06 13:24:30 +00:00
Thomas Wood
3d0dca47c6 docs: add some test descriptions
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06 13:24:29 +00:00
Thomas Wood
f8b3c704af 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>
2014-11-06 13:24:29 +00:00
Thomas Wood
c06016798c configure: fix issues when running outside the source tree
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06 11:41:34 +00:00
Thomas Wood
ce0d34d73d testdiplay: add a "--help" option
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06 11:41:34 +00:00
Thomas Wood
db425d69f6 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>
2014-11-06 11:41:34 +00:00
Thomas Wood
b441e6ac2a 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>
2014-11-06 11:39:43 +00:00
Thomas Wood
03a4ad16d1 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>
2014-11-06 11:39:02 +00:00
Thomas Wood
86bb6072a6 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>
2014-11-06 10:21:50 +00:00
Zhao Yakui
2c44d6316a 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>
2014-11-06 08:26:01 +00:00
Zhao Yakui
c68028936b 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>
2014-11-06 08:25:39 +00:00
Brad Volkin
e34240d4c1 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>
2014-11-05 13:35:29 +01:00
Chris Wilson
a973aabed0 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.
2014-11-04 16:34:40 +00:00
Daniel Vetter
83757d7b39 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>
2014-11-04 17:25:33 +01:00
Chris Wilson
fbc6730238 igt/gem_tiled_wb: Remove extraneous mmap(wc) requirement
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-04 12:13:37 +00:00
Chris Wilson
c45216b26d 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>
2014-11-04 12:09:26 +00:00
Chris Wilson
6fff1f8787 ioctl_wrappers: Pass in offset to CPU mmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-04 12:08:50 +00:00
Chris Wilson
676ccf862c igt/gem_linear_blits: Add sufficient RAM check
References: https://bugs.freedesktop.org/show_bug.cgi?id=85834
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-04 07:42:14 +00:00
Thomas Wood
e622850966 lib/igt_core.h: add debug messages for test requirements
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-31 14:10:26 +00:00
Thomas Wood
d950f37be3 lib/igt_core.h: fix igt_skip_on_f requirement message
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-31 14:10:26 +00:00
Thomas Wood
5a61421a02 lib/tests: use the "check_" prefix for tests
The "check_" prefix ensures the test programs are not installed and are
only built when "make check" is run.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29 17:26:38 +00:00
Thomas Wood
b78d142a15 build: fix distcheck
Fix distcheck issues introduced by commit 685e577 (Move library
selftests to lib/tests).

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29 17:26:34 +00:00
Thomas Wood
ab5f7eace1 lib: ensure the library is built before the tests
This fixes the build problems introduced by commit 685e577 (Move library
selftests to lib/tests).

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29 16:27:59 +00:00
Gagandeep S Arora
ad5cb25d70 demos/intel_sprite_on: Added support to display all sprites.
Extended intel_sprite_on functionality to display all the
available sprite planes on a particular connector.

Signed-off-by: Gagandeep S Arora <gagandeep.s.arora@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29 15:50:45 +00:00
Daniel Vetter
b6715d9aa7 tests: Reenable testdisplay
This seems to have been accidentally disabled in

commit 982f7eb238a0898c456e0574dee7c4507738d75f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 29 15:19:57 2014 +0100

    Prepare for 64bit relocation addresses

Apparently no one noticed.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-29 13:33:30 +01:00
Daniel Vetter
97f3391255 tests/testdisplay: Fix test status check fumble
This is a regression from

4306538d1d3f60877866c39c9ca953cc5e541dae is the first bad commit
commit 4306538d1d3f60877866c39c9ca953cc5e541dae
Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Thu Oct 2 11:18:20 2014 +0200
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Thu Oct 2 11:34:55 2014 +0200

    tests: Sprinkle missing igt_exit() where needed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85582
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-29 13:29:32 +01:00
Daniel Vetter
c15e6933bc Add CONTRIBUTING file
i-g-t has become a fairly big project with lots of people involved, so
lets document the basics and formalize the current process a bit.

Also use this opportunity to announce Thomas Wood as igt maintainer
once more.

v2: Recommend --subject-prefix="PATCH i-g-t" as suggested by Damien.

v3: Clean out contributing-related information from README.

Cc: Thomas Wood <thomas.wood@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-29 13:29:32 +01:00
Daniel Vetter
685e57736a Move library selftests to lib/tests
Again they're not really igt testcases so are in the way of
running spatch unconditionally. Move them someplace else.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-29 13:29:32 +01:00
Daniel Vetter
9d6a2cacf6 Move watermark code from tests to tools
They're now igt tests, and so if you blindly run lib/igt.cocci with
spatch on tests/*c they get mangled. Move them away, but still keep
them as noinst targets.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-29 13:29:32 +01:00
Paulo Zanoni
15972aa866 tests/pm_rpm: add system-suspend-{execbuf,modeset} subtests
We were having a problem where the system-suspend test was passing,
but then the next test - gem-execbuf-stress - was failing because of
bugs caused by the suspend subtest. So add a single test that emulates
the same problem, and another test that just sets a mode after resume.
This way, we should be reproducing the problem even if you don't run
the tests in the order they are defined.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-27 18:12:29 -02:00
Damien Lespiau
cba3088619 skl_ddb_allocation: Respect the minimum number of blocks
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-26 16:32:21 +00:00
Ville Syrjälä
7296e09ee7 tests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURF
Make sure DSPSURF will change during the panning operation
in flip-vs-panning-vs-hang.

This will now test agains bugs between the kernel's mmio vs.
CS flip race handling and GPU resets. If the kernel is buggy
if will fail to notice that the panning operation changed the
base address before the GPU reset had a chance to deal with the
pending page flips, and so the flip would never complete due to
DSPSURFLIVE not matching the expected value.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-24 16:25:39 +02:00
Chris Wilson
e497600fb7 igt/gem_userptr_blits/dmabuf: Map the right pointer for !llc
References: https://bugs.freedesktop.org/show_bug.cgi?id=85354#c2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-24 07:40:44 +01:00
Mika Kuoppala
eae9f724f2 tests/gem_workarounds: adapt to constant wa list from driver
Driver now returns the constant values that were set once
on ring initialization time. Extend the simple interface
check to all gens (i915_wa_registers needs to be present).
Due to delay when render context is visible on cpu side,
wait gpu to execute something on default context to get rid
of undeterministic behaviour by sometimes getting all ones.

Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-23 20:41:18 +03:00
Daniel Vetter
8b556f7c8f tests/*: lib/igt.cocci found something!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-23 17:54:44 +02:00
Sonika Jindal
47246981b2 kms_rotation_crc: Add test for cursor rotation (v2)
v2: Slight rebasing onto latest i-g-t codebase (Matt).

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-23 17:51:47 +02:00
Mika Kuoppala
4f6a6cbdff lib: fix #define max
Regression from:

commit be4710a541b517b5f8663448bffed5656d59b47b
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Fri Oct 10 11:20:35 2014 +0100

    lib: add common min and max macros

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85218
Tested-by: Guo Jinxian <jinxianx.guo@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-23 12:48:05 +03:00