summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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>
2015-02-25lib: small documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25lib/tests: update .gitignoreThomas Wood
2015-02-25lib: print the signal name to stderr when handling a signalThomas Wood
Print the received signal name to stderr when handling a signal. This uses an array of handled signal names since strsignal() only provides descriptions. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25lib: remove handled option arguments from argvThomas Wood
Remove options from argv that have been handled by getopt to allow additional non-option parameters to be processed in the test application. This fixes issues when using options such as --debug with tests that accept additional non-option parameters. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25lib: use defines for igt_simple_init and igt_subtest_initThomas Wood
Using defines removes an extra function call and prepares for changes to the command line argument handling. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-24lib/igt_kms.c: remove tests dependency on VT /dev/tty0Marc Herbert
Required to run on any recent, freon-based and X11-free ChromeOS release. v2: - igt_debug() instead of igt_warn() - return KD_GRAPHICS instead of -1UL - print previous mode in debug statements. Among others this help a tiny bit with the now confusing debug output ("cannot change" immediately followed by a misleading "mode changed"). Signed-off-by: Marc Herbert <marc.herbert@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-24tests/drv_suspend: hibernation testDavid Weinehall
intel-gpu-tools currently has a bunch of tests for suspend, but currently none (that I could find) for hibernate. Attached is a rudimentary patch to add said test. It does so by repurposing the drv_suspend driver to handle both suspend and hibernate, since the difference is miniscule. I decided to split the suspend/autoresume functions in igt_aux.c though, to be able to leave the igt_system_uspend_autoresume() function unchanged (the other option would be to introduce a boolean function argument and have that decide what parameters to pass to rtcwake). The timeout passed to rtcwake probably needs tuning (it might even need to be dynamically adjusted, since the time hibernation takes varies wildly depending on the amount of non-cache memory in use). Signed-off-by: David Weinehall <david.weinehall@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2015-02-18lib: Use strtol not strtod for overiding the PCI IDChris Wilson
Simply to avoid the roundtrip through floating points and any extra headaches from worrying about the implications Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-18lib: Cache DRM device id to reduce number of ioctlsChris Wilson
The DRM device id for the igfx is fixed, since there can only be one in the system. So once we query it for the first time we can safely report that value on every subsequent request, cutting out a lot of noisy ioctls from inside tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-17lib: small documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-17lib: print recent log messages to stderr when a test or subtest failsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-17lib: add a ring buffer for log entriesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-13lib/igt_gt: Document and consolidateDaniel Vetter
Also move forcewake and stop_rings code from igt_debugfs to igt_gt since it fits better. And move the hang injection fork helpers from igt_aux to igt_gt, too. Also push the intel_gen call into igt_hang_ring while at it. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13lib/igt_aux: s/swap/igt_swap/Daniel Vetter
It collides with the subtest naming convention glossary entry for swap. Which makes the docbook xml stuff unhappy. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctl: Document ctx param functionsDaniel Vetter
And move them so that they're grouped with the other context wrappers. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13lib/ioctl: Add gem_context_destroy helpersDaniel Vetter
We also need a raw version for some tests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctls: make gem_context_set/get_param infallibleDaniel Vetter
We have separate require checks already, so these failing is a bug in the test logic. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13igt/ioctls: doc for gem_mmapDaniel Vetter
Just spotted while driving around. gtkdoc needs the full parameter list otherwise it doesn't recognize it as a function. So add them. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctl: gem_ prefix for igt_require_mmap_wcDaniel Vetter
We stick to the overall prefix even for magic require functions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctl: api polish for gem_context_has_paramDaniel Vetter
Just push the igt_require down to align with the usual style. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13lib/gt: api polish for igt_can_hang_ringDaniel Vetter
Align with common igt library style: - Push the igt_require into the function. - Push the intel_gen into the function. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-09lib/tests: check that invalid subtest names are rejectedThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-09lib/tests: verify subtest enumeration outputThomas Wood
Check that the subtest list is not empty if using --list-subtests returns with an exit code of 0, and that the list is empty if it returns with 79. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-09lib: add exit status message to simple testsThomas Wood
Add an exit status message to simple tests, similar to the one printed for subtests. This includes the test outcome and the time taken to run the test. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-09lib: add subtest start and exit status code messages to debug outputThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-09lib: validate subtest namesThomas Wood
Subtest names should only contain '-', '_' and alphanumeric characters. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-09lib: print warning and critical messages when listing subtestsThomas Wood
These messages are sent to stderr and could indicate an issue when enumerating subtests. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-09lib: warning messages should be sent to stderrThomas Wood
This is a regression from commit df11a0f (lib: add a critical warning level). Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-02rendercopy/gen9: fix gem_render_copy 3d state setupImre Deak
Without emitting the default 3DSTATE_WM_DEPTH_STENCIL state the test will fail. Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-01-22docs: fix parsing issueThomas Wood
Use entities for the special characters '<' and '>' to avoid "<var>" being treated as a tag. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-22i-g-t: check whether kernel has dual bsd ringZhipeng Gong
v2: change the number to be consistent with upstream (Zhipeng) Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-20lib: s/IGT_DEBUG_INTERACTIVE/--interactive-debug=varRodrigo Vivi
Use cmdline variable for interactive debug instead of env var. v2: Make interactive-debug domain optional and use "all" when not set. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-19igt/drv_module_reload: Check more carefully for a live driverChris Wilson
As drm_open_any() now quietly fails if there is no driver, this nullifies the effectiviness of using gem_exec_nop as the test for a good reload. Combine with gem_alive (and guarantee that gem_alive can detect a dead driver, putting lie to commit 032f30cb38bb03562ee7fde19cd278b1d8ac31a9 Author: Thomas Wood <thomas.wood@intel.com> Date: Tue Jan 13 13:33:57 2015 +0000 lib: remove unnecessary checks on the drm_open_any return value ) first. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-16lib: use critical log level for assertion failure messagesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-16lib: add a critical warning levelThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-15lib: remove unnecessary checks on the drm_open_any return valueThomas Wood
drm_open_any always returns a valid file descriptor, so there is no need to check the return value. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-15lib/Android.mk: add -DHAVE_LINUX_KD_H to fix android buildTim Gore
commit cf93bc8df9f5f94a0aedc8b52bad0ad4e036737c by Alan Coopersmith (introduced to enable solaris builds) reqires HAVE_LINUX_KD_H to be set in order for kd.h to get picked up in igt_kms.c. This is not currently set in the Android makefile so Android builds are broken. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-12tools/intel_audio_dump: add support for CherryviewYang, Libin
This patch adds support for dumping audio registers of Cherryview. Signed-off-by: Libin Yang <libin.yang@intel.com>