summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-03-26lib/igt_kms: make kmstest_get_cairo_surface staticDaniel Vetter
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 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_aux: Lost doc polish hunk.Daniel Vetter
Oops. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26lib/intel_batchbuffer fix OUT_RELOC doc tagMika Kuoppala
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
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-23lib/intel_batchbuffer: document header dependenciesDaniel Vetter
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 Vetter
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 Vetter
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 Vetter
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 Vetter
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 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>