3893 Commits

Author SHA1 Message Date
Tvrtko Ursulin
30a1360f6a igt_fb: Transfer existing content to Cairo surface for Y/Yf frame buffers
Rendering into Y and Yf tiled frame buffers with Cairo was losing the
previous content ie. was starting from black. This is different than the
behaviour with linear and X tiled so make it the same by blitting the
initial content when creating the rendering context.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-04-29 15:02:19 +01:00
Chris Wilson
fc69bb0de5 igt/gem_exec_big: Check 64bit relocation values
On gen8, we should check that the full 64bit relocation value is
correct, and we should be sure to poison the relocation offset between
runs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-27 21:12:20 +01:00
Thomas Wood
40b45bace3 tools: add missing header to distributed sources
Make sure all the sources for intel_reg are included in the
distribution.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 17:34:41 +01:00
Thomas Wood
bad8834ee7 tools: update .gitignore
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:32:41 +01:00
Joonas Lahtinen
a3e336e461 tests/gem_mmap_gtt: Use PAGE_SIZE instead of hard coded value
Now that there is PAGE_SIZE define, use it.

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Tvrtko Ursulin
dbf6468f90 kms_rotation_crc: Use main test for negative cases
Saves a good amount of code duplication by supporting expected
failures from the main loop.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Tvrtko Ursulin
6f5d400ae9 kms_rotation_crc: No need to square the buffer in paint
Now that size is calculated in a single place and correct geometry passed in,
paint squares does not need to concern itself with it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Tvrtko Ursulin
b769a7c96b kms_rotation_crc: Consolidate plane and cursor code paths
There can only be one, either a plane or a cursor, in each subtest so there
is no need for two framebuffer varilables and also some codepaths can be
unified.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Tvrtko Ursulin
e23a818c18 kms_rotation_crc: Negative test does not need to render anything
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Tvrtko Ursulin
148c0d2281 kms_rotation_crc: Remove unused variable in negative test
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Tvrtko Ursulin
d901106240 kms_rotation_crc: Framebuffer used for initial modeset does not need to be painted
It is just there to light up the display using the full modeset. Also renamed it
from fb_full to fb_modeset to be more descriptive.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Tvrtko Ursulin
4dd79d13c9 kms_rotation_crc: Local framebuffers do not need to be global
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27 15:26:00 +01:00
Chris Wilson
019ae907ff lib: Fix types for gem_mmap*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 12:18:15 +01:00
Chris Wilson
fb950bc17f lib: Cache static queries
We frequently check for device capabilities, for which we can safely
assume that there is but one on a system and so cache the first query
value and return it for all future queries. The benefit is to reduce
dmesg debug spam which helps when either bringing up a test or trying to
track down why a test fails.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 12:18:15 +01:00
Chris Wilson
10f903aa23 igt/gem_pwrite: Check that mmap(wc) succeeds
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 11:21:54 +01:00
Chris Wilson
cd812a4e89 igt/gem_pwrite: Delete unused mmap(wc) for the big CPU test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 11:21:54 +01:00
Chris Wilson
49bcdc84a3 igt/gem_pwrite: Also test surfaces larger than the GTT
Go big or go home!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 11:12:38 +01:00
Chris Wilson
236bab5cfd lib: Fix types for gem_create()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 11:12:38 +01:00
Chris Wilson
263da26b9c intel-gpu-overlay: Improve error message for failure to open an output
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 10:17:18 +01:00
Chris Wilson
be6e32b925 igt/gem_pwrite: Test handling of larger than mappable buffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26 10:17:18 +01:00
Jani Nikula
dfda0b6aec intel_reg: introduce one intel_reg tool to rule them all
Three Tools for the Elven-kings under the sky,
	Seven for the Dwarf-lords in their halls of stone,
	Nine for Mortal Men doomed to die,
	One for the Dark Lord on his dark throne
	In the Land of Mordor where the Shadows lie.
	One Tool to rule them all, One Tool to find them,
	One Tool to bring them all and in the darkness bind them
	In the Land of Mordor where the Shadows lie.

		J.R.R. Tolkien's epigraph to The Lord of The Tools
		 | sed 's/Ring/Tool/g'

Introduce intel_reg as the one Intel graphics register multitool to
replace intel_reg_read, intel_reg_write, intel_iosf_sb_read,
intel_iosf_sb_write, intel_vga_read, intel_vga_write, intel_reg_dumper,
intel_reg_snapshot, and quick_dump.py.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-04-23 01:09:59 +03:00
Sonika Jindal
e1ce5eac33 kms_rotation_crc: Adding test for 90/270 rotation
Adding 90/270 rotation testcase for primary and sprite planes.

