platform/upstream/intel-gpu-tools.git
9 years agopackaging: only on x86* arch accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_common accepted/tizen_ivi tizen tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m2 tizen_3.0_ivi accepted/tizen/3.0/common/20161114.110836 accepted/tizen/common/20141205.152252 accepted/tizen/ivi/20141212.050444 submit/tizen/20141205.150356 submit/tizen_3.0_common/20161104.104000 submit/tizen_common/20141205.150402 submit/tizen_ivi/20141208.111111 submit/tizen_ivi/20141209.111111 tizen_3.0_ivi_release
Philippe Coval [Fri, 5 Dec 2014 15:03:35 +0000 (16:03 +0100)]
packaging: only on x86* arch

Change-Id: Ie23c43edbbc6bfa54105c27dbb11030871bd8142
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: use git tag from upstream submit/tizen_common/20141205.143329
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 agobump version to 1.8 and add the release date intel-gpu-tools-1.8
Rodrigo Vivi [Tue, 9 Sep 2014 02:43:46 +0000 (22:43 -0400)]
bump version to 1.8 and add the release date

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
9 years agoigt/gem_cpu_reloc: Terminate the bad batch
Chris Wilson [Mon, 8 Sep 2014 11:52:31 +0000 (12:52 +0100)]
igt/gem_cpu_reloc: Terminate the bad batch

gen2 will read the batch up until it reaches the end as defined by the
MI_BATCH_BUFFER_END command. Play nice and make sure that it does end on a
MI_BB_END.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/kms_flip_tiling: Use the associated pipe for the output
Chris Wilson [Sun, 7 Sep 2014 14:52:10 +0000 (15:52 +0100)]
igt/kms_flip_tiling: Use the associated pipe for the output

This stops us from using an illegal pipe, such as pipe 0 for LVDS on
PNV.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82280
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLC
Chris Wilson [Mon, 8 Sep 2014 09:28:41 +0000 (10:28 +0100)]
igt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLC

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/kms_universal_plane: Only test existing planes
Chris Wilson [Sat, 6 Sep 2014 17:14:35 +0000 (18:14 +0100)]
igt/kms_universal_plane: Only test existing planes

Only attempt to test the number of planes that exist on the device so as
not to trigger spurious failures.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82233
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/drv_missed_irq_hang: Increase busy load
Chris Wilson [Sat, 6 Sep 2014 16:25:01 +0000 (17:25 +0100)]
igt/drv_missed_irq_hang: Increase busy load

The test relies on having to wait upon the GPU at some point and so
simulating a missed interrupt. If there is insufficient load on the GPU,
we can complete the task before we even wait.

References: https://bugs.freedesktop.org/show_bug.cgi?id=71334
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoaux: Squelch warning when emitting progress indicator
Chris Wilson [Sat, 6 Sep 2014 11:41:28 +0000 (12:41 +0100)]
aux: Squelch warning when emitting progress indicator

commit 1649ef0d1f5c0e4f995a437bd24f1574a8b5100f
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Aug 26 15:26:21 2014 +0200

    lib/igt_* Use igt macros in igt libaries

went a little too far here as the replacement macro was too clever.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agocore: Prettify igt_require_f output
Chris Wilson [Sat, 6 Sep 2014 11:21:25 +0000 (12:21 +0100)]
core: Prettify igt_require_f output

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agolib/igt_fb: Ignore RGB888
Chris Wilson [Sat, 6 Sep 2014 11:08:13 +0000 (12:08 +0100)]
lib/igt_fb: Ignore RGB888

None of our display hardware supports the packed 24-bit format, so stop
trying to use it and causing test failures.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78873&list_id=465068
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agolib/igt_fb: Add debug output for creating fb
Chris Wilson [Sat, 6 Sep 2014 11:07:49 +0000 (12:07 +0100)]
lib/igt_fb: Add debug output for creating fb

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agocore: Display subtest walltime
Chris Wilson [Sat, 6 Sep 2014 07:40:04 +0000 (08:40 +0100)]
core: Display subtest walltime

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agolib: keep a list of modified connectors to reset
Thomas Wood [Thu, 4 Sep 2014 10:35:01 +0000 (11:35 +0100)]
lib: keep a list of modified connectors to reset

