2326 Commits

Author SHA1 Message Date
Daniel Vetter
5cf8d8d6db 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>
2014-03-14 10:59:15 +01:00
Daniel Vetter
5632bc81d9 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>
2014-03-14 10:27:30 +01:00
Daniel Vetter
d4f89d0ff2 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>
2014-03-14 10:27:30 +01:00
Daniel Vetter
5188bbe23e 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>
2014-03-14 10:27:29 +01:00
Daniel Vetter
f962dee636 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>
2014-03-13 19:44:40 +01:00
Daniel Vetter
bd53d722dd 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>
2014-03-13 19:44:40 +01:00
Daniel Vetter
1e9e1baba3 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>
2014-03-13 19:44:40 +01:00
Daniel Vetter
523d909834 NEWS: post-release blurb and mention api doc work
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:09:41 +01:00
Daniel Vetter
eaccd444f7 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>
2014-03-13 18:07:22 +01:00
Daniel Vetter
32d41cc7a7 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>
2014-03-13 18:07:22 +01:00
Daniel Vetter
ec5f9e8788 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>
2014-03-13 18:07:22 +01:00
Daniel Vetter
49e3877ae7 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>
2014-03-13 18:07:21 +01:00
Daniel Vetter
675c91974e lib: remove hw context #defines
The libdrm we require nowadays has them already.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:21 +01:00
Daniel Vetter
3f284f7967 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>
2014-03-13 18:07:21 +01:00
Rodrigo Vivi
a095072b64 bump version to 1.6 and add the release date
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2014-03-13 07:52:47 -03:00
Daniel Vetter
981276819f 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>
2014-03-12 21:22:56 +01:00
Daniel Vetter
36a83a6c5c 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>
2014-03-12 21:22:52 +01:00
Daniel Vetter
803d07b2ff lib: make igt_debugfs_open infallible
(Almost) no one cared anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12 21:22:48 +01:00
Daniel Vetter
096bb851f6 lib/ioctl_wrappers: api doc fixup
Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12 21:22:41 +01:00
Daniel Vetter
adb28fd71d 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>
2014-03-12 21:22:31 +01:00
Daniel Vetter
55e64989e5 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>
2014-03-12 16:39:39 +01:00
Daniel Vetter
d63fe1519d 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>
2014-03-12 16:39:39 +01:00
Daniel Vetter
556c49f20b 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>
2014-03-12 16:39:39 +01:00
Daniel Vetter
766c5bc6ae 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>
2014-03-11 22:58:07 +01:00
Thomas Wood
6c659264a6 tests: add missing assertion
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11 21:13:09 +01:00
Thomas Wood
682f69385a 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>
2014-03-11 21:11:22 +01:00
Daniel Vetter
a90846adf5 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>
2014-03-11 21:03:39 +01:00
Thomas Wood
2d4438605e 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>
2014-03-11 17:19:47 +01:00
Thomas Wood
14ea2a04eb 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>
2014-03-11 17:19:47 +01:00
Daniel Vetter
c769d0988b 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>
2014-03-11 15:45:22 +01:00
Daniel Vetter
c3f2b6a339 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>
2014-03-11 15:44:28 +01:00
Daniel Vetter
e2ee8b4080 tests/drv_missed_irq_hang: Remove debug output
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11 15:32:30 +01:00
Daniel Vetter
20087e779d NEWS: intel_audio_dump has now bdw support 2014-03-07 09:27:00 +01:00
Daniel Vetter
02a3270119 configure: Bump libdrm requirements 2014-03-07 09:23:58 +01:00
Chris Wilson
856afd588e 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>
2014-03-07 07:52:42 +00:00
Mengdong Lin
449509dddb 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>
2014-03-06 16:42:52 +08:00
Mengdong Lin
fa8c75028e intel_audio_dump: adjust code alignment
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
86d15e080d 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>
2014-03-06 16:42:52 +08:00
Mengdong Lin
bae8a005d2 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>
2014-03-06 16:42:52 +08:00
Mengdong Lin
1803f1ebfa 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>
2014-03-06 16:42:52 +08:00
Mengdong Lin
ed386663fe 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>
2014-03-06 16:42:52 +08:00
Mengdong Lin
92d3197025 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>
2014-03-06 16:42:52 +08:00
Imre Deak
cdf74b69c9 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>
2014-03-05 21:59:05 +02:00
Chris Wilson
a3b80912a9 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>
2014-03-05 11:10:18 +00:00
Chris Wilson
072d358bf0 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>
2014-02-28 21:48:38 +00:00
Paulo Zanoni
fa6b1516c5 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>
2014-02-26 19:16:38 -03:00
Paulo Zanoni
d406249bed 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>
2014-02-26 19:16:11 -03:00
Paulo Zanoni
0a57d0b8d3 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>
2014-02-26 19:15:44 -03:00
Paulo Zanoni
d3582aeade 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>
2014-02-26 19:15:18 -03:00
Paulo Zanoni
6a6b8a2138 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>
2014-02-26 19:14:56 -03:00