summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2013-11-06bdw: Update obvious missing blit supportBen Widawsky
This provides a macro that allows us to update all the arbitrary blit commands we have stuck throughout the code. It assumes we don't actually use 64b relocs (which is currently true). This also allows us to easily find all the areas we need to update later when we really use the upper dword. This block was done mostly with a sed job, and represents the easier in test blit implementations. v2 by Oscar: s/OUT_BATCH/BEGIN_BATCH in BLIT_COPY_BATCH_START CC: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
2013-11-06bdw: Add gen8 specific instdone bitsDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06bdw: Add gen8 to intel_gen()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06bdw: Add gen8 to the IS_9XX() macroDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06pciid/bdw: Add Broadwell PCI idsBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06chipset: IS_I9XX macroBen Widawsky
This isnt useful in IGT, but it will allow us to keep the merge process with libdrm simpler. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-05lib/drmtest: Retire requests via drop caches after gem_quiescent_gpuOscar Mateo
This helps make sure that the GPU is really quiescent by getting rid of any residual stuff. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04lib: drop return value from igt_drop_cachesDaniel Vetter
No one actually cares, everyone expects it to just work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04lib: Add igt_drop_caches_set()Oscar Mateo
This is basically a "drop cache" interface to the igt_debugfs facilities. Also, update existing users. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: add igt_main macroDaniel Vetter
In the past new testcases with subtest often forgot to add the call to igt_exit at the end of their main() function. That is now caught with a bit more obnoxious asserts, but it's still a nuissance. This little igt_main macro takes care of that (and also of calling the subtest machinery initialization code correctly). If no one objects I'll roll this out for all the simple cases (i.e. those tests that don't have additional argv parsing on top of the subtest machinery). v2: Roll it out across the board. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: make igt_install_exit_handler never failDaniel Vetter
Most callers didn't bother checking, so just move the asserts into the function itself. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: make igt_set_vt_graphics_mode never failDaniel Vetter
All tests agree that this is a letal failure, so no point to pass it back to callers. Also add some igt_require calls for the drm_fd where I've noticed that it's missing. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: consolidate pipe crc exit handlerDaniel Vetter
No need to sprinkle this all over: - exit handlers will only be registered once - they're always called when exiting, so no need to explictly call them. This allows us to hide all the pipe crc cleanup in the library. Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01tests: use "auto" pipe CRC sourceDaniel Vetter
Makes stuff work on DP ports on gmch platforms automatically. Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: fix igt_exit assert when only listing subtests.Daniel Vetter
Ooops. Reported by Paulo. Also add a new testcase for make check to make sure this actually works. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: Don't forget to close the pipe ctl fd in igt_pipe_crc_reset()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-29lib/drmtest: Scream harder when igt_exit isn't called for subtest testsDaniel Vetter
We really need this since otherwise the magic return value handling for running testcases with piglit (or on QA's validation infrastructure) doesn't work properly. We need to be careful though to only install this check on success. See also the previous commits to sprinkle igt_exit() calls over all the tests that missed it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-28lib: Add a drm_open_any_render() that will try to use render nodesDamien Lespiau
I was fedup with having to run my tests as root and not being able to use my usual setup for tests that only exercise the GT part of the GPU. Render nodes to the rescue! Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-28lib: Close non intel fds in drm_get_card()Damien Lespiau
When going through card%u devices, close the ones that we were able to open but weren't intel devices. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-28lib: Remove stale commentDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
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>