summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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/intel_io: api documentationDaniel Vetter
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 Vetter
Makes their intent a bit clearer. 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-22lib: add #include "foo.h" lines like in manpagesDaniel Vetter
Should help in alleviating the header mess we have atm. 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: Move non-register things out of intel-gpu-tools.hDaniel Vetter
Right now almost everything in there concerns itself with register access. Move everything else out (into drmtest.h for lack of better place) to prepare for api documentation. Also rename intel_drm.c to intel_os.c since it contains OS, not drm abstractions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: api documentation for render copy/media fillDaniel Vetter
Also fix a fumble in the documentation for intel_blt_copy. One thing we might want to do is unify the parameter ordering here a bit ... Again gtkdoc fails to pick up the documentation for struct igt_buf :( 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/intel_batchbuffer: un-inline buf_height/widthDaniel Vetter
gtkdoc won't pick them up otherwise. 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-22lib/intel_chipset: api docsDaniel Vetter
Unfortunately gtkdoc doesn't pick up the intel_pch enum. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_chipset: intel_ prefix for pch globalDaniel Vetter
Just a bit better namespacing. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: consolidate chipset helpers in intel_chipset.[hc]Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: rename intel_pci.c to intel_chipset.cDaniel Vetter
This is to consolidate all the chipset related functions to intel_chipset.[hc]. Unfortunately we need to rename a wrapper lib file in quick_dump, too. And quick_dump makes automake a bit unhappy apparently. 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-19Revert "gen8 rendercpy: temporarily disable"Ben Widawsky
This reverts commit e41928e6c9bb3f24833a827903f1afeda83592d6.
2014-03-17lib/igt_core: Document library design best practicesDaniel Vetter
This is what I've been doing in the past few months when refactoring i-g-t code. More ideas and also patterns to add highly welcome. v2: Some minor polish on the text and add another bullet to reference the kernel's coding style. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_core: Small api doc fixDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: s/igt_pipe_crc_check/igt_require_pipe_crc/Daniel Vetter
Functions which provide feature checks through igt_skip should be of the form <prefix>_require_<feature>. Otoh feature checks which return in a boolean whether the feature is available should be of the form <prefix>_has_<feature>, e.g. gem_has_blt. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: Remove igt_debugfs_initDaniel Vetter
And also move the igt_debugfs_t type out of the headers. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: Remove debugfs from pipe crc functionsDaniel Vetter
All tests have now lost explicit references to igt_debugfs_t! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: Remove debugfs from igt_debugfs_fopenDaniel Vetter
Also add a missing igt_assert to kms_fbc_crc and again add the missing Returns: section to the api doc. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17lib/igt_debugfs: Remove debugfs from igt_debugfs_openDaniel Vetter
Also update the api docs a bit since the Returns: section was missing. v2: Readd the accidentally lost line for @filename. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-16lib/igt_debugfs: implement a singleton igt_debugfs_t instanceDaniel Vetter
Allows us to remove every so little bit of boilerplate from tests, once it's all rolled out. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14lib/igt_core: add printf attribute to igt_vlogDaniel Vetter
I didn't know that this also works for the varargs versions of format strings. But gcc was kind enough to let me know. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14lib: extract igt_open_forcewake_handleDaniel Vetter
... and I immediately regret that I've killed the return value for igt_debugfs_init, since we have callers which need to work without the forcewake stuff, e.g. the reg dumper needs to work without i915 loaded. Put this new helper to good use in the mmio code and the pm_pc8 testcase. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14lib/igt_core: document the caveats of magic code blocksDaniel Vetter
v2: Polish the wording a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib: add igt_vlog to print varargsDaniel Vetter
... and put it to immediate use in igt_display_log. To make this all add up also drop the return value of igt_display_log, no one really cared anyway. Aside: I've noticed that every time another subtest runs (at least with kms_pipe_crc_basic) the log indent level moves one up ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib/igt_kms: rip out custom verbose loggin supportDaniel Vetter
Instead just piggy-pack on top of igt_log. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib: switch intel_copy_bo to directly take a sizeDaniel Vetter
Instead of a width/height combination. Since I've been lazy with the math this now only accepts page-aligned copy operations, but that's all we need really. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib: api docs for intel_batchbufferDaniel Vetter
- I didn't bother to document the BLIT batch header macros - I'm not too happy with them and they're fairly obscure. - intel_copy_bo could use some interface love, added a FIXME comment for now. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib/intel_batchbuffer: Remove BATCH_LOCALSDaniel Vetter
Totally unused, we have frisky implicit assumptions that the batch is called batch instead. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib: remove hw context #definesDaniel Vetter
The libdrm we require nowadays has them already. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/igt_debugfs: api docsDaniel Vetter
Again issues with an enum, this time intel_pipe_crc_source. The typedefs seem to work better here though. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/igt_debugfs: drop drm_fd argument from igt_pipe_crc_newDaniel Vetter
It's nowhere used and removing it gives us a cleaner, more orthogonal interface. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib: make igt_debugfs_open infallibleDaniel Vetter
(Almost) no one cared anyway. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/ioctl_wrappers: api doc fixupDaniel Vetter
Oops. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib: move prefault helpers to igt_debugfs.cDaniel Vetter
This way all debugfs library code is in one place, ready for some api documentation care. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/igt_core: api documentationDaniel Vetter
At most a bit of comment of function declaration movement for more polish. One tricky bit is to #ifdef out (only for gtkdoc of course) the struct option; forward declaration - gtkdoc needlessly lists it. FIXME: The struct documentation for igt_helper_process somehow doesn't get picked up ... Same issue seems to be with the igt_log_level enum, I've shoveled the relevant documentation into igt_log in free-form for now. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib: extract igt_core.cDaniel Vetter
Same game as with ioctl_wrappers.c. To split was rather clean except for the static function oom_adjust_for_doom. But that was a bug, the calls to it in the various open helpers should simply be done at init and fork time. Which was already the case, except for simple testcase. So fix it up. While at it also start with a small section header for the documentation. v2: Don't forget to update the xml template ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/ioctl_wrappers: api docDaniel Vetter
Also some tiny polish to function interface: - @caching in gem_set_tiling should be uint32_t to match the ioctl struct. - s/size/length/ for gem_write/read. - move gem_get_num_rings to the other ring feature helpers. v2: Also demote gem_require_ring from static inline and move it, too. v3: Also move gem_handle_to_libdrm_bo. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>