summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2015-04-21docs: avoid escaping characters in documentation commentsThomas Wood
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-16lib/igt_aux: Introduce igt_interactive_debug_manual_check.Rodrigo Vivi
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-16tests: Add kms_legacy_colorkeyVille Syrjälä
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-14lib: load images from the data directory in igt_paint_imageThomas Wood
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-14lib: use a critical warning when unable to open a data fileThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14i-g-t: Adding plane scaling test casechandra konduru
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-14i-g-t: Adding test case to test background color.chandra konduru
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-14tests: create a single combined test listThomas Wood
All tests now respond in a consistent way such that separate lists for tests with and without subtests are no longer necessary. v2: fix other references to the test list Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14lib: use test failure status for igt_set_timeoutThomas Wood
Use a failure status code for timeout to avoid confusion between tests that take too long to execute versus a failure due to an operation taking longer than expected. v2: Add a "timed out" message before exiting. (Daniel Vetter) Fix the timeout library check by disabling hard errors in xfail tests, since these share the same exit status as test failure. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14lib: add a define for test failure exit statusThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14lib: Implement gem_sync() using WAITChris Wilson
When synchronising to rendering, we only want to wait for it to complete and avoid the cache-domain side-effects of SET_DOMAIN if possible. This has the advantage of speeding up a few tests (and thereby making the actual test more explicit in terms of kernel operations). Of course some tests may be reliant on the side-effects... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-04-08lib/bxt: Add Broxton PCI idsDamien Lespiau
v2: Rebase on top of the SKL upstreaming Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2015-04-08lib/intel_chipset: fix HAS_PCH_SPLIT on GEN9Imre Deak
In the next patch we'll add support for BXT which is GEN9, but doesn't have PCH, so fix the macro accordingly. No functional change. Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-04-08lib/intel_chipset: fix HAS_PCH_SPLIT on CHVImre Deak
CherryView is GEN8 but doesn't have PCH so fix the macro accordingly. Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-04-03igt/gem_cpu_reloc: Pretty print execbuf failuresChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=85672 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02tests: install test programs to libexecJoonas Lahtinen
Install the test programs by default so that they can be packaged. Tested with the testdisplay test so that it still runs after the modifications as it depends on a data file to be present. Need to pass -r option to enable QR code display on success (PNG data file). Packaging is useful when building a complete software stack for a DUT from scratch. This should bring us closer to achieving a built-from-scratch testing workflow. Package maintainers can always decide to ignore the installed files. v2: - Install more tests including scripts and their data v3: - Add clarification to commit message about why we do this. (Chris Wilson & Thomas Wood) - Change libexec into pkglibexec to comply to standard (Thomas Wood) - Do not install $(common_files). (Thomas Wood) - Make it really obvious the installed files are tests by using tests directory name to avoid any confusion with packagers. v4: - Fixed commit message. v5: - Add file locator helper to retain backwards compatibility. (Thomas Wood) - Test with testdisplay -r option that draws the .png file. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-31lib/kms: Add a way to override an output's modeAnder Conselvan de Oliveira
So that it is possible to use a custom mode with the simplified mode set API. v2: Add documentation for igt_output_override_mode(). (Thomas) Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-30lib/tests: add missing library flagsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-30lib: add debug flagsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26igt.cocci: check the return values of various functionsThomas Wood
Add rules to fix unused-result warnings when compiling with _FORTIFY_SOURCE defined and apply them to the library and tests. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26lib: print a stack trace when a test assertion failsThomas Wood
Add an optional dependency on libunwind to print stack traces when a test assertion fails. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26igt/gem_concurrent_blit: Separate out the combinatorial explosionChris Wilson
Apparently nobody else likes testing and debugging GEM coherency issues. However, this also means that QA is skipping these vital tests. Split out a set of canaries into igt/gem_concurrent_blit and keep the rest in igt/gem_concurrent_all. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89497 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26lib/core: Silence internally used signalsChris Wilson
We use SIGTERM to kill off child processes. We use it a lot. Reporting everytime we use it is just spam. Treat the similar user signals (SIGINT, SIGQUIT and the should-never-have-been SIGPIPE) similarly to reduce noise. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Thomas Wood <thomas.wood@intel.com>
2015-03-25lib: Add media spinJeff McGee
The media spin utility is derived from media fill. The purpose is to create a simple means to keep the render engine (media pipeline) busy for a controlled amount of time. It does so by emitting a batch with a single execution thread that spins in a tight loop the requested number of times. Each spin increments a counter whose final 32-bit value is written to the destination buffer on completion for checking. The implementation supports Gen8, Gen8lp, and Gen9. v2: Apply the recommendations of igt.cocci. Signed-off-by: Jeff McGee <jeff.mcgee@intel.com> Tested-by: Lei Liu <lei.a.liu@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-24lib: Add i854 PCI IDVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24lib: Allow 32bit addresses for IOSF-SB registersVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24lib: Change IOSF SB devfn to 0.0Ville Syrjälä
The devfn field in the IOSF SB messages is only relevant when there's a real PCI bus or some other multifunction device behind a single port. Otherwise the port number itself is enough to uniquely identify the target. In fact some IOSF SB targets reject the access when devfn is not 0.0 (eg. GPIO_NC on BYT). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-23lib: Only warn about suspicious CRCsDaniel Vetter
It is theoretically possible to hit these in the wild, so only warn about them. Dropping the test is probably too much since these caught some real bugs in the past. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23tests: Remove usage of igt_crc_equal and _non_nullDaniel Vetter
Tests should positively check for crc matches, not for mismatches. Enforce this by only exposing and igt_assert function for comparing crcs. For the few tests which didn't just do this as consistency checks but to do functional tests add FIXME comments that some reference crc values are missing. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23lib/debugfs: Add igt_assert_crc_equalDaniel Vetter
Because of hash collisions tests should only ever compare crc checksums for equality. Checking for inequality can result in random failures. To ensure this only expose and igt_assert function and use that. Follow-up patches will rework the code for tests which don't follow this requirement and try to compare for CRC inequality. v2: Rebase on top of Matt's kms_plane changes. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23lib/core: add interactive debug point to igt_failDaniel Vetter
Useful for inspecting the screen state in kms tests when they fail. Also move the screen clearing in kms_cursor_crc to the bottom. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-18lib/batch: Fix range checks for blitsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18lib/batch: Trivial compile fix for 32-bit buildsChris Wilson
intel_batchbuffer.c: In function 'fill_object': intel_batchbuffer.c:589:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] obj->relocs_ptr = (uint64_t)relocs; ^ intel_batchbuffer.c: In function 'exec_blit': intel_batchbuffer.c:598:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] exec.buffers_ptr = (uint64_t)objs; Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-12lib: small documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12lib: move igt_interactive_debug into igt_core.cThomas Wood
igt_interactive_debug should be defined in igt_core.c, rather than the header, to avoid it being defined more than once. Reported-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12lib/fb: Use PRIx64 for uint64_t in format stringDamien Lespiau
Fix the following warning: igt_fb.c: In function 'igt_create_fb_with_bo_size': igt_fb.c:414:2: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 9 has type 'uint64_t' [-Wformat=] igt_debug("%s(width=%d, height=%d, format=0x%x [bpp=%d], tiling=%llx, size=%d\n", introduced by commit: commit e36091d1c7010e825897dc4487f9985ab353973b Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Date: Tue Mar 3 14:11:01 2015 +0000 tiling: Convert framebuffer helpers to use fb modifiers Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12lib: Allow the creation of Ys/Yf tiled FBsDamien Lespiau
There's no fencing for those tiling layouts, so we create a linear bo for cairo to play with, and when cairo is finished with it, we do a fast copy blit to the fb BO with its final tiling. v2: Move to correct domain after CPU is done with the object (-EINVAL). (Tvrtko Ursulin) Correct arguments passed in to framebuffer creation (segfault). (Tvrtko Ursulin) Pass zero stride to kernel as it expects for Yf&Ys. (Tvrtko Ursulin) v3: Rebase for gem_mmap__cpu changes. (Tvrtko Ursulin) v4: Rebase for addfb2.5. (Tvrtko Ursulin) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12lib/igt_fb: Use new ADDFB2 extension for new tiling modesTvrtko Ursulin
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12lib: Add support for new extension to the ADDFB2 ioctl.Tvrtko Ursulin
New functionality accessesed via the __kms_addfb wrapper. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12tiling: Convert framebuffer helpers to use fb modifiersTvrtko Ursulin
This converts the IGT API only, underneath legacy set_tiling is still used. v2: One got away in kms_flip. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12lib: Provide a raw version of the gen9 fast copy blitsDamien Lespiau
So we can use it with bare kernel types, without going through libdrm bos. v2: Don't forget the object handle. (Tvrtko) Correct surface pitch calculation. (Tvrtko) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12lib: Split two helpers to build fast copy's dword0 and dword1Damien Lespiau
Again, these helpers will be useful for a raw version of the gen9 fast copy. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12lib: Don't give a struct igt_buf * to fast_copy_pitch()Damien Lespiau
So we can use this function in a "raw" (ie without igt_buf) version. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12lib/skl: Add gen9 specific igt_blitter_fast_copy()Damien Lespiau
v2: Adjust for BB handling changes. (Tvrtko Ursulin) Correct XY_FAST_COPY_DST_TILING_Yf. (Tvrtko Ursulin) v3: New tiling modes are not defined in the kernel any more. (Tvrtko Ursulin) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12tests/kms_addfb: Y tiled testcasesTvrtko Ursulin
v2: Moved all init into fixtures. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12tests/kms_addfb: Add support for fb modifiersTvrtko Ursulin
Just a few basic tests to make sure fb modifiers can be used and behave sanely when mixed with the old set_tiling API. v2: * Review feedback from Daniel Vetter: 1. Move cap detection into the subtest so skipping works. 2. Added some gtkdoc comments. 3. Two more test cases. 4. Removed unused parts for now. v3: * Removed two tests which do not make sense any more after the fb modifier rewrite. v4: * Moved gtkdoc comments into .c file. * Moved all initialization into fixtures. * Rebased for fb modifier changes. v5: * Added bad modifier subtest. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-06igt.cocci: Replace igt_assert() with igt_assert_CMP() where possibleMatt Roper
The integer comparison macros give us better error output by including the actual values that failed the comparison. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-06lib/core: Make the start of the debug output more clearChris Wilson
I missed the quiet "Log start" between the test failure and the debug output (and so was very confused by the repetition). You have to shout at me! v2: Thomas suggested I make the end of the logging clear as well. Since I completely missed that there was a end marker, he must be right! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Thomas Wood <thomas.wood@intel.com>
2015-02-27lib/igt_core: don't add newlines in logging functionsDaniel Vetter
igt_kms extensively uses line continuation when dumping state updates at the debug level. They got badly mangled with the recent changes to for the log handling functions. Two separate fixes: - Don't prepend domain and other metainformation when it's just a continuation line. - Dont add newlines when dumping the log recorder. If someone interleaves different log level messages this will go awry, but really just don't do that. Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-27lib: add igt_assert_ltDaniel Vetter
Found one user in gem_wait.c Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>