platform/upstream/intel-gpu-tools.git
9 years agopackaging: use git tag from upstream submit/tizen_common/20141204.160401
Philippe Coval [Wed, 26 Nov 2014 15:07:18 +0000 (16:07 +0100)]
packaging: use git tag from upstream

Change-Id: I0faca722115525ac84f506788aca325f04fbcd5e
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Bump to 1.8
Philippe Coval [Wed, 26 Nov 2014 15:05:40 +0000 (16:05 +0100)]
packaging: Bump to 1.8

Change-Id: Ie72abc29ac5c63819ebbf4a25fd30e83627aff97
Bug-Tizen: TINF-631
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Bump to 1.7
Philippe Coval [Thu, 17 Jul 2014 16:54:19 +0000 (18:54 +0200)]
packaging: Bump to 1.7

spec cleanup

Change-Id: I03116848f73dbd0a73d9e7a8440e47577b0ffdd5
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Intial packaging on 1.3 for Tizen
Philippe Coval [Thu, 17 Jul 2014 16:52:53 +0000 (18:52 +0200)]
packaging: Intial packaging on 1.3 for Tizen

Author: Graydon, Tracy <tracy.graydon@intel.com>
Change-Id: Icc36b01a88ec642e98899119ea90d5f999148097
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
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>
9 years agoioctl_wrappers: Pass in offset to CPU mmaps
Chris Wilson [Tue, 4 Nov 2014 12:06:17 +0000 (12:06 +0000)]
ioctl_wrappers: Pass in offset to CPU mmaps

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_linear_blits: Add sufficient RAM check
Chris Wilson [Tue, 4 Nov 2014 07:40:11 +0000 (07:40 +0000)]
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>
9 years agolib/igt_core.h: add debug messages for test requirements
Thomas Wood [Wed, 29 Oct 2014 12:26:09 +0000 (12:26 +0000)]
lib/igt_core.h: add debug messages for test requirements

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib/igt_core.h: fix igt_skip_on_f requirement message
Thomas Wood [Wed, 29 Oct 2014 12:03:22 +0000 (12:03 +0000)]
lib/igt_core.h: fix igt_skip_on_f requirement message

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib/tests: use the "check_" prefix for tests
Thomas Wood [Wed, 29 Oct 2014 17:20:52 +0000 (17:20 +0000)]
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>
9 years agobuild: fix distcheck
Thomas Wood [Wed, 29 Oct 2014 17:18:06 +0000 (17:18 +0000)]
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>
9 years agolib: ensure the library is built before the tests
Thomas Wood [Wed, 29 Oct 2014 16:17:41 +0000 (16:17 +0000)]
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>
9 years agodemos/intel_sprite_on: Added support to display all sprites.
Gagandeep S Arora [Fri, 12 Sep 2014 19:56:04 +0000 (01:26 +0530)]
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>
9 years agotests: Reenable testdisplay
Daniel Vetter [Wed, 29 Oct 2014 12:31:15 +0000 (13:31 +0100)]
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>
9 years agotests/testdisplay: Fix test status check fumble
Daniel Vetter [Wed, 29 Oct 2014 12:28:55 +0000 (13:28 +0100)]
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>
9 years agoAdd CONTRIBUTING file
Daniel Vetter [Tue, 28 Oct 2014 09:54:32 +0000 (10:54 +0100)]
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>
9 years agoMove library selftests to lib/tests
Daniel Vetter [Mon, 27 Oct 2014 14:08:50 +0000 (15:08 +0100)]
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>
9 years agoMove watermark code from tests to tools
Daniel Vetter [Mon, 27 Oct 2014 13:51:55 +0000 (14:51 +0100)]
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>
9 years agotests/pm_rpm: add system-suspend-{execbuf,modeset} subtests
Paulo Zanoni [Fri, 24 Oct 2014 19:40:04 +0000 (17:40 -0200)]
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>
9 years agoskl_ddb_allocation: Respect the minimum number of blocks
Damien Lespiau [Wed, 15 Oct 2014 22:13:30 +0000 (23:13 +0100)]
skl_ddb_allocation: Respect the minimum number of blocks

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agotests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURF
Ville Syrjälä [Tue, 27 May 2014 18:33:10 +0000 (21:33 +0300)]
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>
9 years agoigt/gem_userptr_blits/dmabuf: Map the right pointer for !llc
Chris Wilson [Fri, 24 Oct 2014 06:40:04 +0000 (07:40 +0100)]
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>
9 years agotests/gem_workarounds: adapt to constant wa list from driver
Mika Kuoppala [Mon, 15 Sep 2014 10:01:31 +0000 (13:01 +0300)]
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>
9 years agotests/*: lib/igt.cocci found something!
Daniel Vetter [Thu, 23 Oct 2014 15:54:44 +0000 (17:54 +0200)]
tests/*: lib/igt.cocci found something!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agokms_rotation_crc: Add test for cursor rotation (v2)
Sonika Jindal [Thu, 23 Oct 2014 15:48:50 +0000 (08:48 -0700)]
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>
9 years agolib: fix #define max
Mika Kuoppala [Mon, 20 Oct 2014 10:27:55 +0000 (13:27 +0300)]
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>
9 years agoigt/gem_userptr_blits/dmabuf: Provide partial coverage on !llc platforms
Chris Wilson [Thu, 23 Oct 2014 06:55:54 +0000 (07:55 +0100)]
igt/gem_userptr_blits/dmabuf: Provide partial coverage on !llc platforms

Without LLC, we cannot assume coherency between system RAM and the GTT.
If we try to use the GTT with snooped memory, the machine may lock up,
so the kernel prevents us from doing so, causing the test to fail.
However, we still do want to verify that we can access the userptr
through a dmabuf, so just check that we can make a copy from it using
the GPU and ignore the GTT cross-checking.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85354
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agolib/igt_aux: move audio RPM code to igt_setup_runtime_pm()
Paulo Zanoni [Tue, 21 Oct 2014 13:45:59 +0000 (11:45 -0200)]
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>
10 years agotests/gem_exec_parse: test for chained batch buffers
Brad Volkin [Wed, 15 Oct 2014 21:52:42 +0000 (14:52 -0700)]
tests/gem_exec_parse: test for chained batch buffers

libva makes extensive use of chained batch buffers. The batch
buffer copy portion of the command parser has the potential to
break chained batches, so add a simple test to make sure that
doesn't happen.

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_cursor_crc: HSW/BDW only have square cursors
Paulo Zanoni [Tue, 14 Oct 2014 16:52:58 +0000 (13:52 -0300)]
tests/kms_cursor_crc: HSW/BDW only have square cursors

When I look at cursor_size_ok() (from the Kernel's intel_display.c), I
see that only 845g and i865g support non-square cursors, so SKIP the
tests on HSW/BDW instead of failing them.

This problem happened because support for non-square cursors was being
developed for HSW/BDW, but it ended up not being merged due to a small
problem and priority changes. Let's make those tests SKIP until we
have proper support on the Kernel: after that, we can revert this
patch.

v2: Improve commit message.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84268
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agolib/igt_aux: make igt_wait_for_pm_status() resist the signal helper
Paulo Zanoni [Tue, 14 Oct 2014 19:01:10 +0000 (16:01 -0300)]
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>
10 years agotests/kms_force_connector: fix assertion when VGA is already connected
Thomas Wood [Wed, 15 Oct 2014 11:10:13 +0000 (12:10 +0100)]
tests/kms_force_connector: fix assertion when VGA is already connected

Compare the number of modes available when the edid is reset with the
number before the edid was overridden.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82230
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agotests: add a check for command line handling
Thomas Wood [Thu, 16 Oct 2014 16:29:55 +0000 (17:29 +0100)]
tests: add a check for command line handling

Check that command line handling works consistently across all tests.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agodrm_lib.sh: add standard command line options
Thomas Wood [Thu, 16 Oct 2014 15:35:44 +0000 (16:35 +0100)]
drm_lib.sh: add standard command line options

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agoconfigure: include the skylake quick_dump files in EXTRA_DIST
Thomas Wood [Thu, 16 Oct 2014 13:23:24 +0000 (14:23 +0100)]
configure: include the skylake quick_dump files in EXTRA_DIST

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agoquick_dump: fix distcheck
Thomas Wood [Thu, 16 Oct 2014 12:59:37 +0000 (13:59 +0100)]
quick_dump: fix distcheck

Commit 711a17a (quick_dump: Move base_display.txt to indivual platforms)
renamed base_display.txt to common_display.txt, but didn't update
Makefile.am accordingly. Since common_display.txt is now included in the
platform files, it is automatically included in $(QUICK_DUMP_EXTRA_DIST)
and therefore just the reference to base_display.txt needs removing.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agolib: add common min and max macros
Thomas Wood [Fri, 10 Oct 2014 10:20:35 +0000 (11:20 +0100)]
lib: add common min and max macros

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agolib: various documentation fixes
Thomas Wood [Wed, 8 Oct 2014 16:06:58 +0000 (17:06 +0100)]
lib: various documentation fixes

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agoskl_ddb_allocation: Make 'end' exclusive in the DDB allocation entry
Damien Lespiau [Mon, 13 Oct 2014 14:14:15 +0000 (15:14 +0100)]
skl_ddb_allocation: Make 'end' exclusive in the DDB allocation entry

Ville suggested that we should use the same semantics as C arrays to
reduce the number of those pesky +1/-1 in the allocation code.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agoskl_ddb_allocation: Add checks on the DDB entries
Damien Lespiau [Mon, 28 Apr 2014 06:11:04 +0000 (07:11 +0100)]
skl_ddb_allocation: Add checks on the DDB entries

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agoskl_ddb_allocation: Add a standalone version of the DDB allocator
Damien Lespiau [Mon, 28 Apr 2014 04:56:31 +0000 (05:56 +0100)]
skl_ddb_allocation: Add a standalone version of the DDB allocator

This is useful to debug the allocation algorithm.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotests/kms_force_connect: skip if a VGA connector is not available
Thomas Wood [Thu, 9 Oct 2014 15:44:12 +0000 (16:44 +0100)]
tests/kms_force_connect: skip if a VGA connector is not available

v2: rename "connector" to "vga_connector" to improve the skip message
    (Chris Wilson)

Suggested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agotests/kms_force_connector: ensure igt_exit is called at exit
Thomas Wood [Thu, 9 Oct 2014 15:29:20 +0000 (16:29 +0100)]
tests/kms_force_connector: ensure igt_exit is called at exit

Since commit 5782eca (lib/igt_core.c: disable lowmemorykiller during
tests), igt_exit needs to be called before the test exits.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84771
Cc: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agotests/pm_rc6_residency: Split RC6p and RC6pp.
Rodrigo Vivi [Tue, 14 Oct 2014 17:19:13 +0000 (10:19 -0700)]
tests/pm_rc6_residency: Split RC6p and RC6pp.

sysfs interface for rc6 has been changed to only expose deep RC6 file to the platorms
that really support them, aka SNB and IVB.

So let's split this test and only test RC6p and RC6pp on these platforms.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=84886
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
10 years agotests/pm_rpm: use igt_assert_eq() on COMPARE()
Paulo Zanoni [Tue, 14 Oct 2014 18:09:22 +0000 (15:09 -0300)]
tests/pm_rpm: use igt_assert_eq() on COMPARE()

A few weeks ago we were hitting this assertion, and the _eq macro is
more useful when you're debugging.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_rpm: fix some compilation warnings
Paulo Zanoni [Tue, 14 Oct 2014 17:59:36 +0000 (14:59 -0300)]
tests/pm_rpm: fix some compilation warnings

 warning: ignoring return value of ‘write’, declared with attribute
 warn_unused_result [-Wunused-result]

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_rpm: reduce the number of rounds on the stress tests
Paulo Zanoni [Tue, 14 Oct 2014 17:42:23 +0000 (14:42 -0300)]
tests/pm_rpm: reduce the number of rounds on the stress tests

With the current Kernel, it takes more than 10 minutes to run
modeset-stress-extra-wait on BYT with eDP, and we don't really want
IGT subtests that take more than 10 minutes to run: QA reports them as
bugs.

Since, as far as I remember, any of these RPM race condition bugs we
had could always be triggered with just 4-5 rounds of testing, let's
tune down the number of rounds we test:

Before:
rounds = (--quick option used) ? 10 : 50;

After:
rounds = (--quick option used) ? 10 : 40;
rounds = (wait_flags & WAIT_EXTRA) ? rounds / 2 : rounds;

This should make all subtests be way above the 10m limit.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84897
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agoigt/gem_bad_reloc: Handle real offset being 0
Chris Wilson [Tue, 14 Oct 2014 09:10:42 +0000 (10:10 +0100)]
igt/gem_bad_reloc: Handle real offset being 0

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoigt/gem_negative_reloc: Execute a BLT operation with a negative reloc
Chris Wilson [Tue, 14 Oct 2014 08:27:40 +0000 (09:27 +0100)]
igt/gem_negative_reloc: Execute a BLT operation with a negative reloc

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