v2: Added position test for sprite. Checking for gen > 9 for 90/270.
Some cleanup and rebase.
v3: Added test for unsupported tiling and unsupported pixel format for 90/270
v4: Added the legacy commit to initiate modeset in the negative test(Tvrtko)

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-22 18:00:42 +01:00
Sonika Jindal
7ef80c0a98 lib/igt_kms: Let set_property return the result
Return the return value of the set_property ioctl and add check for
the failure.

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-22 18:00:42 +01:00
Tim Gore
7aeecc197b tests/Android.mk : skip kms_legacy_colorkey if no cairo
test kms_legacy_colorkey depends on cairo, so add it to
the list of test not to build unless "ANDROID_HAS_CAIRO"
is set.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-22 18:00:42 +01:00
Tim Gore
20ad3e55fb tools/quick_dump/makefile.am: add -lrt to get clock_gettime
Attempting to build IGT on linux without libunwind fails
due to tools/quick_dump not linking the rt library,
causing an undefined symbol error for clock_gettime.
Adding -lrt to the list of libraries in Makefile.am fixes
this.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-22 18:00:42 +01:00
Tim Gore
52888df084 lib/drmtest.h : fix mmap64 again
In android mmap64 was redirected to mmap2 because mmap64
was not alway available. But now mmap2 has been removed
from 64 bit android builds (and mmap64 is available), so
update preprocessor conditional to check for __x86_64__.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-22 18:00:42 +01:00
Thomas Wood
5b7edb9cb0 docs: avoid escaping characters in documentation comments
Avoid having to escape certain characters in documentation comments by
not allowing docbook markup tags. Markdown formatting in documentation
comments is still supported.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-21 10:52:14 +01:00
Mike Mason
cc9110c447 tests/tools_test: Find tools in source or installed locations
Signed-off-by: Mike Mason <michael.w.mason@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-20 12:11:49 +01:00
Rodrigo Vivi
36ecc3180a tests/kms_psr_sink_crc: Make render size and stride based on modified fb size
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
c352475960 test/kms_psr_sink_crc: Add dpms off/on tests.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
782d5e7a03 test/kms_psr_sink_crc: Split plane setup operations
No functional changes. This reorg will allow to do some
operations like dpms off/on with different places to wait
for psr to get active.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
fd9ef1b8c8 tests/kms_psr_sink_crc: remove timeout option from wait_psr_entry.
No functional changes. Just making timeout unique for any case.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
ae9c685133 lib/igt_aux: Introduce igt_interactive_debug_manual_check.
This is an extention of igt_debug_wait_for_keypress that also can have
customized message and return key pressed.

v2: This is actualy a v2. V1 was an extension of original
    igt_debug_wait_for_keypress but it was nacked.

v3: Make [Y/n] check inside aux function as suggested by Daniel.
    Also renaming and adding first use case along with the axu function.

v4: Simplify function name and make it assert pressed key
    is different from n/N as suggested by Daniel.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
e1ac04462d tests/kms_psr_sink_crc: Add manual mode.
Sink CRC is the most reliable way to test PSR. However in some platforms
apparently auto generated packages force panel to keep calculating CRC invalidating
our current sink crc check over debugfs.

So, this manual test help us to find possible gaps on this platforms where we cannot
trust on sink crc checks.

v2: Accept Daniel's suggestions:
    * Avoid strcpy
    * don't override assert definition
    * Make --interactive-debug for every testcases instead using local --manual

v3: Sink CRC can be unreliable for other platforms as well so let's skip and warn
    when we detect the misbehaviour instead hardcoded per platform.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
b7b2ecbaef tests/kms_psr_sink_crc: Make plane_move visible to human eyes
this will allow manual tests when crc isn't available.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
00992f7d86 tests/kms_psr_sink_crc: Make mmaps visible to human eyes
this will allow manual tests when crc isn't available.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
f20690d864 tests/kms_psr_sink_crc: Make render visible to human eyes
This will allow manual tests when crc isn't available.

v2: Remove unused and non-sense buf->size and decrease buf->stride a bit as suggested by Daniel.

v3: Fix v2 mistake and get buf->size back with a value that makes more sense.
    TBD: to be changed for variable size depending on modified fb size on following patch

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Rodrigo Vivi
3cb21246c1 tests/kms_psr_sink_crc: Make blt visible to human eyes
This will allow manual tests when crc isn't available.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-04-16 11:08:37 -07:00
Thomas Wood
1cbe7dd54c tests: update .gitignore
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-16 17:41:41 +01:00
Ville Syrjälä
2b74b2bb33 tests: Add kms_legacy_colorkey
Add a quick test to make sure the legacy set colorkey ioctl only works
for sprite planes.

