summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2013-10-24lib: Add a function to dump a scratch buf into a pngDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-21lib: Check pipe source validity in igt_pipe_crc_new()Ville Syrjälä
Have igt_pipe_crc_new() check whether the selected source is actually supported. v2: Make debugfs_pipe_crc.c not crash Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21lib: Allow pipe_crc_free(NULL)Ville Syrjälä
Prevent pipe_crc_free() from segfaulting on NULL ptr. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21lib/drmtest: Add kmstest_paint_color_alpha()Ville Syrjälä
kmstest_paint_color_alpha() just like kmstest_paint_color() except you also get to specify the alpha channel. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-20kmstest: don't pollute stderr for impossible output configsDaniel Vetter
Otherwise on machines where the only output available is restricted to one pipe we'll have tons of "warn" results for no gain in the piglit runner. All tests that use the kmstest helpers already check the return value and do something sensible (like skip the tests if there's really no config available). Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-18rendercopy: Add a way to dump an .aub file with the rendercopy bosDamien Lespiau
v2 (by Ben): Remove libdrm dependency since intel-gpu-tools now requires a higher version anyway. Remove associated #ifdef ENABLE_AUB_DUMP Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-10-18lib: fix the assert in igt_stop_helperDaniel Vetter
So much for developing different patches on different machines and then not retesting after rebasing. Reported by Ben on irc. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-18lib: Don't wait for a vblank when enabling the CRCsDamien Lespiau
This was a previous attempt to solve the first CRC being bogus. We know wait for it and discard it at the end of the function. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-17tests/debugfs_pipe_crc: fall back to PIPE sourceDaniel Vetter
With PLANE1 and PIPE CRC sources the test will work on all currently shipping (and planed fwiw) platforms. Also add all the other new sources for non-ivb/hsw chips. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-17lib/drmtest: Check that helper processes have died correctlyDaniel Vetter
If the test gets stopped sometimes a helper process falls over. We need to report this. Since we currently don't track helper process to precisely we can't shut up the 2nd test failure messge. This shouldn't happen anyway. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-15debugfs_pipe_crc: Let's check CRCs!Damien Lespiau
Let's add a new test that sets a mode, wait for a few vblanks (3) and then make sure we read 3 identical CRCs. Some subtests check for various parsing errors. In the process, improve the debugfs helpers to deal with CRCs. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15lib: Add igt_wait_for_vblank() helperDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15lib: Make igt_debugfs_open() take the mode as argumentDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15lib: Add a igt_display.h with a few enums and defines from the kernelDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15lib: Add kmstest_paint_color()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15lib: Add a igt_assert_cmpint()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15lib: Add igt_debugfs_fopen()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15lib: Add a small helper to open debugfs filesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-10tests/gem_suspend: test debugfs/sysfs reads while s/rDaniel Vetter
Just a very quick hack cobbled together with /bin/sh and exec. We can't use system since that does stupid things with singals ... Still we need to whack the child process pretty hard to get rid of it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-09lib/drmtest: extract rawer __gem_set_tilingDaniel Vetter
For tests that expect failures. Also apply the existing gem_set_tiling helper a bit wider. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-30lib: Adjust dump_modes() to the new stereo encodingDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30testdisplay: Use DRM_MODE_FLAG_3D_MASKDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30lib: Add a helper to write a png from a struct kmstest_fbDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30lib: Split create_image_surface() out of create_cairo_ctx()Damien Lespiau
So we can use it in the next commit. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30lib: Add a helper to paint a PNG using cairoDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30lib: Dump information about the supported 3D stereo formatsDamien Lespiau
When dumping the details of a mode, let's add the 3D formats the mode supports. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-19lib/drmtest: Improve printf-like igt_skip_on/requireDaniel Vetter
Ben Widawsky suggested to use vasprintf, which perfectly fits the bill. Also fix the logic conversion bug in tests/gem_storedw_batches_loop that crept in again :( Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-19lib/drmtest: igt_assert|require with format stringsDaniel Vetter
v2: Add a comment about the pitfalls around va_list handling. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-17lib/drmtest: check that igt_exit is called for subtest testsDaniel Vetter
I get this wrong for almost every conversion to subtests ... v2: Don't install the check when just listing subtest names. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-13lib/drmtest: ducttape over fork raceDaniel Vetter
Whatever the reason (and I've thought there isn't one) if we fork and kill right away the child seems to not reliably die. We can work around this little race by forcing the default SIGQUIT handler. This should break anything since we reset our atexit handling anyway, so if the helper needs any atexit handling the special signal helpers will be reinstated. Note that inserting sufficient amounts of printf between the fork and kill makes this unnecessary. While add it also add the retry loop for the waitpid call, in case there's another guy constantly interrupting us. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-13lib/drmtest: skip suspend tests in simulationDaniel Vetter
The simulator doesn't like this nor really support it :( v2: We've tried to a more gentle resume testing using the pm_test infrastructure, but that alos failed. So add a FIXME comment that we need to improve things a bit here. Cc: Ben Widawsky <benjamin.widawsky@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-12lib/drmtest: drop unused oldsig variabelDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: Restore default sighandlersDaniel Vetter
Forked tests ended up restoring the sighandlers already inherited from the parent, resulting in endless signal loops through our atexit handler. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: don't frob signals in __igt_fork_helperDaniel Vetter
We shut up the exit handlers already by clearing the array. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: clean up children in an exit handlerDaniel Vetter
Also be a bit more careful with killing them in general. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: handle SIGBUS in the exit handlersDaniel Vetter
Our kernel likes to occasionally kill process with a SIGBUS when this shouldn't ever happen. Hence also handle this signal in the exit handler infrastructure. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: Reject igt_fork from within igt_fork earlierDaniel Vetter
We reject it in igt_waitchildren already, but earlier is better. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: Fix igt_stop_signal_helper for subtest listingDaniel Vetter
We need to bail out early for otherwise we'll hit the !signal_helper->running assert. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: skip when prefault control isn't availableDaniel Vetter
Instead of crashing with an igt_assert. Fixes the only crashing test when running igt on non-intel systems. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-11lib/drmtest: Use ARRAY_SIZEDaniel Vetter
Less fragile ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-10lib/drmtest: double-check that we clean up helper processesDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-10lib/drmtest: consolidate the helper process killing in one exit handlerDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-10lib/drmtest: create helpers for forking helper threadsDaniel Vetter
The upshot is that we can share the logic to make sure the helpers are all properly stoved again in a 2nd step. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-08lib/drmtest: fixup for the prefault reworkDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-08lib/drmtest: Avoid calling exit handlers multiple timesDaniel Vetter
- reset the count when forking - don't add the same handler multiple times - don't restore the exit signal handlers in the forked helper process - reset the exit handler count once called to make sure we don't call it multiple times when dying - don't wait for the signal helper if it's gone already Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04lib: fix the fix for gen5 workaround emmisionImre Deak
Fix the regression introduced in commit bfbe813f8fb587017c4e1d73c51395c2837eb395 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue May 29 22:14:06 2012 +0200 lib: fix gen5 workaround emission Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-09-04lib/intel_batchbuffer: remove code w/o effectImre Deak
Introduced when refactoring the patch in commit c1ee0bb53269ded7b79966d081518d689639bac7 Author: Imre Deak <imre.deak@intel.com> Date: Mon Jul 29 16:43:31 2013 +0300 intel_batchbuffer: add support for non-32bit blt copies No functional change. Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-09-04lib/drmtest: add igt_skip_on macroDaniel Vetter
I've fumbled the logic inversion when converting to igt_require way too often, so lets add something for dummies like me ;-) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03lib/drmtest: use igt_require/assert in the prefault helpersDaniel Vetter
2013-09-03lib/drmtest: include sys/mman.h from drmtest.hDaniel Vetter
We need it for mmapping to get at PROT_READ|WRITE anyway. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>