platform/upstream/intel-gpu-tools.git
10 years agolib/igt_aux: api documentation
Daniel Vetter [Sun, 23 Mar 2014 13:18:23 +0000 (14:18 +0100)]
lib/igt_aux: api documentation

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>
10 years agolib: extract igt_aux.[hc]
Daniel Vetter [Sun, 23 Mar 2014 12:35:09 +0000 (13:35 +0100)]
lib: extract igt_aux.[hc]

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>
10 years agolib: s/drmtest_dumb_aub/igt_aub_dump_enabled/
Daniel Vetter [Sat, 22 Mar 2014 21:42:35 +0000 (22:42 +0100)]
lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/

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>
10 years agolib/intel_io: api documentation
Daniel Vetter [Sat, 22 Mar 2014 21:41:28 +0000 (22:41 +0100)]
lib/intel_io: api documentation

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>
10 years agolib/intel_io: rename mmio setup functions
Daniel Vetter [Sat, 22 Mar 2014 21:23:04 +0000 (22:23 +0100)]
lib/intel_io: rename mmio setup functions

Makes their intent a bit clearer.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: rename intel_gpu_tools.h to intel_io.h
Daniel Vetter [Sat, 22 Mar 2014 20:34:29 +0000 (21:34 +0100)]
lib: rename intel_gpu_tools.h to intel_io.h

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>
10 years agolib: unnecessary header removal for drmtest.h, part 2
Daniel Vetter [Sat, 22 Mar 2014 20:29:01 +0000 (21:29 +0100)]
lib: unnecessary header removal for drmtest.h, part 2

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>
10 years agolib: unnecessary header removal for drmtest.h, part 1
Daniel Vetter [Sat, 22 Mar 2014 20:07:37 +0000 (21:07 +0100)]
lib: unnecessary header removal for drmtest.h, part 1

Brought a few missing headers to light in ioctl_wrappers.h, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: more unecessary header removal
Daniel Vetter [Sat, 22 Mar 2014 19:18:51 +0000 (20:18 +0100)]
lib: more unecessary header removal

This time big with media_fill.h

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: remove uncessary #includes from headers
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>
10 years agolib: add #include "foo.h" lines like in manpages
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>
10 years agotests|lib: remove assert.h includes
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>
10 years agolib: Move non-register things out of intel-gpu-tools.h
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>
10 years agolib/intel_batchbuffer: api documentation for render copy/media fill
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>
10 years agolib/intel_batchbuffer: drop cpu_mapping from igt_buf
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>
10 years agolib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs
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>
10 years agolib/intel_batchbuffer: igt_ namespace for the buffer structure
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>
10 years agolib/intel_batchbuffer: un-inline buf_height/width
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>
10 years agolib: make media_fill.h an internal header
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>
10 years agolib: make rendercopy.h an internal header
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>
10 years agolib/intel_chipset: api docs
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>
10 years agolib/intel_chipset: intel_ prefix for pch global
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>
10 years agolib: consolidate chipset helpers in intel_chipset.[hc]
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>
10 years agolib: rename intel_pci.c to intel_chipset.c
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>
10 years agotests/kms_cursor_crc: Fix up breakage
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>
10 years agolib: allow igt_skip_on_simulation outside of fixtures.
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>
10 years agobuild: Define enable_gtk_doc when the m4 macro is missing
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>
10 years agofix out-of-tree builds
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>
10 years agotests/kms_cursor_crc: Review from Imre for Sagar's patch
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>
10 years agokms_cursor_crc: Enabling this test for all cursor sizes
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>
10 years agotests/gem_gtt_hog: Fix for BDW
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>
10 years agotests/gem_gtt_hog: Use XY_COLOR_BLT instead of COLOR_BLT.
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>
10 years agotests/gem_wait_render_timeout: Fix for BDW
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>
10 years agotests/gem_wait_render_timeout: Use XY_COLOR_BLT instead of COLOR_BLT.
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>
10 years agogem_wait_render_timeout: use igt_assert_cmpint
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>
10 years agoRevert "gen8 rendercpy: temporarily disable"
Ben Widawsky [Wed, 19 Mar 2014 17:14:15 +0000 (10:14 -0700)]
Revert "gen8 rendercpy: temporarily disable"

This reverts commit e41928e6c9bb3f24833a827903f1afeda83592d6.