Avoid calling functions in igt_reset_connectors that are not safe to use
in signal handlers by keeping a list of connectors that have been
modified, instead of enumerating all connectors.

v2: add space for a sentinel NULL value on forced_connectors and print a
    warning when the connector limit is reached (Chris Wilson)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83498
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests/kms_3d: skip if connectors cannot be forced
Thomas Wood [Thu, 4 Sep 2014 16:00:16 +0000 (17:00 +0100)]
tests/kms_3d: skip if connectors cannot be forced

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib: don't force HDMI or DP connectors on HSW and BDW
Thomas Wood [Thu, 4 Sep 2014 15:56:17 +0000 (16:56 +0100)]
lib: don't force HDMI or DP connectors on HSW and BDW

Forcing HDMI or DP connectors on these platforms doesn't currently work,
so fail early to allow the test to skip if required.

v2: restrict to HSW and BDW (Daniel Vetter)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib/igt_fb: ensure igt_create_fb parameters are consistent
Thomas Wood [Fri, 29 Aug 2014 16:54:10 +0000 (17:54 +0100)]
lib/igt_fb: ensure igt_create_fb parameters are consistent

Make sure the parameters in the prototype and implementation of
igt_create_fb match and are complete so that the documentation is
correct.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: add kms_3d test
Thomas Wood [Wed, 20 Aug 2014 10:13:34 +0000 (11:13 +0100)]
tests: add kms_3d test

Add a test to verify creation and use of 3D stereo modes.

v2: update for API changes

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib: move create_stereo_fb from testdisplay to igt_fb
Thomas Wood [Mon, 4 Aug 2014 15:14:51 +0000 (16:14 +0100)]
lib: move create_stereo_fb from testdisplay to igt_fb

Move create_stereo_fb from testdisplay to igt_create_stereo_fb in igt_fb
so that it can be used in other tests.

v2: update for new igt_create_fb API
    add parameters for format and tiling
    remove some old debug code

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib: add kmstest_edid_add_3d
Thomas Wood [Wed, 30 Jul 2014 10:10:49 +0000 (11:10 +0100)]
lib: add kmstest_edid_add_3d

kmstest_edid_add_3d adds an EDID extension block with 3D support to a
copy of the specified EDID.

v2: Avoid using an invalid CEC SPA (Clint Taylor)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotools/null_state_gen: build cmd and state space separately
Mika Kuoppala [Fri, 1 Aug 2014 18:19:56 +0000 (21:19 +0300)]
tools/null_state_gen: build cmd and state space separately

Instead of building batch directly to memory, build into cmd and
state arrays. This representation allows us more flexibility in batch
state expression and batch generation/relocation.

As a bonus, we can also attach the line information that produced the
batch data to help debugging.

There is no change in the output states produced. This can be considered
as a preparatory patch to help introduce gen8 golden state.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
9 years agolib: Add MI_LOAD_REGISTER_IMM
Mika Kuoppala [Fri, 1 Aug 2014 18:19:55 +0000 (21:19 +0300)]
lib: Add MI_LOAD_REGISTER_IMM

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
9 years agolib/gen6_render: fix GEN6_3DSTATE_VF_STATISTICS define
Mika Kuoppala [Fri, 1 Aug 2014 18:19:54 +0000 (21:19 +0300)]
lib/gen6_render: fix GEN6_3DSTATE_VF_STATISTICS define

We dont use this pre CTG and we will need it for gen8 golden state.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
9 years agolib/rendercopy: fix a typo in define
Mika Kuoppala [Fri, 1 Aug 2014 18:19:53 +0000 (21:19 +0300)]
lib/rendercopy: fix a typo in define

No functional changes

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
9 years agotools/null_state_gen: terminate relocs with -1
Mika Kuoppala [Fri, 1 Aug 2014 18:19:52 +0000 (21:19 +0300)]
tools/null_state_gen: terminate relocs with -1

as this was already changed in kernel.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
9 years agolib/igt_aux: Improve wait_for_keypress helper a bit
Daniel Vetter [Fri, 5 Sep 2014 06:51:27 +0000 (08:51 +0200)]
lib/igt_aux: Improve wait_for_keypress helper a bit

- Use keys in just one env variable to enable/disable it.
- Add an informational message so that the users knows when to press
  the key (more useful over ssh than when run on the terminal ofc).
