1471 Commits

Author SHA1 Message Date
Chris Wilson
107151ce9f igt/gem_ppgtt: Create secondary contexts and mm
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09 16:28:36 +01:00
Chris Wilson
961578f471 test: Exercise full ppgtt switching between multiple fd
Load up both rings with lots of fighting between multiple contexts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09 14:52:35 +01:00
Chris Wilson
cdf0ea825e 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>
2014-09-08 12:56:06 +01:00
Chris Wilson
be6bb4ce4a 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>
2014-09-08 12:56:06 +01:00
Chris Wilson
b76f1d8b03 igt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08 10:29:16 +01:00
Chris Wilson
ac3d06094a 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>
2014-09-06 18:15:52 +01:00
Chris Wilson
5eeb1f34d4 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>
2014-09-06 17:26:21 +01:00
Thomas Wood
48da0e69ad tests/kms_3d: skip if connectors cannot be forced
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05 16:52:51 +01:00
Thomas Wood
5303ce8076 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>
2014-09-05 16:52:51 +01:00
Thomas Wood
4cb1946697 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>
2014-09-05 16:52:51 +01:00
Mika Kuoppala
b77145dd48 lib: Add MI_LOAD_REGISTER_IMM
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-09-05 18:04:14 +03:00
Chris Wilson
081887504a 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>
2014-09-03 13:38:30 +01:00
Chris Wilson
3309f54e8f 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>
2014-09-03 12:03:56 +01:00
Damien Lespiau
4bff3ee012 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>
2014-09-03 12:40:56 +02:00
Chris Wilson
c12f292b1d 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>
2014-08-31 16:25:43 +01:00
Chris Wilson
10552b5ca6 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>
2014-08-30 11:44:51 +01:00
Chris Wilson
255bade1ea 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>
2014-08-29 21:25:14 +01:00
Chris Wilson
982f7eb238 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>
2014-08-29 20:02:10 +01:00
Chris Wilson
86055df968 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>
2014-08-29 20:02:10 +01:00
Chris Wilson
59c55626f9 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>
2014-08-29 13:52:50 +01:00
Chris Wilson
6c428a6c06 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>
2014-08-29 13:20:39 +01:00
Chris Wilson
3b94d3f8ce 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>
2014-08-29 13:20:36 +01:00
Arun Siluvery
d0a41b47ea 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>
2014-08-27 17:50:30 +02:00
Sonika Jindal
4428151960 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>
2014-08-26 12:46:57 +02:00
Wendy Wang
c1cf0d8138 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>
2014-08-26 09:15:45 +02:00
Damien Lespiau
d9ffb7dfc3 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>
2014-08-21 14:54:01 +01:00
Damien Lespiau
5f16ef6f28 pm_rpm: Adjust to the new igt_create*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
9317f39a5e pm_lpsp: Adjust to the new igt_create.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
210f76c496 kms_sink_crc_basic: Adjust to the new igt_create.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
ab4cb9d7ce kms_setmode: Adjust to the igt_create.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
0d4cf057f5 kms_render: Adjust to the new igt_create.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
3149b8e903 kms_psr_sink_crc: Adjust to the new igt_create.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
4a8c6346e5 kms_plane: Adjust to the new igt_create.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
b013b21179 kms_pipe_crc_basic: Adjust to the new igt_create.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
fd1317bd25 kms_mmio_vs_cs_flip: Adjust to the new igt_create_.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
876fe198c7 kms_flip_tiling: Adjust to the new igt_create_.*fb() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
d71031cd74 kms_flip: Adjust to the new igt_create_fb*() API
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
3a930273a0 kms_fence_pin_leak: Use I915_TILING_X to create fbs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
66d31332dd kms_fbc_crc: Use I915_TILING_X to create fbs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Damien Lespiau
0c14af65ea kms_cursor_crc: Use I915_TILING_NONE to create fbs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 14:54:01 +01:00
Mike Mason
4d2f511cee 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>
2014-08-19 11:32:06 +01:00
Tim Gore
75365eb01b 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>
2014-08-18 17:04:40 +01:00
Mike Mason
79c0c9622c 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>
2014-08-18 17:04:09 +01:00
Thomas Wood
1bec6cb2c2 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>
2014-08-14 16:34:34 +01:00
Daniel Vetter
1cad834261 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>
2014-08-12 19:36:53 +02:00
Daniel Vetter
81dfcaba88 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>
2014-08-12 19:36:53 +02:00
Daniel Vetter
33f0884f3c 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>
2014-08-12 19:36:53 +02:00
Daniel Vetter
dd8fba44cd lib/igt_kms: Unify pipe name helpers
And add api doc while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12 19:36:53 +02:00
Daniel Vetter
fb38cf260b tests/kms_cursor_crc: Align opening {
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-12 19:36:53 +02:00
Chris Wilson
2ce0691cd5 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>
2014-08-12 15:34:12 +01:00