2562 Commits

Author SHA1 Message Date
Chris Wilson
a384e55b49 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>
2014-06-03 07:35:54 +01:00
Antti Koskipaa
21fb118f3b 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>
2014-06-02 17:49:53 +02:00
Daniel Vetter
532b7e61e0 NEWS: Fix spelling a bit 2014-05-28 16:19:16 +02:00
Daniel Vetter
aeb3d88977 NEWS: Don't forget the runtime pm helpers! 2014-05-28 16:05:14 +02:00
Daniel Vetter
0ee77ce232 NEWS: Updates ... 2014-05-28 16:03:50 +02:00
Damien Lespiau
707c839a6a 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>
2014-05-28 16:03:50 +02:00
Chris Wilson
321273ff76 Factor in kernel object overhead when checking available memory for tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-28 09:05:57 +01:00
Ville Syrjälä
e4ba3b75e6 tests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURF
Make sure DSPSURF will change during the panning operation
in flip-vs-panning-vs-hang.

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

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-27 21:03:59 +02:00
Tim Gore
3805288f1a 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>
2014-05-27 19:17:14 +02:00
Daniel Vetter
ff3c122098 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>
2014-05-22 17:30:16 +02:00
Daniel Vetter
f75ec0b452 tests/kms_pipe_crc_basic: Add suspend tests
Currently broken ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-22 16:27:44 +02:00
Mika Kuoppala
6fa1934a19 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>
2014-05-22 14:29:49 +03:00
Mika Kuoppala
9b0d3481e8 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>
2014-05-22 14:18:45 +03:00
Chris Wilson
9911f3f0cf 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>
2014-05-22 10:22:04 +01:00
Ville Syrjälä
eb566561e7 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>
2014-05-22 11:26:46 +03:00
Daniel Vetter
e2ac7a15f1 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>
2014-05-22 09:36:31 +02:00
Daniel Vetter
0675765eff tests/kms_sink_crc_basic: skip properly
Not running the test is not failing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-22 09:36:30 +02:00
Daniel Vetter
f893535141 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>
2014-05-22 09:07:45 +02:00
Daniel Vetter
c75dcbdac5 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>
2014-05-20 15:45:31 +02:00
Daniel Vetter
89152791e2 tests/kms_flip: Add vblank vs. gpu hang testcase
Currently broken :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-20 14:42:12 +02:00
Xiang, Haihao
737d248a12 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>
2014-05-19 22:49:25 +01:00
Xiang, Haihao
881afff297 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>
2014-05-19 22:49:11 +01:00
Imre Deak
a6eaa29271 igt/quickdump: vlv: dump FLISDSI regs too
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-05-19 20:13:15 +03:00
Imre Deak
ad08999794 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>
2014-05-19 20:13:15 +03:00
Daniel Vetter
3005ac3ee8 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>
2014-05-19 18:11:34 +02:00
Jesse Barnes
f00efff326 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.
2014-05-19 08:44:12 -07:00
Chris Wilson
d71add5c11 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>
2014-05-19 07:28:10 +01:00
Daniel Vetter
252d1151a8 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>
2014-05-16 23:36:25 +02:00
Oscar Mateo
542c2b5ed5 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>
2014-05-16 17:45:14 +03:00
Oscar Mateo
5bdd4d9b5e 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>
2014-05-16 17:45:14 +03:00
Rodrigo Vivi
ace8a9e10c 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>
2014-05-16 11:12:40 +02:00
Daniel Vetter
1c9a5b1a7b 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>
2014-05-16 10:33:28 +02:00
Daniel Vetter
7357639397 tests/pm_pc8: Use igt_assert_cmpint
More pretty!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-16 10:29:49 +02:00
Rodrigo Vivi
5e83f0444d tests/gem_bad_reloc: Adding missing include.
It was breaking compilation.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2014-05-15 14:16:25 -04:00
Daniel Vetter
6797ca8c75 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>
2014-05-15 16:36:08 +02:00
Daniel Vetter
943511a3ab 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>
2014-05-15 14:25:47 +02:00
Daniel Vetter
6727de0c1a 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>
2014-05-15 14:25:47 +02:00
Daniel Vetter
bd521b493e 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>
2014-05-15 14:25:47 +02:00
Tim Gore
1bee7e8b82 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>
2014-05-15 14:47:35 +02:00
Chris Wilson
af1fbc427f 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>
2014-05-15 13:38:10 +01:00
Chris Wilson
ef51988ab2 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>
2014-05-15 13:25:02 +01:00
Chris Wilson
465793bfd1 gem_exec_lut_handle: Do a warm up pass before timing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-15 13:11:41 +01:00
Chris Wilson
efd5a571f4 gem_bad_reloc: Add subtest for LUT-based execbuffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-15 13:11:41 +01:00
Chris Wilson
daa9e3d80a 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>
2014-05-15 08:47:21 +01:00
Daniel Vetter
62cd793c37 tests/kms_flip: Fix vblank ts check
Oops, fumbled that in the conversion.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 18:00:07 +02:00
Ville Syrjälä
78f79e4e95 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>
2014-05-14 19:16:49 +03:00
Daniel Vetter
831eb21197 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>
2014-05-14 15:34:00 +02:00
Thomas Wood
17eb062661 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>
2014-05-14 12:33:02 +01:00
Thomas Wood
c03d58595e 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>
2014-05-14 12:33:02 +01:00
Thomas Wood
d8e5313a27 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>
2014-05-14 12:33:01 +01:00