- Improve the documentation so that it's clearer how to use this
  when running tests.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoigt_core: zero exit_handler_count before forking
Paulo Zanoni [Wed, 3 Sep 2014 17:47:21 +0000 (14:47 -0300)]
igt_core: zero exit_handler_count before forking

If we don't reset exit_handler_count before forking, we may have a
case where the forked process is killed before it even does
"exit_handler_count = 0": in that case, it is still finishing forking.
When that happens, we may end up calling our exit handlers. On the
specific bug I'm investigating, we call igt_reset_connnectors(), which
ends up in a deadlock inside malloc_atfork. If we attach gdb to the
forked process and get a backtrace, we have:

(gdb) bt
0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
1  0x00007f15634d36bf in _L_lock_10524 () from /lib/x86_64-linux-gnu/libc.so.6
2  0x00007f15634d12ef in malloc_atfork (sz=139729840351352, caller=<optimized out>) at arena.c:181
3  0x00007f15640466a1 in drmMalloc () from /usr/lib/x86_64-linux-gnu/libdrm.so.2
4  0x00007f1564049ad7 in drmModeGetResources () from /usr/lib/x86_64-linux-gnu/libdrm.so.2
5  0x0000000000408f84 in igt_reset_connectors () at igt_kms.c:1656
6  0x00000000004092dc in call_exit_handlers (sig=15) at igt_core.c:1130
7  fatal_sig_handler (sig=15) at igt_core.c:1154
8  <signal handler called>
9  0x00007f15634cce60 in ptmalloc_unlock_all2 () at arena.c:298
10 0x00007f156350ca3f in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:188
11 0x000000000040a029 in __igt_fork_helper (proc=proc@entry=0x610fc4 <signal_helper>) at igt_core.c:910
12 0x000000000040459d in igt_fork_signal_helper () at igt_aux.c:110
13 0x0000000000402ab7 in __real_main63 () at bug.c:76
14 0x000000000040296e in main (argc=<optimized out>, argv=<optimized out>) at bug.c:63

After doing some searches for "stuck at malloc_atfork", it seems to me
we probably shouldn't be doing any malloc calls at this point of the
code, so the best way to do that is to make sure we can't really run
the exit handlers.

So on this patch, instead of resetting the exit handlers after
forking, we reset them before forking, and then restore the original
value on the parent process.

I can reproduce this problem by running "./kms_flip --run-subtest
2x-flip-vs-modeset" under an infinite loop. Usually after a few
hundred calls, we end up stuck on the deadlock mentioned above. QA
says this problem happens every time, but I'm not sure what is the
difference between our environments that makes the race condition so
much easier for them.

The kms_flip.c problem can be considered a regression introduced by:
commit eef768f283466b6d7cb3f08381f72ccf3951dc99
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Wed Jun 18 14:28:43 2014 +0100
    tests: enable extra connectors in kms_flip and kms_pipe_crc_basic

even though this commit is not the one that introduced the real
problem.

It is also possible to reproduce this problem with a few modifications
to template.c:
  - Add a call to igt_enable_connectors() inside the first fixture.
  - Add igt_fork_signal_helper() and igt_stop_signal_helper() calls
    around subtest B.

Note that the crucial piece is that the parent actively kills helper
children, and if we skip tests this can happen _really_ fast. See e.g.

commit a031a1bf93b828585e7147f06145fc5030814547
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Sep 13 16:43:22 2013 +0200

    lib/drmtest: ducttape over fork race

for past hilarity in this area.

Cc: Thomas Wood <thomas.wood@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81367
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoigt/gem_concurrent_blit: Move igt_require() out of children
Chris Wilson [Wed, 3 Sep 2014 12:38:30 +0000 (13:38 +0100)]
igt/gem_concurrent_blit: Move igt_require() out of children

Otherwise the test infrastructure throws a fit.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83420
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_gtt_hog: Convert opencoded fork()/wait() over to igt_fork()
Chris Wilson [Sat, 26 Jul 2014 10:42:20 +0000 (11:42 +0100)]
igt/gem_gtt_hog: Convert opencoded fork()/wait() over to igt_fork()

