summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
AgeCommit message (Collapse)Author
2013-07-19lib/drmtest: fix const mismatch warningDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-19lib/drmtest: add drmtest_disable/enable_prefault() functionXiong Zhang
V2: add exit handler to enable prefault (Daniel) Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
2013-07-18lib: Introduce drmtest_skip_on_simulation()Damien Lespiau
This will allow us to explicitely blacklist tests we don't want to run on simulation. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18lib: Rename IGT_QUICK to INTEL_SIMULATIONDamien Lespiau
It's more accurate this way as the quick mode is really useful for in the simulation environment. v2: Use the INTEL_ prefix to have a chance to share the same environment variable as piglit OpenGL tests Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-03Make the failure message for drm_open_any() more specificChris Wilson
Do not suggest retrying as root if we already are.
2013-07-03Avoid corrupting the exitcode with a failure to open a quiescent fdChris Wilson
In the atexit handler, we attempt to quiesce the GPU. This involves opening a fd - which will fail if the test is not being run as root and will obliterate the test status and pollute the output.
2013-06-29lib/drmtest: set default sighandler for QUIT in the signal processDaniel Vetter
Otherwise the thing doesn't reliably die when run from the piglit framework somehow. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-06-07lib: fix drm_fourcc.h include pathImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-06-06tests: add kms_renderImre Deak
Add a test going through all connectors/crtcs/modes/formats painting to a front FB with CPU or painting to a back FB with CPU and blitting it to the front FB. Only formats understood by cairo are supported for now. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06lib: refactor kmstest_create_fbImre Deak
Factor out parts that will be used by an upcoming patch adding kmstest_create_fb2. Also call the fb paint functions directly, there is not much point in passing a function pointer for that. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06lib: add kmstest_get_connector_configImre Deak
This is used by multiple test cases, so make it shared. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06lib: use kmstest_cairo_printf_line in paint_markerImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06lib: add kmstest_cairo_printf_lineImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> [v3: fix mode printing in paint_output_info() botched by debugging leftover :/ ]
2013-06-06lib: move connector_type_str and co to drmtestImre Deak
These are used by multiple test cases, so make them shared. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-05-28tests/lib: make sure the GPU is idle at test start and exitImre Deak
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64270 v2: - Make sure also that the GPU is idle at start and error exit of any test using drm_open_any(). (Daniel) v3: - actually call gem_quiescent_gpu() at exit Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-28lib: make sure all rings are idle in gpu_quiescent_gpu()Imre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-22lib: export the exit handler interfaceImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-22lib: fix exit handler when multiple handlers are registeredImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08lib: add helper to set VT graphics modeImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-03i-g-t: check kernel enable rings or notZhong Li
1. add functions check kernel enable a ring or not. 2. add function gem_get_num_rings() to check how many rings kernel has enable. 3. gem_ring_sync_loop.c will call gem_get_num_rings() directly instead of original static fucntion get_number_rings(). Signed-off-by: Zhong Li <zhong.li@intel.com> [Ben: Wrapped commit message + whitespace fixes] Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-26Check for vebox support before testingChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63941
2013-04-08lib/drmtest: tune down signal handler statsDaniel Vetter
Avoids tests with a spurious WARN result in piglit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-22lib: Add a comment about why we only parse long options for subtestsDamien Lespiau
For thet next one wondering about that. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04lib: Factor out a function to check if an environment variable is setDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-02-13lib: Add a way to specify values for "quick" runsDamien Lespiau
In some environments, we don't really want to loop 100000 times or allocate 152352621 buffers because it makes the tests too long to run. This adds a way to specify "quick" values to reduce the time taken by certain tests. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-17lib: extract kmstest_get_pipe_from_crtc_idDaniel Vetter
2012-11-28lib/drmtest: subtest infrastructureDaniel Vetter
To make these helpers as least invasive as possible simply initialize the options with a getopt parser and let the control flow be steered with a simple helper which gets the subtest name as an argument. The only tricky part for using it is that the subtest check helper doubles up as the conduit to enumerate tests (and in that mode prevents any test from being run). It is therefore important that nothing gets printed to stdout outside of these checks. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28tests: dont polute stderr if the test succeeds/skipsDaniel Vetter
Results in spurious 'warn' results in piglit. Also don't print progress indicators when not outputting to a terminal. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-16drmtest: add function to remove an DRM FBImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10fix warn: 'div' shadows a global declarationImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-09lib: remove auto-quiescenting of the gpuDaniel Vetter
In retrospective, this is an ugly idea. Any tests that needs this can call it themselves.
2012-10-09lib: make drmtest_progress more robustDaniel Vetter
2012-10-02lib: helper to convert gem_hanlde to drm_intel_boDaniel Vetter
2012-10-01drmtest: use do_or_dieDaniel Vetter
2012-08-30clang: Fix warnings found through clang.Ben Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-27Add bare-metal interface to adjust cacheing (i.e. snoop status) of a boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26tests/testdisplay.c: Add a option '-r'.Yi Sun
With the option '-r', the testdisplay could paint a 2-D bar code(QR bar code) on the screen. The word "pass" is hiden in the bar code image. Further more, with this option, testdisplay will wait until a system signal 'SIGUSR1' coming after each mode setting. This function is for another program to control testdisplay. danvet: Fix up the missing static. Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23tests: add basic re-importing prime testDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-14context: update for new execbuf2 elementBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-04test/gem_gtt_speed: Add a baseline test for the performance of a CPU mmapChris Wilson
When looking at the pwrite/pread/wc performance, it is useful to judge that against the performance of an ordinary CPU mmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22lib: extract kmstest_dump_modeDaniel Vetter
2012-05-22lib: extract kmstest_create_fbDaniel Vetter
We should get more kms tests soon, and not needing to copy-paste a nice test pattern should be useful. That establishes a firm depency of i-g-t on cairo over everything, but I don't care so much about that. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22tests: use drm_open_any moreDaniel Vetter
And fix it up to not leak open fds, which kills all the master only stuff.
2012-04-22tests: add gem_unfence_active_buffersDaniel Vetter
Unfortunately this requires slab poisoning to catch anything :( Also add a new helper to drmtest to get the available fence count. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-12Use mmap64() for performing the GTT mappingChris Wilson
Although the address space for GTT mappings may only be 32-bits, we need to use the explicit 64-bit mmap interface so that on a 32-bit platform the offset we pass is not truncated to 31-bits. Fixes gem_mmap_offset_exhaustion on 32-bit platforms. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-10drm/i915: extract card gettingBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-03-29Make the assertions guarding syscalls (drmIoctl in particular) verboseChris Wilson
Currently all we see is gem_read: ret == 0 failed, where it would help to see the errno and/or the ret. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-22tests: adapt storedw tests to ppgttDaniel Vetter
MI_MEM_VIRTUAL actually means use global gtt now, not setting the bit means use ppgtt. On previous gens, not setting the bits ment 'use physical memory'. So what, the usual confusion. Note that for some odd reasong this is broken on gen6, but only on the bsd ring. Unexpected. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-20tests: add gem_mmap_offset_exhaustionDaniel Vetter
This also adds a gem_madvise helper to lib/drmtest.c Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11lib/drmtest: fixup copy&paste printf format issueDaniel Vetter
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>