Daniel Vetter [Sat, 22 Mar 2014 19:07:35 +0000 (20:07 +0100)]
lib: remove uncessary #includes from headers
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>
Daniel Vetter [Sat, 22 Mar 2014 18:35:40 +0000 (19:35 +0100)]
lib: add #include "foo.h" lines like in manpages
Should help in alleviating the header mess we have atm.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 22 Mar 2014 18:27:04 +0000 (19:27 +0100)]
tests|lib: remove assert.h includes
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>
Daniel Vetter [Sat, 22 Mar 2014 18:21:26 +0000 (19:21 +0100)]
lib: Move non-register things out of intel-gpu-tools.h
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>
Daniel Vetter [Sat, 22 Mar 2014 17:16:30 +0000 (18:16 +0100)]
lib/intel_batchbuffer: api documentation for render copy/media fill
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>
Daniel Vetter [Sat, 22 Mar 2014 17:04:52 +0000 (18:04 +0100)]
lib/intel_batchbuffer: drop cpu_mapping from igt_buf
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>
Daniel Vetter [Sat, 22 Mar 2014 14:49:02 +0000 (15:49 +0100)]
lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs
Now everything is prepared to pour some neat api docs over this all.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 22 Mar 2014 14:44:48 +0000 (15:44 +0100)]
lib/intel_batchbuffer: igt_ namespace for the buffer structure
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>
Daniel Vetter [Sat, 22 Mar 2014 14:41:42 +0000 (15:41 +0100)]
lib/intel_batchbuffer: un-inline buf_height/width
gtkdoc won't pick them up otherwise.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 22 Mar 2014 14:35:16 +0000 (15:35 +0100)]
lib: make media_fill.h an internal header
Same deal as with rendercopy.h.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 22 Mar 2014 14:31:15 +0000 (15:31 +0100)]
lib: make rendercopy.h an internal header
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>
Daniel Vetter [Sat, 22 Mar 2014 14:12:57 +0000 (15:12 +0100)]
lib/intel_chipset: api docs
Unfortunately gtkdoc doesn't pick up the intel_pch enum.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 22 Mar 2014 13:59:58 +0000 (14:59 +0100)]
lib/intel_chipset: intel_ prefix for pch global
Just a bit better namespacing.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 22 Mar 2014 13:54:28 +0000 (14:54 +0100)]
lib: consolidate chipset helpers in intel_chipset.[hc]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 22 Mar 2014 13:45:50 +0000 (14:45 +0100)]
lib: rename intel_pci.c to intel_chipset.c
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>
Daniel Vetter [Sat, 22 Mar 2014 13:45:54 +0000 (14:45 +0100)]
tests/kms_cursor_crc: Fix up breakage
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>
Daniel Vetter [Sat, 22 Mar 2014 12:22:11 +0000 (13:22 +0100)]
lib: allow igt_skip_on_simulation outside of fixtures.
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>
Damien Lespiau [Fri, 21 Mar 2014 14:36:54 +0000 (14:36 +0000)]
build: Define enable_gtk_doc when the m4 macro is missing
For setups where we don't have gtk-doc installed, ie when the
GTK_DOC_CHECK macro doesn't expand, we still need to populate the
enable_gtk_doc variable to provide a value to the configure summary.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Adrian Negreanu [Fri, 21 Mar 2014 07:06:15 +0000 (09:06 +0200)]
fix out-of-tree builds
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>
Daniel Vetter [Thu, 20 Mar 2014 16:31:16 +0000 (17:31 +0100)]
tests/kms_cursor_crc: Review from Imre for Sagar's patch
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Sagar Kamble [Tue, 18 Mar 2014 10:29:43 +0000 (15:59 +0530)]
kms_cursor_crc: Enabling this test for all cursor sizes
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>
Rodrigo Vivi [Tue, 18 Mar 2014 14:18:56 +0000 (11:18 -0300)]
tests/gem_gtt_hog: Fix for BDW
Update XY_COLOR_BLT command for Broadwell.
v2: stash devid and remove ugly double allocation. (by Chris).
v3: fix inverted blt command size and stash fd, devid and intel_gen.
v4: improved len calculation and noop between blt commands. (by Chris).
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73724
Cc: Chris Wilson chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Rodrigo Vivi [Tue, 18 Mar 2014 14:18:55 +0000 (11:18 -0300)]
tests/gem_gtt_hog: Use XY_COLOR_BLT instead of COLOR_BLT.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Rodrigo Vivi [Tue, 18 Mar 2014 14:18:54 +0000 (11:18 -0300)]
tests/gem_wait_render_timeout: Fix for BDW
Update XY_COLOR_BLT command for Broadwell.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Rodrigo Vivi [Tue, 18 Mar 2014 14:18:53 +0000 (11:18 -0300)]
tests/gem_wait_render_timeout: Use XY_COLOR_BLT instead of COLOR_BLT.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Ben Widawsky [Wed, 19 Mar 2014 18:40:58 +0000 (11:40 -0700)]
gem_wait_render_timeout: use igt_assert_cmpint
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Ben Widawsky [Wed, 19 Mar 2014 17:14:15 +0000 (10:14 -0700)]
Revert "gen8 rendercpy: temporarily disable"
This reverts commit
e41928e6c9bb3f24833a827903f1afeda83592d6.
Ben Widawsky [Wed, 19 Mar 2014 16:22:53 +0000 (09:22 -0700)]
intel_gtt: Dump the whole GTT
The tool formerly only dumped the aperture size, which is fine, but not
everything interesting. Most of the patch is just the variable rename.
The real work happens with using the BAR0 size divided by 2 instead of
the BAR2 size.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Ben Widawsky [Wed, 19 Mar 2014 16:17:36 +0000 (09:17 -0700)]
quick_dump: gen8 private PAT
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Daniel Vetter [Sun, 16 Mar 2014 18:34:37 +0000 (19:34 +0100)]
lib/igt_core: Document library design best practices
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>
Daniel Vetter [Sun, 16 Mar 2014 17:56:14 +0000 (18:56 +0100)]
lib/igt_core: Small api doc fix
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 16 Mar 2014 14:09:22 +0000 (15:09 +0100)]
lib/igt_debugfs: s/igt_pipe_crc_check/igt_require_pipe_crc/
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>
Daniel Vetter [Sun, 16 Mar 2014 13:52:32 +0000 (14:52 +0100)]
lib/igt_debugfs: Remove igt_debugfs_init
And also move the igt_debugfs_t type out of the headers.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 16 Mar 2014 13:49:35 +0000 (14:49 +0100)]
lib/igt_debugfs: Remove debugfs from pipe crc functions
All tests have now lost explicit references to igt_debugfs_t!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 16 Mar 2014 13:46:39 +0000 (14:46 +0100)]
lib/igt_debugfs: Remove debugfs from igt_debugfs_fopen
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>
Daniel Vetter [Sun, 16 Mar 2014 13:41:25 +0000 (14:41 +0100)]
lib/igt_debugfs: Remove debugfs from igt_debugfs_open
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>
Daniel Vetter [Sun, 16 Mar 2014 13:40:32 +0000 (14:40 +0100)]
lib/igt_debugfs: implement a singleton igt_debugfs_t instance
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>
Mengdong Lin [Thu, 13 Mar 2014 20:38:02 +0000 (16:38 -0400)]
intel_audio_dump: fix CTS/M value index
This patch fixes the reversed CTS/M value index when dumping the
'audio M/CTS programing enable' register.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Daniel Vetter [Fri, 14 Mar 2014 15:08:10 +0000 (16:08 +0100)]
tests: update .gitignoe
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 14 Mar 2014 15:07:28 +0000 (16:07 +0100)]
tests/drv_suspend: new forcewake subtest
I suspect that currently we have an issue in there with the runtime PM
refcounting, but silly me developed this on a machine with runtime PM
support ...
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 14 Mar 2014 15:06:51 +0000 (16:06 +0100)]
lib/igt_core: add printf attribute to igt_vlog
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>
Daniel Vetter [Fri, 14 Mar 2014 15:00:22 +0000 (16:00 +0100)]
lib: extract igt_open_forcewake_handle
... 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>
Daniel Vetter [Fri, 14 Mar 2014 10:01:09 +0000 (11:01 +0100)]
tests/pm_rps: wait longer for idling
Big cores seem to take forever to idle, at least my ivb here. Fairly
ridiculous, so maybe there's more room for our debooster to kick in.
Anyway, this gets the min-max-config-idle and reset subtests going
somewhat reliably on my ivb. They still occasionally fail with the
current frequency pegged to max (or close to it) for no apparent
reason at all. Rebooting tends to fix it.
Don't ask, don't tell.
Cc: Jeff McGee <jeff.mcgee@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 14 Mar 2014 09:33:53 +0000 (10:33 +0100)]
tests/pm_rps: use igt_assert_cmpint
Much better debug output almost for free.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 13 Mar 2014 20:25:01 +0000 (21:25 +0100)]
lib/igt_core: document the caveats of magic code blocks
v2: Polish the wording a bit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 14 Mar 2014 09:26:39 +0000 (10:26 +0100)]
tests/pm_rps: load harder
Big core platforms need some seriuos omph to break a sweat.
This fixes min-max-config-loaded here on my ivb.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75146
Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 14 Mar 2014 09:12:55 +0000 (10:12 +0100)]
tests/pm_rps: simplify load helper setup
There's no need to be fancy here.
Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 14 Mar 2014 09:06:02 +0000 (10:06 +0100)]
tests/pm_rps: ducttape for igt fork helper cleanup issues
We don't call cleanup handlers when exiting a subtest currently, only
when exiting the entire binary. Which means pm_rps falls over when it
fails more than one subtest.
Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 13 Mar 2014 16:59:47 +0000 (17:59 +0100)]
test/kms_pipe_crc_basic: Fix up igt_kms conversion breakage
Apparently the framework doesn't ignore disabled pipes correctly, so
help it out a bit.
Again an awesome track record for our QA and bug scrubbers :(
Oh and while I rant: Docs for this stuff, please ;-)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 13 Mar 2014 16:27:47 +0000 (17:27 +0100)]
lib: add igt_vlog to print varargs
... 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>
Daniel Vetter [Thu, 13 Mar 2014 16:20:05 +0000 (17:20 +0100)]
lib/igt_kms: rip out custom verbose loggin support
Instead just piggy-pack on top of igt_log.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 13 Mar 2014 17:09:41 +0000 (18:09 +0100)]
NEWS: post-release blurb and mention api doc work
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 13 Mar 2014 02:35:02 +0000 (03:35 +0100)]
lib: switch intel_copy_bo to directly take a size
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>
Daniel Vetter [Thu, 13 Mar 2014 01:38:04 +0000 (02:38 +0100)]
tests/prime_nv_tests: fix copied buffer size
Doesn't affect the test since we only check the first few bytes. But I
want to switch the copy code to always copy entire pages around, so
use the right buffer size.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 13 Mar 2014 00:13:28 +0000 (01:13 +0100)]
lib: api docs for intel_batchbuffer
- 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>
Daniel Vetter [Thu, 13 Mar 2014 00:38:42 +0000 (01:38 +0100)]
lib/intel_batchbuffer: Remove BATCH_LOCALS
Totally unused, we have frisky implicit assumptions that the
batch is called batch instead.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 12 Mar 2014 20:30:46 +0000 (21:30 +0100)]
lib: remove hw context #defines
The libdrm we require nowadays has them already.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 12 Mar 2014 20:26:55 +0000 (21:26 +0100)]
docs: Exclude debug.xml
It is all just stuff used internally by the EU debugger only. Not
really generally useful, expect if someone wants to write
documentation for the debugger.
Which needs a lot more than just this.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Rodrigo Vivi [Thu, 13 Mar 2014 10:52:47 +0000 (07:52 -0300)]
bump version to 1.6 and add the release date
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Daniel Vetter [Wed, 12 Mar 2014 17:53:51 +0000 (18:53 +0100)]
lib/igt_debugfs: api docs
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>
Daniel Vetter [Wed, 12 Mar 2014 18:24:00 +0000 (19:24 +0100)]
lib/igt_debugfs: drop drm_fd argument from igt_pipe_crc_new
It's nowhere used and removing it gives us a cleaner, more
orthogonal interface.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 12 Mar 2014 18:00:48 +0000 (19:00 +0100)]
lib: make igt_debugfs_open infallible
(Almost) no one cared anyway.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 12 Mar 2014 17:53:44 +0000 (18:53 +0100)]
lib/ioctl_wrappers: api doc fixup
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 12 Mar 2014 15:53:47 +0000 (16:53 +0100)]
lib: move prefault helpers to igt_debugfs.c
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>
Daniel Vetter [Wed, 12 Mar 2014 01:34:40 +0000 (02:34 +0100)]
lib/igt_core: api documentation
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>
Daniel Vetter [Wed, 12 Mar 2014 00:29:52 +0000 (01:29 +0100)]
lib: extract igt_core.c
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>
Daniel Vetter [Tue, 11 Mar 2014 22:27:06 +0000 (23:27 +0100)]
lib/ioctl_wrappers: api doc
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>
Daniel Vetter [Tue, 11 Mar 2014 21:58:07 +0000 (22:58 +0100)]
lib: extract ioctl_wrappers.c
I want to group the ioctl wrappers and related functions into their
own documentation section.
Apparently gtkdoc refuses to obey this wish without a corespdonding
header. So appease it. Also gtkdoc seems to struggle with rebuilding a
bit ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Wood [Tue, 11 Mar 2014 16:18:48 +0000 (16:18 +0000)]
tests: add missing assertion
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Wood [Tue, 11 Mar 2014 16:18:50 +0000 (16:18 +0000)]
lib: Add missing header to Makefile.sources
i915_pciids.h was missing from Makefile.sources, which caused distcheck to
fail.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 11 Mar 2014 20:03:39 +0000 (21:03 +0100)]
gtk-doc: Document the docs
- configure output to easily see whether docs are built or not
- small blurb in README
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Wood [Tue, 11 Mar 2014 16:04:29 +0000 (16:04 +0000)]
drmtest: reformat the API documentation
Make the existing documentation compatible with gtk-doc.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thomas Wood [Tue, 11 Mar 2014 16:04:28 +0000 (16:04 +0000)]
Add API documentation support
Add optional support for building API documentation using gtk-doc.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 11 Mar 2014 14:45:22 +0000 (15:45 +0100)]
tests/drv_missed_irq_hand: Make it robuster
Just launching empty batches isn't enough load on my speedy g33
to force the kernel to enable interrupts an wait for them.
So use some real load. With that the test is now fully reliably on
my g33 amchine.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 11 Mar 2014 14:44:28 +0000 (15:44 +0100)]
tests/gem_exec_blt: More reasonable runtime
Doing (1 << 18) - 1 repeats isn't really. With the reduced time the
test is also useful in some shell scripted tests which need some real
load (but not too much), like drv_missed_irq_hang.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 11 Mar 2014 14:32:30 +0000 (15:32 +0100)]
tests/drv_missed_irq_hang: Remove debug output
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 7 Mar 2014 08:27:00 +0000 (09:27 +0100)]
NEWS: intel_audio_dump has now bdw support
Daniel Vetter [Fri, 7 Mar 2014 08:23:58 +0000 (09:23 +0100)]
configure: Bump libdrm requirements
Chris Wilson [Wed, 5 Mar 2014 11:09:46 +0000 (11:09 +0000)]
igt/gem_pwrite_pread: Fix relocation offsets for gen8+
Oops, I didn't check to see if there was more than one call site where
we built and execbuffer.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Mengdong Lin [Mon, 3 Mar 2014 22:03:02 +0000 (17:03 -0500)]
intel_audio_dump: add support for Valleyview
This patch adds support for dumping audio registers of Valleyview,
by reusing Ironlake code with a different base address and pipe number.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Mengdong Lin [Tue, 4 Mar 2014 15:13:09 +0000 (10:13 -0500)]
intel_audio_dump: adjust code alignment
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Mengdong Lin [Mon, 3 Mar 2014 18:52:06 +0000 (13:52 -0500)]
intel_audio_dump: share common audio dump code for Ironlake, Haswell & Broadwell
Most audio config registers of Ironlake, Haswell and Broadwell are almost same
although the register names or some bit fields have little difference.
And HSW and BDW already share their code.
This patch further shares code for ILK and HSW/BDW:
- ILK and HSW/BDW define their own base address to dump audio & display registers.
- Small functions to dump a specific register are defined and shared.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Mengdong Lin [Mon, 3 Mar 2014 18:23:50 +0000 (13:23 -0500)]
intel_audio_dump: define get_num_pipes() to get number of pipes for a device ID
It's for future code sharing because some registers define their bit fields
according to the number of pipes.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Mengdong Lin [Fri, 28 Feb 2014 21:18:11 +0000 (16:18 -0500)]
intel_audio_dump: define IS_HASWELL_PLUS to cover Haswell and its successors
A macro IS_HASWELL_PLUS(devid) is defined to cover Haswell and its successors,
for code sharing. Now it covers HSW and BDW.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Mengdong Lin [Fri, 28 Feb 2014 18:25:27 +0000 (13:25 -0500)]
intel_audio_dump: move definitions of transcoder/pipe/port/converter earlier
Move these enum definitions earlier for future code sharing.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Mengdong Lin [Mon, 3 Mar 2014 16:04:39 +0000 (11:04 -0500)]
intel_audio_dump: support using base address plus an offset to dump registers
Layout of display and audio registers can be same for different Intel GPUs.
For code sharing, this patches defines functions to
- set the base address of display and audio registers
- dump registers using the base address and an offset
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Imre Deak [Wed, 5 Mar 2014 19:02:41 +0000 (21:02 +0200)]
kms_setmode: Add clone-single-crtc subtest
The clone-single-crtc will test various cloning scenarios.
Currently it does limit the number of simultanously cloned
connectors to the number of pipes in the system. That restriction
can be lifted in the future if desired.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Chris Wilson [Wed, 5 Mar 2014 11:09:46 +0000 (11:09 +0000)]
igt/gem_pwrite_pread: Fix relocation offsets for gen8+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Fri, 28 Feb 2014 21:44:22 +0000 (21:44 +0000)]
igt/gem_pwrite_pread: Fix XY_SRC_COPY command length for gen8+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Paulo Zanoni [Wed, 26 Feb 2014 19:51:12 +0000 (16:51 -0300)]
tests/pm_pc8: be more verbose on test_i2c failures
Whenever I see that error, I go and print the numbers so I can check
which one is failing.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Wed, 26 Feb 2014 18:42:07 +0000 (15:42 -0300)]
tests/pm_pc8: use intel_gen instead of a big IS_GEN check
Much better!
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Wed, 26 Feb 2014 18:13:00 +0000 (15:13 -0300)]
tests/pm_pc8: BDW should also support PC8 residencies
And I'm hoping the MSR register addresses will be the same.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Wed, 26 Feb 2014 17:48:50 +0000 (14:48 -0300)]
tests/pm_pc8: use XY_COLOR_BLT instead of just COLOR_BLT
And add BDW support to it.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Wed, 26 Feb 2014 14:12:28 +0000 (11:12 -0300)]
tests/pm_pc8: add "stay" mode
I used to have a binary that would just disable all the screens - so
we can enter PC8/runtime PM - and then sleep forever. I used this
binary many times while debugging PC8 and runtime PM, and I also sent
the binary to many people so they would be able to test these things
without X running.
Since pm_pc8 already implements everything that the separate binary
needs, and it even has some additional code to try to configure the
environment to actually reach PC8, it's easier to just ask people to
run "sudo ./pm_pc8 --stay" instead of sending them a file, asking them
to compile it, setup the environment, and then run it.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Chris Wilson [Wed, 26 Feb 2014 12:01:47 +0000 (12:01 +0000)]
evictions: Limit the number of minor eviction surfaces to fit in RAM
We allocate more surfaces than used in a single pass in order to stress
the eviction code between batches. The intent here is not to exercise
swapping, and we fail to check that there is enough swap+memory to hold
all our surfaces. So limit the number of surfaces we allocate to fit
into RAM, and then require that the number of surfaces we need for
testing is less than the number of surfaces we can allocate.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Wed, 26 Feb 2014 11:56:16 +0000 (11:56 +0000)]
lib: Test against available swap
Even if we ignore the double-accounting bug in Linux, we need to be sure
that the remaining swapspace is adequate for running our test as the
system may be under load before we even start.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Paulo Zanoni [Tue, 25 Feb 2014 20:46:27 +0000 (17:46 -0300)]
tests/pm_pc8: add pci-d3-state subtest
Currently the test suite just looks at the files provided by the
runtime power management framework to check if the device is runtime
suspended. Add a test that reads the PCI config space to check if the
device is actually in PCI D3 state or not.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Tue, 25 Feb 2014 19:40:51 +0000 (16:40 -0300)]
tests/pm_pc8: add reg-read-ioctl subtest
After I finally fixed the code that WARNs if we're runtime suspended
when reading registers I started getting the WARNs, so this test
should reproduce them on a Kernel with the problem.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Chris Wilson [Mon, 24 Feb 2014 08:52:28 +0000 (08:52 +0000)]
gem_render_tiled_blits: Trim usage to fit within RAM
This is a render correctness test, the intention is not to exercise the
swapper (but preferrably some eviction code).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 24 Feb 2014 08:52:28 +0000 (08:52 +0000)]
gem_render_linear_blits: Trim usage to fit within RAM
This is a render correctness test, the intention is not to exercise the
swapper (but preferrably some eviction code).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>