No reason not to use the common infrastructure here.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoNEWS: Updates in anticipation of the next release
Daniel Vetter [Wed, 3 Sep 2014 10:51:33 +0000 (12:51 +0200)]
NEWS: Updates in anticipation of the next release

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agogem_workarounds: intel_wa_registers is now prefixed with i915
Damien Lespiau [Sat, 30 Aug 2014 21:46:41 +0000 (22:46 +0100)]
gem_workarounds: intel_wa_registers is now prefixed with i915

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agorendercopy/gen8: Fix vertex buffer relocation
Chris Wilson [Mon, 1 Sep 2014 06:23:30 +0000 (07:23 +0100)]
rendercopy/gen8: Fix vertex buffer relocation

I was thrown by the routine calling itself gen7 when in it gen8 specific
and required 64bit relocation fixes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_concurrent_blit: Use the preallocated dummy bo for temporary copies
Chris Wilson [Sun, 31 Aug 2014 15:14:40 +0000 (16:14 +0100)]
igt/gem_concurrent_blit: Use the preallocated dummy bo for temporary copies

Use the existing allocation, saves having to make fresh allocations in
the innermost loop - trimming code and potential failure paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agobatch: Fix typo in BLIT_BATCH_BEGIN
Chris Wilson [Sat, 30 Aug 2014 13:48:36 +0000 (14:48 +0100)]
batch: Fix typo in BLIT_BATCH_BEGIN

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agobatch: Specify number of relocations to accommodate
Chris Wilson [Sat, 30 Aug 2014 10:44:51 +0000 (11:44 +0100)]
batch: Specify number of relocations to accommodate

Since relocations are variable size, depending upon generation, it is
easier to handle the resizing of the batch request inside the
BEGIN_BATCH macro. This still leaves us with having to resize commands
in a few places - which still need adaption for gen8+.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_seqno_wrap: Use debugfs singleton
Chris Wilson [Fri, 29 Aug 2014 20:25:14 +0000 (21:25 +0100)]
igt/gem_seqno_wrap: Use debugfs singleton

This has the added advantage of automounting debugfs for us.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoPrepare for 64bit relocation addresses
Chris Wilson [Fri, 29 Aug 2014 14:19:57 +0000 (15:19 +0100)]
Prepare for 64bit relocation addresses

This reveal that quite a few locations were writing relocation offsets
but only allowing for 32 bit addresses. To reveal such places in active
tests, we also now double check that we do not use more batch space than
declared.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_concurrent_blit: Apply some fence pressure as well
Chris Wilson [Fri, 29 Aug 2014 16:36:29 +0000 (17:36 +0100)]
igt/gem_concurrent_blit: Apply some fence pressure as well

As before, we also want to race against access through the fence
registers. This overlaps slightly with gem_set_tiling_vs_blt, but the
different access pattern should make it useful.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt: Tweak the igt_assert_cmpint macro
Chris Wilson [Fri, 29 Aug 2014 16:30:40 +0000 (17:30 +0100)]
igt: Tweak the igt_assert_cmpint macro

Minor tweak to embed the constant format string rather than passing it
to the vararg printf.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agolib/batchbuffer: Guard intel_blt_copy with even more asserts
Chris Wilson [Fri, 29 Aug 2014 18:28:34 +0000 (19:28 +0100)]
lib/batchbuffer: Guard intel_blt_copy with even more asserts

Assert that the source/destination bounds are within the pitch and size
of the associated bo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agolib/batchbuffer: Store the gen in a local variable
Chris Wilson [Fri, 29 Aug 2014 13:49:59 +0000 (14:49 +0100)]
lib/batchbuffer: Store the gen in a local variable

Reduce lookups and improve code clarity.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoscripts: Add capability to resume interrupted run-tests.sh session
Mike Mason [Tue, 26 Aug 2014 20:31:27 +0000 (13:31 -0700)]
scripts: Add capability to resume interrupted run-tests.sh session

Piglit provides a 'resume' feature that can restart an interrupted
test run at the point where it stopped. This patch adds that
feature to run_tests.sh.

Signed-off-by: Mike Mason <michael.w.mason@intel.com>
[Thomas: remove additional new line from end of file]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoigt/gem_concurrent_blit: Add ring race checks
Chris Wilson [Fri, 29 Aug 2014 12:11:37 +0000 (13:11 +0100)]
igt/gem_concurrent_blit: Add ring race checks

