2865 Commits

Author SHA1 Message Date
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
Rémi Cardona
2ef19ad79a 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>
2014-08-27 08:56:08 +01:00
Daniel Vetter
257a51ec95 lib: Use igt macros more
Stragglers.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-26 21:29:18 +02:00
Daniel Vetter
1649ef0d1f 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>
2014-08-26 21:29:14 +02:00
Daniel Vetter
71ac5de5a4 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>
2014-08-26 15:16:01 +02:00
Daniel Vetter
baa6f8b34f lib/rendercopy*: Use igt_assert 2014-08-26 15:03:40 +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
50166d2a20 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>
2014-08-21 15:02:04 +01:00
Damien Lespiau
54397cafed lib/fb: Replace straight igt_fail() by asserts with debug messages
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-21 15:00:08 +01: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
Damien Lespiau
378e61e4d8 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>
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
Mike Mason
e9da093b13 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>
2014-08-19 11:31:57 +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
Thomas Wood
fcb324c2cc 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>
2014-08-14 15:02:17 +01:00
Daniel Vetter
5c7bcb11be 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>
2014-08-12 19:36:53 +02: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
3b39bfff60 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>
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
9a15b5a5e2 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>
2014-08-12 19:36:53 +02:00
Daniel Vetter
27a19de059 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>
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
Ville Syrjälä
eda904c9d7 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>
2014-08-11 19:12:52 +03:00
Paulo Zanoni
5a06d361b5 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>
2014-08-08 17:02:43 -03:00
Paulo Zanoni
5a978121d3 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>
2014-08-08 17:02:39 -03:00
Paulo Zanoni
1892059842 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>
2014-08-08 17:02:34 -03:00
Paulo Zanoni
f6ffa3ca7f 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>
2014-08-08 17:02:29 -03:00
Paulo Zanoni
a17f0604ef 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>
2014-08-07 15:44:28 -03:00
Paulo Zanoni
d52365677e 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>
2014-08-07 15:44:06 -03:00
Paulo Zanoni
da458758e7 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>
2014-08-07 15:43:00 -03:00