summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2014-05-19igt/quickdump: vlv: dump FLISDSI regs tooImre Deak2-0/+16
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-05-19igt/intel_iosf: rename IOSF sideband opcodes according to the specImre Deak2-13/+16
These opcodes are not specific for an endpoint, but are the same for all endpoints. So rename them accordingly, using the name the VLV2 sideband HAS uses. Also move the macros to the .c file, since they aren't used anywhere else. Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-05-16lib/igt_fb: igt_create_fb_with_bo_sizeOscar Mateo2-7/+41
Useful for testing bigger/smaller fb-wrapped buffer objects. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-05-15lib/igt_aux: Extract runtime pm helpers from pm_pc8Daniel Vetter2-0/+125
I want to use them elsewhere ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14lib/igt_core: Fixup docs with symbolic exit codesDaniel Vetter1-3/+4
Conflict between me and Thomas pushing patches in parallel. Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14lib: add exit status definesThomas Wood2-12/+34
Add defines for success, skip and timeout exit statuses. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-05-14lib: set a timeout when reading crc valuesThomas Wood1-0/+3
Signed-off-by: Thomas Wood <thomas.wood@intel.com> Acked-by: Damien Lespiau <damien.lespiau@intel.com>
2014-05-14lib: add igt_set_timeoutThomas Wood2-3/+43
Add a function to stop and fail a test after the specified number of seconds have elapsed. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Acked-by: Damien Lespiau <damien.lespiau@intel.com>
2014-05-13lib/igt_core: Fix type on igt_log docDaniel Vetter1-1/+1
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-13lib/igt_core: Document testrunner interface a bitDaniel Vetter2-0/+24
Also fix up one gtkdoc fumble in igt_fb. We should use symbolic defines if possible instead of just listening the magic 0, 77, 78 values for exit codes, but that's a separate patch. Cc: tim.gore@intel.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-12intel-gpu-tools: Build tests needing cairo if ANDROID_HAS_CAIRO=1Tim Gore2-10/+16
Until now the tests that depended on libcairo were simply skipped in the android build. Now that I have a cairo port working, build these cairo dependent tests if ANDROID_HAS_CAIRO is set to 1 in the environment. For information on building cairo for IGT on Android see the wiki at: https://securewiki.ith.intel.com/display/GFXCore/IGT+Test+Suite+on+Android Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-05gem_alive: A utility to see if the driver or GPU has hungChris Wilson1-0/+1
2014-04-30lib: extract kmstest_set_connector_dpmsDaniel Vetter2-0/+29
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-29Add Cherryview PCI IDsVille Syrjälä1-1/+11
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-25test: Fixup for the previous patchDaniel Vetter1-1/+1
Oops, failed to git add. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-25Reset errno to 0 after successChris Wilson3-9/+26
errno is only valid after a syscall wrapper (e.g. ioctl()) reports an error. However, we report the last errno value as a part of the igt_assert() output and so we display spurious values such as: Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802: Last errno: 11, Resource temporarily unavailable Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-24tests: Extract ALIGN macro into a common headerTvrtko Ursulin6-5/+11
Makes for a little bit less code duplication, especially since it will be used from more callers in the future. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-04-16lib: Fix potential out of bounds access in ring stop codeVille Syrjälä1-1/+1
The subsequet code expects the read() to not have filled the entire buffer, and yet we allow it to do so. Reduce the size passed to read() by 1 to make the code sane. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-16lib: Fix assert failure in ring stop codeVille Syrjälä1-1/+1
The assert in igt_set_stop_rings() is a bit bogus. Suppsoedly it was meant to assure that the caller always restores the rings to running state after stopping them. But in its current form it will trigger any time someone calls the function and the rings were already stopped. So you can't even restore the rings to running state w/o the assert triggering. Fix it up so that it'll ignore the current ring state when we're trying to restore the rings back to running state. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-04-13lib/kmstest: Fix up tiled buffer creationDaniel Vetter2-4/+3
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-10lib/drmtest: don't dup quiescent fdMika Kuoppala1-2/+2
If we dup the fd, we are in mercy of the context banning of the test application. Better to have our own to guarantee that gem_quiescent_gpu won't find itself banned on exit. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-10lib: add igt_get_stop_rings and igt_set_stop_ringsMika Kuoppala3-0/+157
Multiple tests are introducing hangs by fidding with i915_ring_stop debugfs entry. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-07gem_tiled_swapping: Purge all page/swap caches firstChris Wilson2-0/+14
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-03gem_tiled_swapping: Limit to available memoryChris Wilson2-0/+35
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-02lib/rendercopy: fix alloc len for gen7_bind_bufMika Kuoppala1-1/+1
Fortunately saved by the alignment. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-03-31intel-gpu-tools: avoid include of cairo.h on Android buildstgore2-1/+7
A recent commit means igt_debugfs.c now needs to include igt_kms.h, which in turn includes igt_fb.h and hence cairo.h. We need to avoid this inclusion of cairo.h when building for Android, (until we have a cairo port) so I have added a #ifndef around it. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28intel-gpu-tools: fix problem with redefinition of mmap64tgore1-1/+5
In android builds there is no reliable way to determine if mmap64 is defined or not, and this sometimes leads to a compile error due to its re-defnition. So this commit avoids its use altogether in intel-gpu-tools for Android builds, unless the HAVE_MMAP64 macro is defined. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26rendercopy/gen8: Remove a hole in struct gen8_blend_stateDamien Lespiau1-19/+19
Using uint64_t in that second member makes it aligned to 64bits, while the first member is only 32bits. We then had a 32bits hole in there! Found-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widawsky@intel.com> Cc: Rafael Barbalho <rafael.barbalho@intel.com> Tested-by: Rafael Barbalho <rafael.barbalho@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-03-26lib/igt_fb: api documentationDaniel Vetter2-18/+217
Also realign function parameters and replace abort() with igt_fail() while at it. v2: Forgotten to add a nice intro. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: setup font in igt_get_cairo_ctxDaniel Vetter1-0/+3
We always want the same boring one, so extract it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: drop kmstest_ prefix from static functionsDaniel Vetter1-6/+6
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_kms/bf: doc skeletonDaniel Vetter4-2/+23
igt_kms docs are just skeleton and also added igt_fb to make sure the linking works correctly. Next up: Actually documenting igt_fb. Also fix that depency spelling fumble I've copied around to a few too many places. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib: fold igt_display into igt_kmsDaniel Vetter6-106/+47
For 1 function and 2 types we kinda don't need separate files. Especially now that igt_kms is much more focused on the actual modeset stuff with all the framebuffer helpers extracted to igt_fb. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_fb: switch to igt_ prefix from kmstest_Daniel Vetter4-51/+53
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: extract igt_fb libraryDaniel Vetter5-475/+559
Stuff all the framebuffer creation, cairo and drm fourcc format handling in there. This gives us a very clear cut in the headers where igt_fb.c only needs to include igt_fb.h, and igt_kms.c includes both (well igt_kms.h pulls in igt_fb.h since we always need this). The aim here is to add api docs for igt_fb since that part of the kms library seems fairly stable already, while all the mode setting and iteration is still a bit in flux. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_kms: make kmstest_get_cairo_surface staticDaniel Vetter2-2/+1
Only used internally in igt_kms.c. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/igt_kms: s/kmstest_create_fb2/kmstest_create_fb/Daniel Vetter2-4/+4
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 Vetter2-30/+3
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_aux: Lost doc polish hunk.Daniel Vetter1-2/+0
Oops. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/intel_batchbuffer fix OUT_RELOC doc tagMika Kuoppala1-1/+1
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-03-26lib/igt_core: fix igt_skip_on_simulation regressionDaniel Vetter1-1/+1
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-23lib/intel_batchbuffer: document header dependenciesDaniel Vetter1-0/+3
At least with the core library headers the situation is now fairly sane. There's still fun stuff going on around *_reg.h and most of the source files just have a cargo-culted list of headers ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib/drmtest: api documentationDaniel Vetter2-6/+71
Also rename the arguments of do_ioctl a bit for better clarity. I haven't figured out a way to reference other section headers, hence the links to igt_core and intel_batchbuffer are a bit fragile unfortunately. It gets the job done though. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib: Use @include tag for include filesDaniel Vetter7-12/+7
Occasionally useful to read documentation ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib: s/igt_env_set/igt_check_boolean_env_varDaniel Vetter3-5/+5
So I wasn't really happy with env_set since it's way too close to setenv(), whic actually _sets_ and environment variable. So use check instead of set as the verb (well adjective for env_set). Also sprinkle in some hints that we talk about a boolean setting here. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib/igt_aux: api documentationDaniel Vetter2-3/+138
I'm not really happy with the name of the igt_env_set function, I'll follow up with a patch to change it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib: extract igt_aux.[hc]Daniel Vetter10-225/+331
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 Vetter3-3/+3
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/intel_io: api documentationDaniel Vetter3-16/+185
As usual de-inline functions for gtkdoc to see them. I've decided to exclude the register map stuff since that's not terribly interesting. Aside: gtkdoc falls over when the title of a section contains a slash, hence why it reads "IO" instead of "I/O". The fun ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_io: rename mmio setup functionsDaniel Vetter2-5/+5
Makes their intent a bit clearer. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>