Similar to the previous commit, we also want to check that every
pipeline is serialised correctly. This extends the test to include
render copies as well as blits.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_concurrent_blit: Add GPU-vs-GPU checks
Chris Wilson [Fri, 29 Aug 2014 12:11:37 +0000 (13:11 +0100)]
igt/gem_concurrent_blit: Add GPU-vs-GPU checks

In future, we may allow reordering of GPU batches. This implements a
simple race detector by extending the current CPU-vs-GPU checks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt: Prettify igt_assert_eq() failure messages
Chris Wilson [Fri, 29 Aug 2014 12:11:40 +0000 (13:11 +0100)]
igt: Prettify igt_assert_eq() failure messages

This just improves the language about the exact failure to reduce
confusion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agoigt/gem_workarounds: igt to test workaround registers
Arun Siluvery [Tue, 26 Aug 2014 13:50:28 +0000 (14:50 +0100)]
igt/gem_workarounds: igt to test workaround registers

Some of the workarounds are lost followed by a gpu reset, suspend/resume;
this patch adds a test which compares register state before and after
the test scenario.

This test currently verifies only bdw workarounds.

v2: address patch cleanup comments (ThomasW)
 Add binary to ignore list and use igt_debugfs helper fns
 to read debugfs file and igt_info for printing debug info.

