platform/upstream/intel-gpu-tools.git
10 years agoigt/gem_evict_alignment: Fix the memory limits checking
Chris Wilson [Fri, 6 Jun 2014 07:43:08 +0000 (08:43 +0100)]
igt/gem_evict_alignment: Fix the memory limits checking

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75138
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoigt/gem_evict_alignment: Remove obsolete skip on gen8+
Chris Wilson [Fri, 6 Jun 2014 07:40:36 +0000 (08:40 +0100)]
igt/gem_evict_alignment: Remove obsolete skip on gen8+

If the BLT commands, aren't fixed yet, they should be. ASAP.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoAdd rc6_residency_counter subtest
Wendy Wang [Thu, 5 Jun 2014 02:27:42 +0000 (10:27 +0800)]
Add rc6_residency_counter subtest

Move rc6_residency_check to subtest, add new rc6_residency_counter subtest
for pm_rc6_residency IGT case.

Test results run on platforms show as below:
On HSW
---------------------------------------
[root@x-hswu opt]# ./pm_rc6_residency
IGT-Version: 1.6-g35b31df (x86_64) (Linux: 3.15.0-rc3_drm-intel-nightly_0791a3_20140520+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
This machine entry  rc6 status.
The residency counter : 0.999667
Subtest rc6-residency-counter: SUCCESS

On IVB
----------------------------------------
[root@IVB tests]# ./pm_rc6_residency
IGT-Version: 1.6-g35b31df (x86_64) (Linux: 3.13.6_20140318+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine entry  rc6p status.
The residency counter : 0.997000
Subtest rc6-residency-counter: SUCCESS

On BYT
----------------------------------------
root@x-byt:/opt# ./pm_rc6_residency
IGT-Version: 1.6-g0d39021 (x86_64) (Linux: 3.14.0_kcloud_ceabbb_20140521+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 1.144333
Test assertion failure function rc6_residency_counter, file pm_rc6_residency.c:131:
Last errno: 0, Success
Failed assertion: counter_result <=1
Debug files must be wrong,
Subtest rc6-residency-counter: FAIL

On BDW
---------------------------------------
[root@x-bdw01 opt]# ./pm_rc6_residency
IGT-Version: 1.6-g0d39021 (x86_64) (Linux: 3.15.0-rc5_drm-intel-nightly_367653_20140521+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 0.994333
This machine entry rc6 state.
Subtest rc6-residency-counter: SUCCESS

Signed-off-by: Liu, Lei A <lei.a.liu@intel.com>
Signed-off-by: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
10 years agolib: Add debug to memory limits checks
Chris Wilson [Thu, 5 Jun 2014 12:33:25 +0000 (13:33 +0100)]
lib: Add debug to memory limits checks

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoigt/gem_evict_everything: Compute number of surfaces to saturate the aperture
Chris Wilson [Thu, 5 Jun 2014 12:19:39 +0000 (13:19 +0100)]
igt/gem_evict_everything: Compute number of surfaces to saturate the aperture

The goal is to only fill the aperture, not all of memory, so fine-tune
the computed number of surfaces, hopefully avoiding an integer overflow
in the process.

References: https://bugs.freedesktop.org/show_bug.cgi?id=79573
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agolib/igt_debugfs: Fix spelling docs
Daniel Vetter [Thu, 5 Jun 2014 08:28:09 +0000 (10:28 +0200)]
lib/igt_debugfs: Fix spelling docs

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agorendercopy/gen8: Also emit 3DSTATE_WM_DEPTH_STENCIL.
Kenneth Graunke [Tue, 3 Jun 2014 21:52:30 +0000 (14:52 -0700)]
rendercopy/gen8: Also emit 3DSTATE_WM_DEPTH_STENCIL.

rendercopy was failing to emit 3DSTATE_WM_DEPTH_STENCIL, which is a new
packet on Broadwell.  Mesa emits this packet.

This appears to fix various tests on a fresh boot, when Mesa has never
run.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78890
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78891
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78935
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78936
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78937
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78938
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Tested-by: Guo Jinxian <jinxianx.guo@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
10 years agotests/kms_flip: Move EBUSY to a new busy-flip subtest
Ville Syrjälä [Wed, 28 May 2014 17:05:59 +0000 (20:05 +0300)]
tests/kms_flip: Move EBUSY to a new busy-flip subtest

The EBUSY checking is very fragile currently in case there's any kind
extra delay in the test loop. At least the flip-vs-rmfb fails reliably
on my IVB.

So to make the test less fragile remove the EBUSY check from all the
current flip tests, and instead add a specific busy-flip test. To
better guarantee that we get the EBUSY add a blocking vblank wait just
before we issue the first flip. This maximizes the time we have to
submit two flips during one frame.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agointel-gpu-tools: move kms_fence_pin_leak to single test list
Tim Gore [Wed, 4 Jun 2014 08:32:54 +0000 (09:32 +0100)]
intel-gpu-tools: move kms_fence_pin_leak to single test list

In Makefile.sources, kms_fence_pin_leak was in the "Multi" test list,
ie tests with subtests, whereas it is actually simple/single test.
This was confusing the Android script for enumerating tests.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoquick_dump: increase reg name column width
Imre Deak [Tue, 3 Jun 2014 13:52:48 +0000 (16:52 +0300)]
quick_dump: increase reg name column width

Needed by the new long audio register names.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: vlv: remove redundant base file specifications
Imre Deak [Tue, 3 Jun 2014 13:04:47 +0000 (16:04 +0300)]
quick_dump: vlv: remove redundant base file specifications

The registers in these files are included in the dumps for all platforms
by default, so no need to specify them explicitly.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: vlv: move flisdsi register group to its logical place
Imre Deak [Tue, 3 Jun 2014 12:44:27 +0000 (15:44 +0300)]
quick_dump: vlv: move flisdsi register group to its logical place

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: vlv: add missing dpio phy registers
Imre Deak [Tue, 3 Jun 2014 12:55:11 +0000 (15:55 +0300)]
quick_dump: vlv: add missing dpio phy registers

Also move the phy register block to its logical place.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: vlv: add missing display registers
Imre Deak [Tue, 3 Jun 2014 11:26:30 +0000 (14:26 +0300)]
quick_dump: vlv: add missing display registers

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: chv: add misc gen7 GT registers
Imre Deak [Tue, 3 Jun 2014 13:11:52 +0000 (16:11 +0300)]
quick_dump: chv: add misc gen7 GT registers

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: chv: add dsi (mipi) registers
Imre Deak [Mon, 2 Jun 2014 23:02:24 +0000 (02:02 +0300)]
quick_dump: chv: add dsi (mipi) registers

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: vlv: clean up dsi (mipi) registers
Imre Deak [Mon, 2 Jun 2014 22:59:45 +0000 (01:59 +0300)]
quick_dump: vlv: clean up dsi (mipi) registers

Split out the base offset into the third argument and rename MIPIB to
MIPIC to match the display cluster register HAS.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: chv: add full dpio phy dumps
Ville Syrjälä [Fri, 21 Mar 2014 17:07:43 +0000 (10:07 -0700)]
quick_dump: chv: add full dpio phy dumps

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
10 years agoquick_dump: chv: add display registers
Ville Syrjälä [Fri, 21 Mar 2014 08:51:29 +0000 (01:51 -0700)]
quick_dump: chv: add display registers

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[imre: add audio regs]
Reviewed-by: Imre Deak <imre.deak@intel.com>
10 years agoquick_dump: chv: add detection support
Ville Syrjälä [Wed, 28 May 2014 15:45:27 +0000 (18:45 +0300)]
quick_dump: chv: add detection support

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
10 years agoquick_dump: add support for accessing the dpio phy 2 registers
Ville Syrjälä [Wed, 28 May 2014 15:23:07 +0000 (18:23 +0300)]
quick_dump: add support for accessing the dpio phy 2 registers

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
10 years agolib/intel_iosf: add second phy support
Ville Syrjälä [Wed, 28 May 2014 15:26:39 +0000 (18:26 +0300)]
lib/intel_iosf: add second phy support

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
10 years agoquick_dump: allow passing display base as the third argument
Imre Deak [Mon, 2 Jun 2014 12:48:27 +0000 (15:48 +0300)]
quick_dump: allow passing display base as the third argument

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
10 years agoquick_dump: pass register offsets as int
Ville Syrjälä [Wed, 28 May 2014 15:32:39 +0000 (18:32 +0300)]
quick_dump: pass register offsets as int

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[imre: fix s/regi/intreg/ typo]
Reviewed-by: Imre Deak <imre.deak@intel.com>
10 years agoquick_dump: fix typo breaking dpio reg dumps
Imre Deak [Tue, 3 Jun 2014 13:44:41 +0000 (16:44 +0300)]
quick_dump: fix typo breaking dpio reg dumps

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoquick_dump: make autodetect the default option
Imre Deak [Tue, 3 Jun 2014 13:03:50 +0000 (16:03 +0300)]
quick_dump: make autodetect the default option

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Very-much-wanted-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: remove testdisplay.h from kms_render.c
Tim Gore [Tue, 3 Jun 2014 14:18:31 +0000 (15:18 +0100)]
intel-gpu-tools: remove testdisplay.h from kms_render.c

kms_render.c included testdisplay.h but did not need it.
This was preventing it from building on Android due to the
lack of a Glib port. So I have removed this #include and
changed Android.mk so that kms_render is built if we have
cairo.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: re-enable gem_exec_params on Android
Tim Gore [Tue, 3 Jun 2014 14:05:56 +0000 (15:05 +0100)]
intel-gpu-tools: re-enable gem_exec_params on Android

The missing macro that was preventing the gem_exec_params
test from building is now in i915_drm.h, in ABT at least,
and this test can now build. So I have removed it from the
skip list in Android.mk

For Gmin I have added a patch for i915_drm.h to the Wiki

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotools/null_state_gen: generate null render state
Mika Kuoppala [Thu, 10 Apr 2014 12:15:13 +0000 (15:15 +0300)]
tools/null_state_gen: generate null render state

Generate valid (null) render state for each gen. Output
it as a c source file with batch and relocations.

v2: noinst and vs_start fixed for BDW GT3 (Damien Lespiau)

Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agoigt/gem_evict_everything: Move assertion
Chris Wilson [Tue, 3 Jun 2014 06:31:49 +0000 (07:31 +0100)]
igt/gem_evict_everything: Move assertion

If we move the assertion from out of the callback, we can get a much
more useful error message.

References: https://bugs.freedesktop.org/show_bug.cgi?id=79573
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agokms_cursor_crc: Test cursor size change ioctl
Antti Koskipaa [Mon, 2 Jun 2014 10:43:18 +0000 (13:43 +0300)]
kms_cursor_crc: Test cursor size change ioctl

Now that we support cursor changes other than 64x64, a bug was found
where the size change was only applied at cursor enable time, rather
than at every update. Add a testcase for that.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Fix spelling a bit
Daniel Vetter [Wed, 28 May 2014 14:19:16 +0000 (16:19 +0200)]
NEWS: Fix spelling a bit

10 years agoNEWS: Don't forget the runtime pm helpers!
Daniel Vetter [Wed, 28 May 2014 14:05:14 +0000 (16:05 +0200)]
NEWS: Don't forget the runtime pm helpers!

10 years agoNEWS: Updates ...
Daniel Vetter [Wed, 28 May 2014 14:02:08 +0000 (16:02 +0200)]
NEWS: Updates ...

10 years agobuild: Don't fail if SWIG isn't found
Damien Lespiau [Wed, 28 May 2014 13:18:34 +0000 (14:18 +0100)]
build: Don't fail if SWIG isn't found

People from distros have reported that packaging the newer versions is
more difficult because we now depend on SWIG. We don't have to, it's
needed for the python dumper and is an optional build dependency.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoFactor in kernel object overhead when checking available memory for tests
Chris Wilson [Wed, 28 May 2014 08:01:56 +0000 (09:01 +0100)]
Factor in kernel object overhead when checking available memory for tests

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 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>
10 years agointel-gpu-tools: Skip kms_mmio_vs_cs_flip if no cairo
Tim Gore [Tue, 27 May 2014 15:45:24 +0000 (16:45 +0100)]
intel-gpu-tools: Skip kms_mmio_vs_cs_flip if no cairo

The kms_mmio_vs_cs_flip test uses igt_kms.c which in turn
uses cairo. So in Android.mk add this test to the skip list
if we dont have cairo

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_pipe_crc_basic: Add gpu hang tests
Daniel Vetter [Thu, 22 May 2014 15:29:48 +0000 (17:29 +0200)]
tests/kms_pipe_crc_basic: Add gpu hang tests

Currently pipe CRC support is broken after gpu hangs. This tests for
this bug.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_pipe_crc_basic: Add suspend tests
Daniel Vetter [Thu, 22 May 2014 14:27:44 +0000 (16:27 +0200)]
tests/kms_pipe_crc_basic: Add suspend tests

Currently broken ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/drv_hangman: Add subtest for error state capture/dump
Mika Kuoppala [Tue, 20 May 2014 08:25:48 +0000 (11:25 +0300)]
tests/drv_hangman: Add subtest for error state capture/dump

Guarantees that error capture works at a very basic level.

v2: Also check that the ring object contains a reloc with MI_BB_START
for the presumed batch object's address.

v3: Chris review comments:
 - Move variables to local scope.
 - Do not assume there is only one request.
 - Some gen encode flags into the BB start address.
 Also, use igt_set/get_stop_rings as suggested by Mika Kuoppala.

v4: Make as a subtest of drv_hangman.
v5: Rebase

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> <v4>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agotests/drv_hangman: Convert test from shell script to c
Mika Kuoppala [Mon, 19 May 2014 14:42:21 +0000 (17:42 +0300)]
tests/drv_hangman: Convert test from shell script to c

Mixing script and standlone tests didn't mix well with the
strict i915_ring_stop flags handling. Also squash drv_missed_irq_hang
to the new test.

v2: - Remove missed irq test (Daniel Vetter)
    - gitignore fixed (Oscar Mateo)
    - fix check_other_clients to handle dangling fd's

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78322
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Oscar Mateo <oscar.mateo@intel.com> <v1>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agoigt/gem_userptr_blits: Fix up last minute API changes
Chris Wilson [Thu, 22 May 2014 09:20:33 +0000 (10:20 +0100)]
igt/gem_userptr_blits: Fix up last minute API changes

When the patch was merged, the ioctl numbers had to be adjusted to leave
no holes. Also there was a final piece of munging of the API to
downgrade unsynced userptr for export over dma-buf.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests/kms_mmio_vs_cs_flip: Add a test case to exercise mmio vs. CS flip races
Ville Syrjälä [Mon, 14 Apr 2014 13:14:40 +0000 (16:14 +0300)]
tests/kms_mmio_vs_cs_flip: Add a test case to exercise mmio vs. CS flip races

kms_mmio_vs_cs_flip has two subtests:
- setplane_vs_cs_flip tests the interaction between
  fullscreen sprites and CS flips
- setcrtc_vs_cs_flip tests the interaction between
  primary plane panning and CS flips

v2: Skip sprite test when there are no sprites
    Reduce busy_bo to 64MB (now works on my gen2)
    Handle pipe vs. port incompatibility
v3: Handle missing auto pipe crc

Reviewed-by Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_sink_crc_basic: Use igt_assert
Daniel Vetter [Thu, 22 May 2014 07:34:36 +0000 (09:34 +0200)]
tests/kms_sink_crc_basic: Use igt_assert

Less verbose code makes for clearer test logic.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_sink_crc_basic: skip properly
Daniel Vetter [Thu, 22 May 2014 07:32:22 +0000 (09:32 +0200)]
tests/kms_sink_crc_basic: skip properly

Not running the test is not failing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoRevert "Revert "store_dw_loop: make loops smaller""
Daniel Vetter [Thu, 22 May 2014 07:07:45 +0000 (09:07 +0200)]
Revert "Revert "store_dw_loop: make loops smaller""

This reverts commit 3005ac3ee8d7aede73a3e63d2068a6074156ebe5.

QA has done the testing we've wanted.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_flip: various improvements
Daniel Vetter [Tue, 20 May 2014 13:45:31 +0000 (15:45 +0200)]
tests/kms_flip: various improvements

- Some debug logging for the ts continuity checks.
- Add a plain vblank-vs-suspend test where kms_flip doesn't switch off
  the displays first.
- Ensure that we do at least 2 rounds, the suspend tests bailed out
  after 1 round and so didn't test anything.
- Frob the testnames a bit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_flip: Add vblank vs. gpu hang testcase
Daniel Vetter [Tue, 20 May 2014 12:42:12 +0000 (14:42 +0200)]
tests/kms_flip: Add vblank vs. gpu hang testcase

Currently broken :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoassembler: distinguish the channel of .z from the condition of .z
Xiang, Haihao [Tue, 25 Mar 2014 05:55:14 +0000 (13:55 +0800)]
assembler: distinguish the channel of .z from the condition of .z

The scratch patch only works for generic register

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75631
Tested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agoassembler: switch the order of swizzle and regtype to match the BNF of the assembly
Xiang, Haihao [Tue, 25 Mar 2014 05:41:25 +0000 (13:41 +0800)]
assembler: switch the order of swizzle and regtype to match the BNF of the assembly

Fortunately our existing source didn't use swizzle.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75631
Tested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agoigt/quickdump: vlv: dump FLISDSI regs too
Imre Deak [Sun, 18 May 2014 20:37:56 +0000 (23:37 +0300)]
igt/quickdump: vlv: dump FLISDSI regs too

Signed-off-by: Imre Deak <imre.deak@intel.com>
10 years agoigt/intel_iosf: rename IOSF sideband opcodes according to the spec
Imre Deak [Mon, 19 May 2014 10:26:35 +0000 (13:26 +0300)]
igt/intel_iosf: rename IOSF sideband opcodes according to the spec

These opcodes are not specific for an endpoint, but are the same for all
endpoints. So rename them accordingly, using the name the VLV2 sideband
HAS uses. Also move the macros to the .c file, since they aren't used
anywhere else.

Signed-off-by: Imre Deak <imre.deak@intel.com>
10 years agoRevert "store_dw_loop: make loops smaller"
Daniel Vetter [Mon, 19 May 2014 16:11:34 +0000 (18:11 +0200)]
Revert "store_dw_loop: make loops smaller"

This reverts commit f00efff326610fdba92dbc91d951790a3320052e.

This is a temporary revert since I want QA to first test with the
original testcase whether it got faster again. This is to test the
effects of

commit 227f782e4667fc622810bce8be8ccdeee45f89c2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu May 15 10:41:42 2014 +0100

    drm/i915: Retire requests before creating a new one

We should revert this revert again as soon as QA has completed
testing.

References: https://bugs.freedesktop.org/show_bug.cgi?id=78024
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agostore_dw_loop: make loops smaller
Jesse Barnes [Mon, 19 May 2014 15:44:12 +0000 (08:44 -0700)]
store_dw_loop: make loops smaller

These tests are really for catching TLB or GTT mapping failures due to
bad programming in the kernel driver.  We've never needed more than a
few pages worth of data write to actually see those.

10 years agoigt/gem_bad_reloc: Refine for limited kernel w/a
Chris Wilson [Mon, 19 May 2014 06:26:12 +0000 (07:26 +0100)]
igt/gem_bad_reloc: Refine for limited kernel w/a

One proposed solution only fixes up the SNA behaviour, so reduce the
test case to probe only that particular pathology.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests/kms_sink_crc_basic: Put into righ Makefile target
Daniel Vetter [Fri, 16 May 2014 21:36:25 +0000 (23:36 +0200)]
tests/kms_sink_crc_basic: Put into righ Makefile target

If it's a simple test, it needs to be in the simple lists. Tests with
subtests go into the _M tests.

Without that test enumeration is all screwed up.

Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_flip: test a fb backed by a bo too big/small for its own good
Oscar Mateo [Fri, 16 May 2014 13:07:12 +0000 (14:07 +0100)]
tests/kms_flip: test a fb backed by a bo too big/small for its own good

This is a "review by igt test" for a bug located in
i915_gem_object_pin_to_display_plane and fixed by:

commit 392013bdd4b6128795e33c84bd6d6d3fd66ff0a3
Author: Oscar Mateo <oscar.mateo@intel.com>
Date:   Fri May 16 11:23:12 2014 +0100

    drm/i915: Gracefully handle obj not bound to GGTT in is_pin_display

    Otherwise, we do a NULL pointer dereference.

    I've seen this happen while handling an error in
    i915_gem_object_pin_to_display_plane():

    If i915_gem_object_set_cache_level() fails, we call is_pin_display()
    to handle the error. At this point, the object is still not pinned
    to GGTT and maybe not even bound, so we have to check before we
    dereference its GGTT vma.

    v2: Chris Wilson says restoring the old value is easier, but that
    is_pin_display is useful as a theory of operation. Take the solomonic
    decision: at least this way is_pin_display is a little more robust
    (until Chris can kill it off).

v2: Avoid code duplication by using igt_create_fb_with_bo_size() as
requested by Ville Syrjälä (original author of the "too big" test idea).

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib/igt_fb: igt_create_fb_with_bo_size
Oscar Mateo [Fri, 16 May 2014 13:07:11 +0000 (14:07 +0100)]
lib/igt_fb: igt_create_fb_with_bo_size

Useful for testing bigger/smaller fb-wrapped buffer objects.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_sink_crc_basic: Basic test to verify Sink CRC debugfs.
Rodrigo Vivi [Fri, 16 May 2014 00:13:57 +0000 (20:13 -0400)]
tests/kms_sink_crc_basic: Basic test to verify Sink CRC debugfs.

v2: rebase after a long time.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8 -> pm_rpm rename
Daniel Vetter [Fri, 16 May 2014 08:33:28 +0000 (10:33 +0200)]
tests/pm_pc8 -> pm_rpm rename

Plus naming convention for runtime pm tests to have "rpm" somewhere in
their tests. Note that all the pc8-specific tests (for e.g. residency
or similar) already have pc8 in their subtest names, so we don't lose
any information here.

Cc: "Yang, Guang A" <guang.a.yang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: Use igt_assert_cmpint
Daniel Vetter [Thu, 15 May 2014 15:02:39 +0000 (17:02 +0200)]
tests/pm_pc8: Use igt_assert_cmpint

More pretty!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_bad_reloc: Adding missing include.
Rodrigo Vivi [Thu, 15 May 2014 18:06:51 +0000 (14:06 -0400)]
tests/gem_bad_reloc: Adding missing include.

It was breaking compilation.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
10 years agotests/kms_render: don't loop through modes
Daniel Vetter [Thu, 15 May 2014 14:35:32 +0000 (16:35 +0200)]
tests/kms_render: don't loop through modes

We kinda have testdisplay for this ... and doing this tends to take
forever.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77709
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reg_read: Fix errno check
Daniel Vetter [Thu, 15 May 2014 08:03:11 +0000 (10:03 +0200)]
tests/gem_reg_read: Fix errno check

So I accidentally fixed a check when converting to the new macros and
the kernel never returned -ENOENT for invalid regs. Adjust the test.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_flip: nasty power management tests
Daniel Vetter [Wed, 14 May 2014 15:59:02 +0000 (17:59 +0200)]
tests/kms_flip: nasty power management tests

These check whether everything is still ok wrt vblank handling after
runtime pm and system suspend-resume.

In addition to the usual checks they also ensure that the vblank frame
counter isn't totally ridiculous, something Keith complained about
aeons ago. With Ville's drm_vblank_on/off rework this should now be
fixed and solid.

v2:
- Ignore seq_step, vblanks completely immediately when the crtc goes off
- Only run system suspend/resume tests once.

Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib/igt_aux: Extract runtime pm helpers from pm_pc8
Daniel Vetter [Wed, 14 May 2014 14:10:50 +0000 (16:10 +0200)]
lib/igt_aux: Extract runtime pm helpers from pm_pc8

I want to use them elsewhere ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: Skip kms_fence_pin_leak if no cairo
Tim Gore [Thu, 15 May 2014 09:25:48 +0000 (10:25 +0100)]
intel-gpu-tools: Skip kms_fence_pin_leak if no cairo

The kms_fence_pin_leak test uses igt_kms.c which in turn
uses cairo. So in Android.mk add this test to the skip list
if we dont have cairo

Issue: VIZ-3894
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoigt/gem_ringfill: Only check for rendercopy when testing render ring
Chris Wilson [Thu, 15 May 2014 12:37:03 +0000 (13:37 +0100)]
igt/gem_ringfill: Only check for rendercopy when testing render ring

Overzealous test runner ftl.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78591
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoigt/gem_bad_reloc: Restrict negative reloc tests to IVB+
Chris Wilson [Thu, 15 May 2014 12:23:44 +0000 (13:23 +0100)]
igt/gem_bad_reloc: Restrict negative reloc tests to IVB+

The bug doesn't seem to occur on SNB, so we can skip the workaround and
hence we do not expect the kernel to prevent invalid relocated offsets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agogem_exec_lut_handle: Do a warm up pass before timing
Chris Wilson [Thu, 15 May 2014 12:10:54 +0000 (13:10 +0100)]
gem_exec_lut_handle: Do a warm up pass before timing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agogem_bad_reloc: Add subtest for LUT-based execbuffers
Chris Wilson [Thu, 15 May 2014 12:10:21 +0000 (13:10 +0100)]
gem_bad_reloc: Add subtest for LUT-based execbuffers

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoAdd gem_bad_reloc
Chris Wilson [Thu, 15 May 2014 07:43:11 +0000 (08:43 +0100)]
Add gem_bad_reloc

This test feeds a batch containing self-references into the kernel and
checks that the relocation offsets remain as valid GTT addresses. This
is to exercise SNA passing in negative relocation deltas which can hang
the GPU if they wrap around.

References: https://bugs.freedesktop.org/show_bug.cgi?id=78533
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests/kms_flip: Fix vblank ts check
Daniel Vetter [Wed, 14 May 2014 15:59:25 +0000 (17:59 +0200)]
tests/kms_flip: Fix vblank ts check

Oops, fumbled that in the conversion.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_fence_pin_leak: Exercise full ppgtt fence pin_count leak in the kernel
Ville Syrjälä [Mon, 12 May 2014 11:18:42 +0000 (14:18 +0300)]
tests/kms_fence_pin_leak: Exercise full ppgtt fence pin_count leak in the kernel

The kernel full ppgtt support has a bug where it can drop a pinned
fence to the floor, hence we leak the pin_count as the subsequent
fence unpin becomes a nop. We can trigger it easily by unbinding a
buffer from a ppgtt address space while the buffer is simultaneosly
being used for scanout.

Make the kernel leak the fence pin_count and trick it into picking
a new fence register for the next scanout buffer. Looping like
this for a while we leak the pin_count for all fence registers after
which the kernel can no longer find a new fence register when it needs
one. As a result we get back a SIGBUS from the GTT mmap access.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib/igt_core: Fixup docs with symbolic exit codes
Daniel Vetter [Wed, 14 May 2014 13:33:27 +0000 (15:33 +0200)]
lib/igt_core: Fixup docs with symbolic exit codes

Conflict between me and Thomas pushing patches in parallel.

Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: add exit status defines
Thomas Wood [Tue, 13 May 2014 14:22:52 +0000 (15:22 +0100)]
lib: add exit status defines

Add defines for success, skip and timeout exit statuses.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agolib: set a timeout when reading crc values
Thomas Wood [Mon, 12 May 2014 09:20:55 +0000 (10:20 +0100)]
lib: set a timeout when reading crc values

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: add igt_set_timeout
Thomas Wood [Mon, 12 May 2014 09:19:52 +0000 (10:19 +0100)]
lib: add igt_set_timeout

Add a function to stop and fail a test after the specified number of
seconds have elapsed.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotests/kms_flip: Use asserts
Daniel Vetter [Wed, 14 May 2014 09:52:35 +0000 (11:52 +0200)]
tests/kms_flip: Use asserts

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Remove unused tiling tests
Daniel Vetter [Wed, 14 May 2014 09:41:55 +0000 (11:41 +0200)]
tests/prime_nv_pcopy: Remove unused tiling tests

We now know that the hardware can't do this, and it's not designed to.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Drop return values from tests
Daniel Vetter [Wed, 14 May 2014 09:39:31 +0000 (11:39 +0200)]
tests/prime_nv_pcopy: Drop return values from tests

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Drop return values from copy/check functions
Daniel Vetter [Wed, 14 May 2014 09:31:31 +0000 (11:31 +0200)]
tests/prime_nv_pcopy: Drop return values from copy/check functions

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Use asserts in setup code
Daniel Vetter [Wed, 14 May 2014 08:57:46 +0000 (10:57 +0200)]
tests/prime_nv_pcopy: Use asserts in setup code

Now we even have more fine-grained checking and only skip if the
nouveau card isn't supported, but fail properly if something else goes
wrong.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Use asserts in nv_bo_alloc
Daniel Vetter [Wed, 14 May 2014 08:49:40 +0000 (10:49 +0200)]
tests/prime_nv_pcopy: Use asserts in nv_bo_alloc

Step one to untangle the control flow in this test and replace it all
with igt assert magic.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_api: Use asserts instead of control flow
Daniel Vetter [Wed, 14 May 2014 08:44:16 +0000 (10:44 +0200)]
tests/prime_nv_api: Use asserts instead of control flow

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_seqno_wrap: Replace control flow with asserts
Daniel Vetter [Wed, 14 May 2014 08:07:17 +0000 (10:07 +0200)]
tests/gem_seqno_wrap: Replace control flow with asserts

Only tricky bit was a bit of debug output sprinkled all over, I've
moved it all to cmp_bo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Use igt macros more
Daniel Vetter [Wed, 14 May 2014 07:56:53 +0000 (09:56 +0200)]
tests: Use igt macros more

Often just folding together of the common if (cond) printf;
abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out
more since the igt macros will already print the condition and errno.

A few tests where more work (like ripping out return codes en masse)
is needed left as-is.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: sprinkle igt logging
Daniel Vetter [Tue, 13 May 2014 22:36:04 +0000 (00:36 +0200)]
tests: sprinkle igt logging

All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.

Some information output removed when it's redundant with the subtest
status.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agopm_pc8: add system-suspend subtest
Imre Deak [Tue, 13 May 2014 12:49:58 +0000 (15:49 +0300)]
pm_pc8: add system-suspend subtest

Signed-off-by: Imre Deak <imre.deak@intel.com>
10 years agotests/kms_fbc_crc: Use igt_create_color_fb()
Ville Syrjälä [Tue, 13 May 2014 12:02:37 +0000 (15:02 +0300)]
tests/kms_fbc_crc: Use igt_create_color_fb()

No need to hand roll the alloc fb+paint code anymore, just use the
common helper.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_fbc_crc: Reset display state between subtests
Ville Syrjälä [Tue, 13 May 2014 11:49:53 +0000 (14:49 +0300)]
tests/kms_fbc_crc: Reset display state between subtests

If a subtest fails it'll leave the display in a state that may prevent
the next subtest from working. So reset the display state between
subtests.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_fbc_crc: Switch to using the igt_display stuff
Ville Syrjälä [Tue, 13 May 2014 10:56:41 +0000 (13:56 +0300)]
tests/kms_fbc_crc: Switch to using the igt_display stuff

Let's try to use the common igt_display framework to make the code a bit
nicer.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_fbc_crc: Simplify pipe_crc mess
Ville Syrjälä [Tue, 13 May 2014 10:38:20 +0000 (13:38 +0300)]
tests/kms_fbc_crc: Simplify pipe_crc mess

There's no need to keep an array of pipe_crc objects around. Just keep
one for the duration of the specific crtc/connector/test combo.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib/igt_core: Fix type on igt_log doc
Daniel Vetter [Tue, 13 May 2014 10:28:26 +0000 (12:28 +0200)]
lib/igt_core: Fix type on igt_log doc

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib/igt_core: Document testrunner interface a bit
Daniel Vetter [Tue, 13 May 2014 09:29:34 +0000 (11:29 +0200)]
lib/igt_core: Document testrunner interface a bit

Also fix up one gtkdoc fumble in igt_fb. We should use symbolic
defines if possible instead of just listening the magic 0, 77, 78
values for exit codes, but that's a separate patch.

Cc: tim.gore@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: Move igt tests to intel validation area
Tim Gore [Tue, 13 May 2014 08:34:42 +0000 (09:34 +0100)]
intel-gpu-tools: Move igt tests to intel validation area

Currently when IGT is built for Android the resulting test
executables go to /system/bin, which is not ideal. After
discussion with the core validation team i have moved them
to /system/vendor/intel/validation/core/igt by setting
LOCAL_MODULE_PATH.

I have also added a --defsym linker option to export a
symbol that allows a script to easily distinguish between
tests that have subtests and those that dont. There are
better ways to do this (viz, in the source code) but
because the igt tests are not written consistently this
would require many more changes.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Android has libcairo support now!
Daniel Vetter [Tue, 13 May 2014 09:12:34 +0000 (11:12 +0200)]
NEWS: Android has libcairo support now!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: Build tests needing cairo if ANDROID_HAS_CAIRO=1
Tim Gore [Mon, 12 May 2014 12:39:00 +0000 (13:39 +0100)]
intel-gpu-tools: Build tests needing cairo if ANDROID_HAS_CAIRO=1

Until now the tests that depended on libcairo were simply
skipped in the android build. Now that I have a cairo port
working, build these cairo dependent tests if ANDROID_HAS_CAIRO
is set to 1 in the environment.
For information on building cairo for IGT on Android see the
wiki at:

https://securewiki.ith.intel.com/display/GFXCore/IGT+Test+Suite+on+Android

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gen7_forcewake_mt: Don't set the GGTT bit in SRM command
Brad Volkin [Sat, 10 May 2014 21:11:53 +0000 (14:11 -0700)]
tests/gen7_forcewake_mt: Don't set the GGTT bit in SRM command

The command parser in newer kernels will reject it and setting this
bit is not required for the actual test case.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76670
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>