summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-04-14test: Add test for checking if page flip changes tilingAnder Conselvan de Oliveira
Test that a page flip from a tiled buffer to a linear one works correctly. First, it sets the crtc with the linear buffer andr generate a reference crc for the pipe. Then, the crtc is set with the tiled one and page flip to the linear one issued. A new crc is generated and compared to the rerence one. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2014-04-13lib/kmstest: Fix up tiled buffer creationDaniel Vetter
When extracting a raw __gem_set_tiling helper I've fumbled this in commit 590f6101402b51bca54f69c002380bda967484ea Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Oct 9 20:50:50 2013 +0200 lib/drmtest: extract rawer __gem_set_tiling Fix things up so that we properly propaget the error again. Now to make this all properly work we also need to make kms_flip a notch more robust against such failures ... This only blows up on gen2/3 with the pan tests which want a too wide framebuffer for tiling. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-10tests/gem_reset_stats: fix length check in inject_hangMika Kuoppala
To avoid writing past the batch end. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-10tests/gem_reset_stats: check gpu state before each subtestMika Kuoppala
Some tests, namely the close pending variety, tries to carefully drop all handles to gpu when hang is intruduced, to expose bugs in reset handling without any clients. Add guards after and before tests to really know if the gpu is still alive as the particular test might report success and then gpu dies few seconds after. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-10tests: use lib igt_[get|set]_stop_rings()Mika Kuoppala
on gem_reset_stats, kms_flip and pm_rps. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75876 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-10tests/gem_reset_stats: end hanging batch properlyMika Kuoppala
As we use chained batch into itself to hang the gpu, there was no need to end the batchbuffer with BATCH_BUFFER_END. With the introduction of command parser, the batch need to have proper BATCH_BUFFER_END in it or it will be rejected. While at it, shift the upper half of batch gtt_offset accordingly with gen8+ Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-09tests/gem_exec_parse: Test for OACONTROL trackingBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-07gem_tiled_swapping: Test using all available fencesChris Wilson
Use extra threads to cause extra memory pressure and stress upon the relevant code. Limit the number of threads to available fences to avoid falling off the fence cliff. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-07gem_tiled_swapping: Purge all page/swap caches firstChris Wilson
Reset the system to a vanilla state before we query how much RAM/swap space is available for our testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-04tests/pm_pc8: skip tests when no screens are connectedPaulo Zanoni
Instead of failing, just skip the tests. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73642 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-04-04tests/pm_pc8: add missing newlinePaulo Zanoni
Otherwise the output will get even more confusing. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-04-03tests/gem_cmd_parse: restrict to gen7Daniel Vetter
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76982 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-03gem_tiled_swapping: Limit to available memoryChris Wilson
If there is not enough free RAM+swap for us to execute our test, we will hit OOM, so check first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-02tests: create files that list the available testsThomas Wood
Add Makefile targets to create two text files containing the list of available single and multi-test programs. This enables the tests to be enumerated without requiring the build system. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28intel-gpu-tools: fix some include path problems on android buildstgore
When building within the android tree (specifically in /external) the compilation fails due to the wrong versions of some header files getting picked up. This commit adds some include paths to ensure the correct headers are found Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26tests/pm_rps: Add a new testcase to provoke the "stuck at max" bugDaniel Vetter
Note that the sleep(5); to fully idle the gpu is _really_ important. Without it the bug is not exhibited. The issue at hand is that after gem_quiescent_gpu we are at max (expected, since the blocking waits peg to max), but then we never go down to a lower freq again until we're fully idle. The tiny load is sufficient to keep the gpu at max. I've played around with this a bit and even ridiculously low loads (like one MI_STORE per 50ms) are enough to keep the gpu at max freq. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26tests/pm_rps: quiescent harderDaniel Vetter
Apparently some rps chips are prone to stick to max once you're there. And all the synchronous waits in gem_quiescent_gpu are _really_ good at forcing the kernel to go full throttle. And even a positively tiny load (one MI_STORE_IMM per 50 ms) is enough to eternally keeep it there, which means the first idle measurement of the freqs before we do the reset it completely busted. Just add a wait before the tricky test and call it a day. Option b) would have been to now have this tiny load, but I think a good reminder how quirky rps is is always welcome. Just in case we start sleeping too easy at night. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74956 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26testdisplay: make termio unbufferedJesse Barnes
So hotkeys take effect immediately.
2014-03-26lib/igt_fb: setup font in igt_get_cairo_ctxDaniel Vetter
We always want the same boring one, so extract it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: switch to igt_ prefix from kmstest_Daniel Vetter
Shorter and more in line with our general igt_ prefix for everything which isn't somehow intel or i915-gem or otherwise hw specific - these helpers here are all fully generic framebuffer handling functions based on kms + cairo. Well, the actual buffer alloc is done with i915 gem, but meh ;-) Two special cases: - bpp_depth_to_drm_format and drm_format_to_bpp completely lacked prefixes, so just add igt_. - write_fb was a bit misleading given that we have gem_write for uploading to buffers. Rename that to write_fb_to_png to make it crystal clear what this thing does even without looking at docs. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_kms: s/kmstest_create_fb2/kmstest_create_fb/Daniel Vetter
Simplify the name since the old _fb function is now gone. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib: remove kmstest_create_fbDaniel Vetter
Use the new-style function using drm fourcc codes instead everywhere. To easily use thew fourcc based interface also expose bpp_depth_to_drm_format from the library. Finally include drm_fourcc.h from the igt_kms.h header since pretty much everyone needs this now. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_core: fix igt_skip_on_simulation regressionDaniel Vetter
I've forgotten that we might want to call this from within specific subtests (or special helpers like the autoresume one). Also props for being competent enough to write a testcase, but incompetent enough to botch the job up. Fix both things and remove a leftover debug printf while at it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: fixups for the recent massive refactoringDaniel Vetter
I think we might have some use for a do_ioctl_expected_errno or some such thing. But that's for later. Cc: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Test a command crossing a page boundaryBrad Volkin
This is a speculative test in that it's not particularly relevant today, but is important if we switch the parser implementation to use kmap_atomic instead of vmap. Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_ENDBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Add tests for bitmask checksBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Add tests for register whitelistBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests/gem_exec_parse: Add tests for rejected commandsBrad Volkin
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25tests: Add a test for the command parserBrad Volkin
Start with a simple testcase that should pass. v2: Switch to I915_PARAM_CMD_PARSER_VERSION Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-24tests/gem_reset_stats: run non hw context tests also on older gensMika Kuoppala
To gain more coverage on interface, default context and banning. As there is no proper reset support for gen <= 3, we only do limited interface testing on those. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23tests/pm_rps: fixup the blt copy load helper changesDaniel Vetter
All suggested by Jeff McGee. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib: extract igt_aux.[hc]Daniel Vetter
And shovel all the various helpers in there. Also move igt_set_vt_graphics_mode to igt_kms.h since the function is implemented in igt_kms.c. And it fits better. I kinda missed this in the prep work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/Daniel Vetter
This is prep work to extract a new igt aux library with all kinds of random stuff. Also give it a bit a more suitable name to indicate that this is just a flag and doesn't do the aub dumping itself. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: rename intel_gpu_tools.h to intel_io.hDaniel Vetter
With the header cleanup we can now give this header a suitable name, since it now really only contains register access and other I/O functions and assorted definitions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 2Daniel Vetter
I've left unistd.h in it - it's not strictly required but most users of drmtest.h want it for the open helpers, and then you kinda need to close that file descriptor again ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: more unecessary header removalDaniel Vetter
This time big with media_fill.h Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: remove uncessary #includes from headersDaniel Vetter
Only include what the header itself needs. The big fish here is intel-gpu-tools.h. More will follow. One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one of which was broken. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22tests|lib: remove assert.h includesDaniel Vetter
Only the igt core and non-test tools should have asserts to catch internal errors, tests and helper libraries should all user igt_asert instead. Fix things up where assert instead of igt_assert was used. One tiny step towards header sanity. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: drop cpu_mapping from igt_bufDaniel Vetter
It's unused. There's still num_tiles getting in the way of things, but that is used by gem_stress a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcsDaniel Vetter
Now everything is prepared to pour some neat api docs over this all. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: igt_ namespace for the buffer structureDaniel Vetter
Step one to properly namespace the rendercpy/mediafill functions. Als give the buf_height/width helpers a proper igt_ prefix. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: make media_fill.h an internal headerDaniel Vetter
Same deal as with rendercopy.h. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: make rendercopy.h an internal headerDaniel Vetter
And move the public interfaces into intel_batchbuffer.[hc]. A bit messy since we are fairly inconsistent with our header #include handling. Also exclude rendercopy.h from the documentation. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22tests/kms_cursor_crc: Fix up breakageDaniel Vetter
I've accidentally broken the new cursor size extensions, but it wasn't quite correct before already: Variables which are set in igt_fixtures _must_ be outside of the stackframe of the igt_fixture block. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: allow igt_skip_on_simulation outside of fixtures.Daniel Vetter
Thomas noticed that in simulation mode a lot of the tests fall over instead of skipping properly. This is due to recently added self-checks which ensure that any call to igt_skip happens either within a fixture or subtest block (or it's a simple test without subtests). This is to catch bugs since pretty much always not wrapping up hardware setup and checks into these blocks is a bug. Bug simulation skipping is a bit different, so allow that exception. Otherwise we'd need to fix up piles of tests (and likely need to play a game of whack-a-mole). Also add a library testcase for all the different variants to make sure it really works. Cc: Thomas Wood <thomas.wood@intel.com> Cc: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-21fix out-of-tree buildsAdrian Negreanu
version.h is -include-ed assuming that builddir is the same as srcdir; In file included from <command-line>:0:0: ./../../tests/../lib/check-ndebug.h:3:1: fatal error: ../../tests/../version.h: No such file or directory #endif ^ v2: Use top_builddir as suggested by Damien - builddir gets expanded to ./ which worked accidentally since automake includes top_builddir by default. Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-20tests/kms_cursor_crc: Review from Imre for Sagar's patchDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-20kms_cursor_crc: Enabling this test for all cursor sizesSagar Kamble
v1: Added 128x128 and 256x256 cursor size support. v2: Refined the test to use igt_subtest_f and automate enumeration. v3: Restructuring test enumeration using drmGetCap. [Daniel's review comments] Signed-off-by: Sagar Kamble <sagar.a.kamble@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>