summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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>
2015-01-07igt/gem_evict_(alignment|everything): contend with GPU hangsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_concurrent_blit: Inject hangs before verifying contentsChris Wilson
After setting up the copy operations, add a hanging batch. This should mean that we complete the copy and the compare then races against the GEM reset. Hopefully, this will catch driver bugs where the target object is no longer accessible after the hang. Note: hang injection is disabled until the required kernel interface is completed. But there are useful additional tests here... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06ioct_wrappers: Add some mmap(wc) blurb dropped between authorsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06Don't try to use CLOCK_MONOTONIC_COARSE on OS'es that don't support itAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Provide sighandler_t fallback for non-GNU-libc platformsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Need to #include <libgen.h> for basename() on SolarisAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Use pthread calls instead of raw syscalls on non-Linux systemsAlan Coopersmith
Raw system calls aren't portable to other kernels. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Solaris needs to #include <sys/kd.h> instead of <linux/kd.h>Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Fix #ifdef check for _SC_AVPHYS_PAGES in intel_get_avail_ram_mb()Alan Coopersmith
Check for the sysconf value used here, not the one used in the previous function. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_mmap_wc: Exercise mmap(wc) interfaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-05lib/core: Fix compile error from rebasingChris Wilson
s/KMSG_INFO/KERN_INFO/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-05lib/core: Show the exitcode in kmsg as wellChris Wilson
This provides symmetry with logging the start of the test via kmsg. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18lib/gen8: Make rendercopy threadsafeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18lib: random() is too slowChris Wilson
random() being a good multithread-safe RNG is too slow to be used in stress tests, especially for a seemingly trivial task of randomising the order of an array. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-12lib: fix a few documentation warningsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12Android.mk: replace std=c99 with std=gnu99Tim Gore
The android makefiles were passing the -std=c99 flag to the compiler which disables the typeof keyword. This causes a build fail for a recent addition to igt_aux.h. Change this to -std=gnu99, which is the flag used in the linux build Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12lib: Fix out of tree build of version.hJoonas Lahtinen
Write the version.h.tmp file into the build directory instead of source directory. This allows out of tree building when those two are not the same. Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11lib: add a function to lock memory into RAMThomas Wood
Add a function to lock memory into RAM and use it in the gem_tiled_swapping test to reduce the amount of allocated memory required to force swapping. This also reduces the amount of time required for the test to complete, since the data set is smaller. The following durations were recorded with gem_tiled_swapping on a haswell system before the change: Subtest non-threaded: SUCCESS (55.889s) Subtest threaded: SUCCESS (810.532s) and after: Subtest non-threaded: SUCCESS (11.804s) Subtest threaded: SUCCESS (268.336s) v2: add various assertions and requirements and make sure gem_tiled_swapping works on systems with less RAM (Daniel Vetter) v3: fix allocation size calculation Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11lib: add optional log domain filteringThomas Wood
v2: add an "application" filter for the default domain (used by applications) Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11lib: introduce log domainsThomas Wood
Log domains can be used to identify the source of log messages, such as the test being run or the helper library. v2: Add separate domains for different parts of the helper library and use an empty default domain for applications. Expand the log output to include the process name and the log level of the message in addition to the domain and pid. Print the expanded message only for warning and debug messages. v3: check for glibc before using program_invocation_short_name Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-09lib/igt_debugfs: Throw away the two first CRCsVille Syrjälä
On CHV we sometimes see not just one but two bad CRCs. No real idea what would cause that, but let's just throw away the second CRC as well to gain some stability for the tests. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08lib/igt.cocci: Deal with min/max/swapVille Syrjälä
Replace open coded min/max/swap with the macro invocation. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08lib: Add swap() macroVille Syrjälä
swap() will swap its two arguments while keeping the required tmp variable hidden. Makes for neater code. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-04lib: always reset connectors after the state is forcedThomas Wood
Install the exit handler to reset connector states whenever kmstest_force_connector is called, so that the connector states are always reset even if a test fails. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04lib: remove igt_edid.hThomas Wood
This has been replaced by igt_kms_get_base_edid(). Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04igt_kms: add a base edidThomas Wood
Add a basic edid block that includes several different display modes. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04docs: add a glossary of test name termsThomas Wood
Add a glossary of test name terms based on the details in tests/NAMING-CONVENTION. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04lib: Add GPGPU fillZhenyu Wang
This is to add fill operation using GPGPU pipeline which is similar to current media fill. This can be used to simply verify GPGPU pipeline and help to enable it on newer HW, currently it works on Gen7 only and will add support on later platform. Now this sets very simply thread group dispatch for one thread per thread group on SIMD16 dispatch. So the fill shader just uses thread group ID for buffer offset. v2: No new fill func typedef but adapt to igt_fillfunc_t. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-12-04lib: rename igt_media_fillfunc_t typedef to igt_fillfunc_tZhenyu Wang
This makes fill function more general to prepare for other fill method using GPGPU pipeline. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-11-25lib: ensure subtests are not added to simple testsThomas Wood
Simple tests do not support subtests, so fail if igt_subtest is used in one. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25lib: fix symbol names in documentation commentsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25demos/intel_sprite_on: Added support to compile intel_sprite_on on Android.Gagandeep S Arora
Added Android.mk for intel_sprite_on. v2: Addressed review comments by Daniel Vetter. - Moved the cairo independent functions from igt_kms.c to igt_aux.c. Signed-off-by: Gagandeep S Arora <gagandeep.s.arora@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25lib: fix igt_reset_connectorsThomas Wood
Use igt_debugfs_open to open the connector file, since the forced_connectors array now only stores the connector path relative to the debugfs path. Also add some extra error checking to ensure a test failure if the reset fails. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85829 Signed-off-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-24lib/igt_debugfs: Don't setup crc in _newDaniel Vetter
The problem is that this causes writes to registers, and if the pipe is off they might go nowhere (e.g. when runtime pm is enabled). Furthermore we can only really check once the modeset setup is done, but again most tests set up the CRC structure before calling igt_commit and friends. We could add crc restore support to the kernel's rpm code, but that will end up being rather invasive and fragile hard-to-test code. Now originally this was needed back when CRC support wasn't available everywhere. But that's fixed now. So given all this just drop that sanity check and make sure that we only touch the debugfs file (and so the hw state) when we know the pipe is running in the desired configuration. A complementary kernel patch will try to catch offenders by returning -EIO if the pipe is off. v2: Forgot to git add one hunk. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-18lib/aux: Make it clear that rtcwake failures aren't bugsDaniel Vetter
Because QA has a bunch of shitty machines with old distros and tends to re-port this all the time. References: https://bugs.freedesktop.org/show_bug.cgi?id=82232 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17lib/os: Push simulation test down into intel_require_memoryDaniel Vetter
This has the upside that we'll never forget to add it to thrashing tests. But we'll also never miss to move it when adding basic functionality tests to existing binaries. Chris already started this refining work in e.g. commit d77eda6614a1955717f224be023dedf74eb7735d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Nov 14 07:45:40 2014 +0000 igt/gem_linear_blits: Require that we do the full test by moving igt_skip_on_simulation into subtests. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17lib/os: Pust igt_require into memory check functionDaniel Vetter
More in line with the usual igt pattern and simplifies the code - every called just wrapped it in igt_require. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-14tests/pm_rpm: add gem-evict-pwrite subtestImre Deak
This triggers a device suspended WARN in the kernel in gen6_ggtt_insert_entries() while calling the GEM pwrite ioctl. The sequence is suggested by Daniel. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-13lib: only skip subsequent tests if a timeout occurs outside of a subtestThomas Wood
Make timeout behaviour more consistent with igt_fail, where subsequent subtests are only skipped if the failure occurs outside of a subtest. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718 Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-13lib/tests: add a test for igt_set_timeoutThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06tests: use igt_debugfs where possibleThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06lib: add the ability to include a description with a testThomas Wood
The IGT_TEST_DESCRIPTION macro can be used to define a description for a test. v2: Remove semicolon from end of macro (Damien Lespiau) Add API documentation for the macro. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06lib/tests: don't use hard error status to indicate test failureThomas Wood
An exit status of 99 is reported separately in the test summary as an error, rather than as a test failure. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06lib/tests: fix tests and test list locationThomas Wood
The igt_command_line.sh script was moved by commit 685e577 (Move library selftests to lib/tests), but the location of the tests and the test lists was not updated. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06Mediafill/skl: Remove redundant field to fix GPU hangZhao Yakui
After applying the commit(982f7eb238a0898c456e0574dee7c4507738d75f), the OUT_RELOC is updated on Broadwell and later, which is to handle the 64-bit field of gfx address internally. In such case some commands should be fixed, otherwise GPU hang will be triggered when running gem_media_fill. (It is already fixed on Broadwell) Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>