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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Daniel Vetter [Tue, 26 Aug 2014 13:03:40 +0000 (15:03 +0200)]
lib/rendercopy*: Use igt_assert
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Paulo Zanoni [Wed, 6 Aug 2014 14:48:56 +0000 (11:48 -0300)]
igt_kms: pass drm_fd instead of igt_display_t on some functions
Since these functions only really use the drm_fd. The goal is to be
able to reuse these functions on programs that don't use the
igt_display_t structure.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Tue, 5 Aug 2014 21:44:47 +0000 (18:44 -0300)]
igt_kms: don't get drmModeRes just to free it later
Stress testing malloc is not our goal :)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Wed, 6 Aug 2014 17:55:33 +0000 (14:55 -0300)]
tests/pm_rpm: add subtests for planes and cursors
These tests should trigger WARNs on Kernels that don't have the most
recent fixes.
v2: - Merge both the cursor and planes patches into one so it's easier
to update them.
- Extend the tests a little bit to exercise fences.
- Fix bug found by Matt to enable the test to run on older Kernels
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Sean V Kelley [Tue, 5 Aug 2014 20:53:49 +0000 (13:53 -0700)]
lib/chv: CHV media pipeline command sequence
Enable gem_media_fill test for CHV platform. In addition to differences in
media IP blocks from Broadwell, the command sequence also differs for
programming the media pipeline, e.g., should not send a MEDIA_STATE_FLUSH
right before the MI_BATCH_BUFFER_END of batch buffers using MEDIA_OBJECT.
Uses explicit IS_BROADWELL / IS_CHERRYVIEW to distinguish in gen8 media
fill handling.
Signed-off-by: Sean V Kelley <sean.v.kelley@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Gaurav K Singh [Wed, 16 Jul 2014 14:09:33 +0000 (19:39 +0530)]
intel_bios_reader: Add support to dump MIPI Sequence block #53
Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Gaurav K Singh [Wed, 16 Jul 2014 14:09:32 +0000 (19:39 +0530)]
intel_bios_reader: Add support to dump MIPI Configuration Block #52
Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Thomas Wood [Thu, 31 Jul 2014 15:26:55 +0000 (16:26 +0100)]
testdisplay: ignore invalid subtest options
testdisplay does not have any subtests and should therefore exit with
the appropriate exit code if the --list-subtests or --run-subtest
options are used.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Chris Wilson [Mon, 28 Jul 2014 07:58:32 +0000 (08:58 +0100)]
core: Add all kernel log levels
And notice that INFO is 6 not 5. This is because I had intended to use
KERN_NOTICE anyway...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Thomas Wood [Mon, 28 Jul 2014 15:43:19 +0000 (16:43 +0100)]
Update .gitignore files
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Thomas Wood [Mon, 28 Jul 2014 15:01:27 +0000 (16:01 +0100)]
lib: don't abort if forcing the connector state fails
Ensure tests using igt_enable_connectors can still run even if the
relevant debugfs files are not available.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>