v2: Drop igt_fixtures

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-04-16 16:49:46 +03:00
Ville Syrjälä
4271b15f3c quick_dump: Fix undefined symbols from libunwind
../../lib/.libs/libintel_tools.a(igt_core.o): In function `print_backtrace':
intel-gpu-tools/lib/igt_core.c:981: undefined reference to `_Ux86_64_getcontext'
intel-gpu-tools/lib/igt_core.c:982: undefined reference to `_ULx86_64_init_local'
intel-gpu-tools/lib/igt_core.c:983: undefined reference to `_ULx86_64_step'
intel-gpu-tools/lib/igt_core.c:987: undefined reference to `_ULx86_64_get_proc_name'

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-04-16 16:38:03 +03:00
Ville Syrjälä
3dff4af5e0 quick_dump: Don't allow undefined symbols in _chipset.so
Every time _chipset.so has undefined symbols we fail to notice it
at build time and then get to wonder why quick_dump fails to actually
work. Pass -Wl,--no-undefined to the linker to get a build time error
instead of the current runtime error.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-04-16 16:38:03 +03:00
Chris Wilson
beddb3be3f igt/gem_exec_lut_handle: Hide exec latency
The first test tries to rewrite relocations in an active batch, which is
a useful test and measurement. However, the overhead of the exec may
dominate and so we want a measurement without that overhead as well.
Using a pool of batches should allow for the oldest to idle whilst we
setup the next (and so the wait should be non-existent).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-14 21:20:13 +01:00
Thomas Wood
ecb03266b2 lib: load images from the data directory in igt_paint_image
Update igt_paint_image so that it can read images from the package data
directory.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14 17:44:35 +01:00
Thomas Wood
90dadcd0da lib: use a critical warning when unable to open a data file
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14 17:44:35 +01:00
chandra konduru
8b3082a40e i-g-t: Adding panel fitting test case
This patch is adding i-g-t test case to test panel fitting usages.

v2:
-use new tiled types when calling igt_create_fb (me)

Signed-off-by: chandra konduru <chandra.konduru@intel.com>
[Thomas: convert test to use igt_simple_main]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14 17:44:35 +01:00
chandra konduru
a26f9f9ad0 i-g-t: Adding plane scaling test case
This patch is adding i-g-t plane scaling test case to test couple basic
display plane scaling usages. Additional test scenarios can be added later.

v2:
-Added iterative scaling to visually observe scaling (me)

v3:
-Added a flag to control primary plane scaling (me)

v4:
-Use new tiled types when calling igt_create_fb (me)

Signed-off-by: chandra konduru <chandra.konduru@intel.com>
[Thomas: convert test to use igt_simple_main]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14 17:44:34 +01:00
chandra konduru
ace4208702 i-g-t: Adding test case to test background color.
Adding i-g-t test case to test display crtc background color.

v2:
- Added IGT_TEST_DESCRIPTION() (Thomas Wood)
- Added to .gitignore (Thomas Wood)
- Added additional details to function header (Thomas Wood)
- Simplified igt_main (Thomas Wood)

v3:
- rebased to latest master (me)
- took sleep calls out (Daniel)
- use new tiled types when calling igt_create_fb (me)

Signed-off-by: chandra konduru <chandra.konduru@intel.com>
[Thomas: convert test to use igt_simple_main]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14 17:44:34 +01:00
Joonas Lahtinen
e371b3fbad tests/gem_mmap_gtt: add huge BO test
Add a straightforward test that allocates a BO that is bigger than
(by 1 page currently) the mappable aperture, tests mmap access to it
by CPU directly and through GTT in sequence.

Currently it is expected for the GTT access to gracefully fail as
all objects are attempted to get pinned to GTT completely for mmap
access. Once the partial view support is merged to kernel, the test
should pass for all parts.

v2:
- Corrected BO domain handling (Chris Wilson)
- Check again after GTT access for added paranoia (Chris Wilson)

v3:
- Avoid flush by using pread (Chris Wilson)
- Free gtt_pattern buffer too.

v4:
- Add more comments (Tvrtko Ursulin)
- Use igt_require (Tvrtko Ursulin)

v5:
- Remove wrong message from igt_require_f (Tvrtko Ursulin)
- After digging deeper to it, just igt_assert that the CPU
  mapping needs to succeed.

Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
[Thomas: remove unused label]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14 17:44:24 +01:00
Joonas Lahtinen
577fb75ed8 tests/gem_mmap_gtt: clarify BO domain setting functions
Add suffix and complementary function for CPU domain.

v2:
- Change function signatures to be consistent with the rest

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14 17:43:05 +01:00