v2.1: address minor comments from Daniel
 use igt_main as opposed to normal main

Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
[danvet: Drop igt_exit, it's already in igt_main.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoshader-debugger: Force file/stdout IO as UTF-8
Rémi Cardona [Sun, 17 Aug 2014 23:09:15 +0000 (01:09 +0200)]
shader-debugger: Force file/stdout IO as UTF-8

Not all locales on linux are UTF-8, the most notable being the C locale.
Python will use the ASCII codec for stream IO in this case and will barf
on the Copyright sign at the top of .g4a files.

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=519434
Signed-off-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agolib: Use igt macros more
Daniel Vetter [Tue, 26 Aug 2014 13:26:34 +0000 (15:26 +0200)]
lib: Use igt macros more

Stragglers.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_* Use igt macros in igt libaries
Daniel Vetter [Tue, 26 Aug 2014 13:26:21 +0000 (15:26 +0200)]
lib/igt_* Use igt macros in igt libaries

Except in igt_core since that would lead to some hilarious recursions.

v2: Don't fflush any more, spotted by Chris.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/intel_* Use igt checks and macros
Daniel Vetter [Tue, 26 Aug 2014 13:13:06 +0000 (15:13 +0200)]
lib/intel_* Use igt checks and macros

Various stuff all over. Most done with the igt.cocci spatch, but
with a few fixups by hand. And add igt_core.h includes where needed.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/rendercopy*: Use igt_assert
Daniel Vetter [Tue, 26 Aug 2014 13:03:40 +0000 (15:03 +0200)]
lib/rendercopy*: Use igt_assert

9 years agokms_rotation_crc: Calling commit2 instead of legacy commit
Sonika Jindal [Tue, 19 Aug 2014 06:31:25 +0000 (12:01 +0530)]
kms_rotation_crc: Calling commit2 instead of legacy commit

Since planes are universal now, using commit2 so that drmModeSetPlane can be
called for primary plane as well instead of drmModeSetCrtc. drmModeSetPlane will
update the x,y,w,h for the plane.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoMerge two subtests for pm_rc6_residency IGT case
Wendy Wang [Tue, 26 Aug 2014 06:38:49 +0000 (14:38 +0800)]
Merge two subtests for pm_rc6_residency IGT case

Combine two subtests(rc6_residency_check and rc6_residency_counter)
 into one subtest(residency_accuracy)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/fb: Assert, instead of silently failing, when creating fbs
Damien Lespiau [Tue, 19 Aug 2014 10:55:22 +0000 (11:55 +0100)]
lib/fb: Assert, instead of silently failing, when creating fbs

We were either returning 0, or a negative value cast to an unsigned int
for errors and the clients of that API weren't exactly checking
anything.

We're in luck, we can take shortcuts in a testing library to just assert
when an expected error occurs.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agolib/fb: Replace straight igt_fail() by asserts with debug messages
Damien Lespiau [Tue, 19 Aug 2014 10:40:07 +0000 (11:40 +0100)]
lib/fb: Replace straight igt_fail() by asserts with debug messages

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agotestdisplay: Make the desired tiling mode an unsigned int
Damien Lespiau [Fri, 20 Jun 2014 11:02:09 +0000 (12:02 +0100)]
testdisplay: Make the desired tiling mode an unsigned int

We may be able to scan out more tiling formats in the future.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agopm_rpm: Adjust to the new igt_create*fb() API
Damien Lespiau [Mon, 18 Aug 2014 15:55:57 +0000 (16:55 +0100)]
pm_rpm: Adjust to the new igt_create*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agopm_lpsp: Adjust to the new igt_create.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:28:07 +0000 (15:28 +0100)]
pm_lpsp: Adjust to the new igt_create.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_sink_crc_basic: Adjust to the new igt_create.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:27:17 +0000 (15:27 +0100)]
kms_sink_crc_basic: Adjust to the new igt_create.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_setmode: Adjust to the igt_create.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:26:34 +0000 (15:26 +0100)]
kms_setmode: Adjust to the igt_create.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_render: Adjust to the new igt_create.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:25:39 +0000 (15:25 +0100)]
kms_render: Adjust to the new igt_create.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_psr_sink_crc: Adjust to the new igt_create.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:24:49 +0000 (15:24 +0100)]
kms_psr_sink_crc: Adjust to the new igt_create.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_plane: Adjust to the new igt_create.*fb() API
Damien Lespiau [Mon, 18 Aug 2014 15:50:07 +0000 (16:50 +0100)]
kms_plane: Adjust to the new igt_create.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_pipe_crc_basic: Adjust to the new igt_create.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:21:21 +0000 (15:21 +0100)]
kms_pipe_crc_basic: Adjust to the new igt_create.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_mmio_vs_cs_flip: Adjust to the new igt_create_.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:19:25 +0000 (15:19 +0100)]
kms_mmio_vs_cs_flip: Adjust to the new igt_create_.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_flip_tiling: Adjust to the new igt_create_.*fb() API
Damien Lespiau [Mon, 23 Jun 2014 14:18:00 +0000 (15:18 +0100)]
kms_flip_tiling: Adjust to the new igt_create_.*fb() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_flip: Adjust to the new igt_create_fb*() API
Damien Lespiau [Mon, 23 Jun 2014 14:16:54 +0000 (15:16 +0100)]
kms_flip: Adjust to the new igt_create_fb*() API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_fence_pin_leak: Use I915_TILING_X to create fbs
Damien Lespiau [Mon, 23 Jun 2014 14:13:46 +0000 (15:13 +0100)]
kms_fence_pin_leak: Use I915_TILING_X to create fbs

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_fbc_crc: Use I915_TILING_X to create fbs
Damien Lespiau [Mon, 23 Jun 2014 14:12:48 +0000 (15:12 +0100)]
kms_fbc_crc: Use I915_TILING_X to create fbs

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agokms_cursor_crc: Use I915_TILING_NONE to create fbs
Damien Lespiau [Mon, 23 Jun 2014 14:11:12 +0000 (15:11 +0100)]
kms_cursor_crc: Use I915_TILING_NONE to create fbs

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agolib: Change the fb creation functions to take fully qualified tiling formats
Damien Lespiau [Mon, 23 Jun 2014 13:53:24 +0000 (14:53 +0100)]
lib: Change the fb creation functions to take fully qualified tiling formats

In the future, we'll need more than X tiling here. So give a full enum
instead of bool meaning X-tiled.

It's fine to do this change without updating the users just yet as
'true' happens to be I915_TILING_X.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agotests: Fix seg fault when gem_mmap is run without specifying a subtest
Mike Mason [Mon, 18 Aug 2014 17:43:49 +0000 (10:43 -0700)]
tests: Fix seg fault when gem_mmap is run without specifying a subtest

gem_mmap seg faults when all tests are run together. This occurs because
the new-object subtest closes the gem object, but short-mmap assumes
it still exists. Thus gem_mmap__cpu() returns nil for addr and memset()
seg faults. This patch makes new-object and short-mmap create and
close their own gem objects.

Signed-off-by: Mike Mason <michael.w.mason@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoscripts: Allow multiple -t and -x regular expressions for run-tests.sh
Mike Mason [Mon, 18 Aug 2014 17:43:09 +0000 (10:43 -0700)]
scripts: Allow multiple -t and -x regular expressions for run-tests.sh