10 years agointel_gtt: Dump the whole GTT
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>
10 years agoquick_dump: gen8 private PAT
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>
10 years agolib/igt_core: Document library design best practices
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>
10 years agolib/igt_core: Small api doc fix
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>
10 years agolib/igt_debugfs: s/igt_pipe_crc_check/igt_require_pipe_crc/
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>
10 years agolib/igt_debugfs: Remove igt_debugfs_init
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>
10 years agolib/igt_debugfs: Remove debugfs from pipe crc functions
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>
10 years agolib/igt_debugfs: Remove debugfs from igt_debugfs_fopen
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>
10 years agolib/igt_debugfs: Remove debugfs from igt_debugfs_open
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>
10 years agolib/igt_debugfs: implement a singleton igt_debugfs_t instance
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>
10 years agointel_audio_dump: fix CTS/M value index
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>
10 years agotests: update .gitignoe
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>
10 years agotests/drv_suspend: new forcewake subtest
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>
10 years agolib/igt_core: add printf attribute to igt_vlog
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>
10 years agolib: extract igt_open_forcewake_handle
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>
10 years agotests/pm_rps: wait longer for idling
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>
10 years agotests/pm_rps: use igt_assert_cmpint
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>
10 years agolib/igt_core: document the caveats of magic code blocks
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>
10 years agotests/pm_rps: load harder
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>
10 years agotests/pm_rps: simplify load helper setup
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>
10 years agotests/pm_rps: ducttape for igt fork helper cleanup issues
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>
10 years agotest/kms_pipe_crc_basic: Fix up igt_kms conversion breakage
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>
10 years agolib: add igt_vlog to print varargs
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>
10 years agolib/igt_kms: rip out custom verbose loggin support
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>
10 years agoNEWS: post-release blurb and mention api doc work
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>
10 years agolib: switch intel_copy_bo to directly take a size
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>
10 years agotests/prime_nv_tests: fix copied buffer size
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>
10 years agolib: api docs for intel_batchbuffer
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>
10 years agolib/intel_batchbuffer: Remove BATCH_LOCALS
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>
10 years agolib: remove hw context #defines
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>
10 years agodocs: Exclude debug.xml
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>
10 years agobump version to 1.6 and add the release date intel-gpu-tools-1.6
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>
10 years agolib/igt_debugfs: api docs
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>
10 years agolib/igt_debugfs: drop drm_fd argument from igt_pipe_crc_new
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>
10 years agolib: make igt_debugfs_open infallible
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>
10 years agolib/ioctl_wrappers: api doc fixup
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>
10 years agolib: move prefault helpers to igt_debugfs.c
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>
10 years agolib/igt_core: api documentation
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>
10 years agolib: extract igt_core.c
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>
10 years agolib/ioctl_wrappers: api doc
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>
10 years agolib: extract ioctl_wrappers.c
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>
10 years agotests: add missing assertion
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>
10 years agolib: Add missing header to Makefile.sources
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>
10 years agogtk-doc: Document the docs
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>
10 years agodrmtest: reformat the API documentation
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>
10 years agoAdd API documentation support
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>
10 years agotests/drv_missed_irq_hand: Make it robuster
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>
10 years agotests/gem_exec_blt: More reasonable runtime
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>
10 years agotests/drv_missed_irq_hang: Remove debug output
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>
10 years agoNEWS: intel_audio_dump has now bdw support
Daniel Vetter [Fri, 7 Mar 2014 08:27:00 +0000 (09:27 +0100)]
NEWS: intel_audio_dump has now bdw support

10 years agoconfigure: Bump libdrm requirements
Daniel Vetter [Fri, 7 Mar 2014 08:23:58 +0000 (09:23 +0100)]
configure: Bump libdrm requirements

10 years agoigt/gem_pwrite_pread: Fix relocation offsets for gen8+
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>
10 years agointel_audio_dump: add support for Valleyview
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>
10 years agointel_audio_dump: adjust code alignment
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>
10 years agointel_audio_dump: share common audio dump code for Ironlake, Haswell & Broadwell
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>
10 years agointel_audio_dump: define get_num_pipes() to get number of pipes for a device ID
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>
10 years agointel_audio_dump: define IS_HASWELL_PLUS to cover Haswell and its successors
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>
10 years agointel_audio_dump: move definitions of transcoder/pipe/port/converter earlier
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>
10 years agointel_audio_dump: support using base address plus an offset to dump registers
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>
10 years agokms_setmode: Add clone-single-crtc subtest
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>
10 years agoigt/gem_pwrite_pread: Fix relocation offsets for gen8+
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>
10 years agoigt/gem_pwrite_pread: Fix XY_SRC_COPY command length for gen8+
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>
10 years agotests/pm_pc8: be more verbose on test_i2c failures
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>
10 years agotests/pm_pc8: use intel_gen instead of a big IS_GEN check
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>