Piglit allows multiple -t and -x regular expressions to be
given on the command line. This patch enables run-tests.sh to
support that as well.

Signed-off-by: Mike Mason <michael.w.mason@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agointel-gpu-tools: skip kms_flip_event_leak unless we have cairo
Tim Gore [Mon, 18 Aug 2014 13:56:43 +0000 (14:56 +0100)]
intel-gpu-tools: skip kms_flip_event_leak unless we have cairo

kms_flip_event_leak depends on cairo, so add it to the
list of tests to skip (in Android.mk) if ANDROID_HAS_CAIRO
is not set to 1.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agoAdd kms_flip_event_leak to .gitignore
Mike Mason [Fri, 15 Aug 2014 19:14:12 +0000 (19:14 +0000)]
Add kms_flip_event_leak to .gitignore

This patch just adds kms_flip_event_leak to tests/.gitignore.

Signed-off-by: Mike Mason <michael.w.mason@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agotests: check plane rotation is reset after the VT mode is restored
Thomas Wood [Thu, 14 Aug 2014 13:06:37 +0000 (14:06 +0100)]
tests: check plane rotation is reset after the VT mode is restored

Make sure the rotation is reset after the VT mode is restored by
collecting the unrotated CRC and comparing with the CRC value after VT mode
has been restored. The CRC is used to ensure the hardware state is checked,
rather than any software state.

References: https://bugs.freedesktop.org/show_bug.cgi?id=82236
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib: add igt_restore_vt_mode
Thomas Wood [Thu, 14 Aug 2014 12:59:02 +0000 (13:59 +0100)]
lib: add igt_restore_vt_mode

Add a function to restore the previous VT mode after
igt_set_vt_graphics_mode is called.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
9 years agolib/igt_kms: doc for the remaining kmstest_ functions
Daniel Vetter [Tue, 12 Aug 2014 10:10:20 +0000 (12:10 +0200)]
lib/igt_kms: doc for the remaining kmstest_ functions

Plus a bit an overview section explaining the split in the library - a
few people (everyone except me it seems) didn't really understand it.

v2: Fix typo'ed s/kmstest_set_vt_graphics_mode/kmstest_get_pipe_from_crtc_id/
in a doc comment spotted by Imre.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_kms: Simplify return value of kmstest_get_connector_config
Daniel Vetter [Tue, 12 Aug 2014 09:57:32 +0000 (11:57 +0200)]
lib/igt_kms: Simplify return value of kmstest_get_connector_config

A plain bool is enough.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_kms: Simplify return value of kmstest_get_connector_default_mode
Daniel Vetter [Tue, 12 Aug 2014 09:56:41 +0000 (11:56 +0200)]
lib/igt_kms: Simplify return value of kmstest_get_connector_default_mode

A plain bool is good enough, no need for fancy negative error values.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_kms: Shuffle kmtests_ functions
Daniel Vetter [Tue, 12 Aug 2014 09:31:44 +0000 (11:31 +0200)]
lib/igt_kms: Shuffle kmtests_ functions

Group them a bit both in the header and .c file, and make sure they
appear in the same order in both.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_kms: set_vt_graphics_mode is a low-level helper
Daniel Vetter [Tue, 12 Aug 2014 09:23:09 +0000 (11:23 +0200)]
lib/igt_kms: set_vt_graphics_mode is a low-level helper

So give it a kmstest_ prefix and shuffle it around a bit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_kms: doc for type2str functions
Daniel Vetter [Tue, 12 Aug 2014 09:13:03 +0000 (11:13 +0200)]
lib/igt_kms: doc for type2str functions

Also shuffle things around a bit to make sure the order in the header
matches the order in the .c file.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_kms: Clean up the other _name functions/macros
Daniel Vetter [Tue, 12 Aug 2014 09:04:49 +0000 (11:04 +0200)]
lib/igt_kms: Clean up the other _name functions/macros

And remove sprite_name, redundant and won't work due to lack of
dev_priv.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agolib/igt_kms: Unify pipe name helpers
Daniel Vetter [Tue, 12 Aug 2014 09:00:37 +0000 (11:00 +0200)]
lib/igt_kms: Unify pipe name helpers

And add api doc while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agotests/kms_cursor_crc: Align opening {
Daniel Vetter [Tue, 12 Aug 2014 08:32:41 +0000 (10:32 +0200)]
tests/kms_cursor_crc: Align opening {

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoigt/gem_cpu_reloc: Update the memory requirements
Chris Wilson [Tue, 12 Aug 2014 14:29:25 +0000 (15:29 +0100)]
igt/gem_cpu_reloc: Update the memory requirements

Use intel_check_memory() for accuracy and beautification

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
9 years agotests: Add kms_flip_event_leak test
Ville Syrjälä [Tue, 5 Aug 2014 20:06:04 +0000 (23:06 +0300)]
tests: Add kms_flip_event_leak test

kms_flip_event_leak will issue a page flip and close the file
descriptor before the flip has finished. This may cause the kernel
to leak the page flip event. The test itself won't actually fail but
if the kernel notices the leak and WARNs piglit will report a failure.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
9 years agotests/pm_rpm: refactor the modesetting code
Paulo Zanoni [Fri, 8 Aug 2014 14:24:34 +0000 (11:24 -0300)]
tests/pm_rpm: refactor the modesetting code

Refactor the code so the params for the modesets are always stored and
don't have to be recomputed every time. With this, we can get rid of
our FB caching structures, and we now also allow the subtests that do
special modesets to reuse the parameters used on the default modesets,
just changing whatever they want.

The biggest win here is that the test case subfunctions get smaller
and simpler to read and write.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agotests/pm_rpm: add disable_or_dpms_all_screens()
Paulo Zanoni [Thu, 7 Aug 2014 19:36:04 +0000 (16:36 -0300)]
tests/pm_rpm: add disable_or_dpms_all_screens()

And its and_wait() version. The goal is to extract common code
patterns into functions/macros, so the code for the test cases gets
easier to read and write.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agotests/pm_rpm: add macros to disable/enable screens and wait
Paulo Zanoni [Fri, 8 Aug 2014 14:12:42 +0000 (11:12 -0300)]
tests/pm_rpm: add macros to disable/enable screens and wait

This should make the test case functions better to read and write.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agotests/pm_rpm: add wait_for_suspended() calls to test_one_plane
Paulo Zanoni [Thu, 7 Aug 2014 19:03:08 +0000 (16:03 -0300)]
tests/pm_rpm: add wait_for_suspended() calls to test_one_plane

Make sure we do all operations while really runtime suspended, so we
can actually test things.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agotests/pm_rpm: add subtests for fences
Paulo Zanoni [Wed, 6 Aug 2014 21:50:57 +0000 (18:50 -0300)]
tests/pm_rpm: add subtests for fences

Daniel thought fences were not surviving runtime PM on DPMS, so we
wrote this test to check. The good news is that the test passed, so
there's no need for a Kernel patch, at least on the Kernel I tested.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agoigt_kms: add kmstest_unset_all_crtcs()
Paulo Zanoni [Wed, 6 Aug 2014 17:31:53 +0000 (14:31 -0300)]
igt_kms: add kmstest_unset_all_crtcs()

Both pm_rpm.c and pm_lpsp.c call it "disable_all_screens", but let's
give it a name that better describes what the implementation does.

v2: Rename to kmstest_unset_all_crtcs (Daniel).

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agotests/pm_rpm: use kmstest_get_property()
Paulo Zanoni [Wed, 6 Aug 2014 15:33:48 +0000 (12:33 -0300)]
tests/pm_rpm: use kmstest_get_property()

So we can reduce the code size.

v2: Rebase after the rename to kmstest_get_property.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agoigt_kms: document and export kmstest_get_property()
Paulo Zanoni [Wed, 6 Aug 2014 15:14:56 +0000 (12:14 -0300)]
igt_kms: document and export kmstest_get_property()

So we can use it on pm_rpm.c.

v2: Rename to kmstest_get_property (Daniel)

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
9 years agoigt_kms: optionally return the property from get_property
Paulo Zanoni [Wed, 6 Aug 2014 15:03:57 +0000 (12:03 -0300)]
igt_kms: optionally return the property from get_property

So we can use this function on places that also need the property
pointer, without having to call drmModeGetProperty() again with the
returned id.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>