Chris Wilson [Thu, 3 Apr 2014 08:43:58 +0000 (09:43 +0100)]
gem_tiled_swapping: Limit to available memory
If there is not enough free RAM+swap for us to execute our test, we will
hit OOM, so check first.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Mika Kuoppala [Wed, 2 Apr 2014 12:13:21 +0000 (15:13 +0300)]
lib/rendercopy: fix alloc len for gen7_bind_buf
Fortunately saved by the alignment.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Thomas Wood [Wed, 2 Apr 2014 10:41:43 +0000 (11:41 +0100)]
tests: create files that list the available tests
Add Makefile targets to create two text files containing the list of
available single and multi-test programs. This enables the tests to be
enumerated without requiring the build system.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tgore [Mon, 31 Mar 2014 10:55:40 +0000 (11:55 +0100)]
intel-gpu-tools: avoid include of cairo.h on Android builds
A recent commit means igt_debugfs.c now needs to include igt_kms.h,
which in turn includes igt_fb.h and hence cairo.h.
We need to avoid this inclusion of cairo.h when building for Android,
(until we have a cairo port) so I have added a #ifndef around it.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 28 Mar 2014 16:54:58 +0000 (17:54 +0100)]
tools/quick_dump: Fix make distcheck
Someone really needs to fix this Makefile ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tgore [Fri, 28 Mar 2014 12:54:59 +0000 (12:54 +0000)]
intel-gpu-tools: fix some include path problems on android builds
When building within the android tree (specifically in /external)
the compilation fails due to the wrong versions of some header files
getting picked up. This commit adds some include paths to ensure the
correct headers are found
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tgore [Fri, 28 Mar 2014 12:54:58 +0000 (12:54 +0000)]
intel-gpu-tools: fix problem with redefinition of mmap64
In android builds there is no reliable way to determine if mmap64 is defined
or not, and this sometimes leads to a compile error due to its re-defnition.
So this commit avoids its use altogether in intel-gpu-tools for Android builds,
unless the HAVE_MMAP64 macro is defined.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 27 Mar 2014 22:04:02 +0000 (23:04 +0100)]
README: update piglit cmd
Pointed out by Jesse.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Jesse Barnes [Thu, 27 Mar 2014 18:10:18 +0000 (11:10 -0700)]
intel_infoframes: remove bogus "being transmitted" check from VLV
This bit is reserved on VLV.
Jesse Barnes [Thu, 27 Mar 2014 18:01:06 +0000 (11:01 -0700)]
intel_infoframes: add VLV support
Different reg offsets and such.
Ben Widawsky [Thu, 27 Mar 2014 16:56:59 +0000 (09:56 -0700)]
quick_dump: Put the cairo cflags with the other cflags.
I had been hoping we can avoid linking against cairo, but alas it was
not meant to be.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Daniel Vetter [Wed, 26 Mar 2014 21:57:52 +0000 (22:57 +0100)]
tools/quick_dump: re-apply ducttape
Someone with actual automake-fu really needs to fix this up for real
since compiling a bunch of source files again, with broken dep
tracking even just because we can't link against a .la somehow really
isn't too awesome.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 21:15:12 +0000 (22:15 +0100)]
tests/pm_rps: Add a new testcase to provoke the "stuck at max" bug
Note that the sleep(5); to fully idle the gpu is _really_ important.
Without it the bug is not exhibited.
The issue at hand is that after gem_quiescent_gpu we are at max
(expected, since the blocking waits peg to max), but then we never go
down to a lower freq again until we're fully idle. The tiny load is
sufficient to keep the gpu at max. I've played around with this a bit
and even ridiculously low loads (like one MI_STORE per 50ms) are
enough to keep the gpu at max freq.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 20:30:17 +0000 (21:30 +0100)]
tests/pm_rps: quiescent harder
Apparently some rps chips are prone to stick to max once you're there.
And all the synchronous waits in gem_quiescent_gpu are _really_ good
at forcing the kernel to go full throttle.
And even a positively tiny load (one MI_STORE_IMM per 50 ms) is enough
to eternally keeep it there, which means the first idle measurement of
the freqs before we do the reset it completely busted.
Just add a wait before the tricky test and call it a day.
Option b) would have been to now have this tiny load, but I think a
good reminder how quirky rps is is always welcome. Just in case we
start sleeping too easy at night.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74956
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Damien Lespiau [Mon, 24 Mar 2014 18:42:39 +0000 (18:42 +0000)]
rendercopy/gen8: Remove a hole in struct gen8_blend_state
Using uint64_t in that second member makes it aligned to 64bits, while
the first member is only 32bits. We then had a 32bits hole in there!
Found-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Rafael Barbalho <rafael.barbalho@intel.com>
Tested-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Jesse Barnes [Wed, 26 Mar 2014 18:02:48 +0000 (11:02 -0700)]
testdisplay: make termio unbuffered
So hotkeys take effect immediately.
Daniel Vetter [Wed, 26 Mar 2014 15:37:15 +0000 (16:37 +0100)]
lib/igt_fb: api documentation
Also realign function parameters and replace abort() with igt_fail()
while at it.
v2: Forgotten to add a nice intro.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 15:36:46 +0000 (16:36 +0100)]
lib/igt_fb: setup font in igt_get_cairo_ctx
We always want the same boring one, so extract it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 15:09:27 +0000 (16:09 +0100)]
lib/igt_fb: drop kmstest_ prefix from static functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 14:15:49 +0000 (15:15 +0100)]
lib/igt_kms/bf: doc skeleton
igt_kms docs are just skeleton and also added igt_fb to make sure the
linking works correctly.
Next up: Actually documenting igt_fb.
Also fix that depency spelling fumble I've copied around to a few too
many places.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 09:19:42 +0000 (10:19 +0100)]
lib: fold igt_display into igt_kms
For 1 function and 2 types we kinda don't need separate files.
Especially now that igt_kms is much more focused on the actual modeset
stuff with all the framebuffer helpers extracted to igt_fb.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 08:18:11 +0000 (09:18 +0100)]
lib/igt_fb: switch to igt_ prefix from kmstest_
Shorter and more in line with our general igt_ prefix for everything
which isn't somehow intel or i915-gem or otherwise hw specific - these
helpers here are all fully generic framebuffer handling functions
based on kms + cairo.
Well, the actual buffer alloc is done with i915 gem, but meh ;-)
Two special cases:
- bpp_depth_to_drm_format and drm_format_to_bpp completely lacked
prefixes, so just add igt_.
- write_fb was a bit misleading given that we have gem_write for
uploading to buffers. Rename that to write_fb_to_png to make it
crystal clear what this thing does even without looking at docs.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 26 Mar 2014 08:06:11 +0000 (09:06 +0100)]
lib: extract igt_fb library
Stuff all the framebuffer creation, cairo and drm fourcc format
handling in there. This gives us a very clear cut in the headers where
igt_fb.c only needs to include igt_fb.h, and igt_kms.c includes both
(well igt_kms.h pulls in igt_fb.h since we always need this).
The aim here is to add api docs for igt_fb since that part of the kms
library seems fairly stable already, while all the mode setting and
iteration is still a bit in flux.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 23 Mar 2014 15:53:49 +0000 (16:53 +0100)]
gitignore: Add logfiles from make check
A bit annoying to see this stuff around in git status, so exclude it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 23 Mar 2014 15:53:14 +0000 (16:53 +0100)]
lib/igt_kms: make kmstest_get_cairo_surface static
Only used internally in igt_kms.c.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 23 Mar 2014 15:52:49 +0000 (16:52 +0100)]
lib/igt_kms: s/kmstest_create_fb2/kmstest_create_fb/
Simplify the name since the old _fb function is now gone.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 23 Mar 2014 15:36:40 +0000 (16:36 +0100)]
lib: remove kmstest_create_fb
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>
Daniel Vetter [Sun, 23 Mar 2014 15:24:38 +0000 (16:24 +0100)]
lib/igt_aux: Lost doc polish hunk.
Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ben Widawsky [Tue, 25 Mar 2014 18:35:23 +0000 (11:35 -0700)]
quick_dump: Fix the danvet fallout.
quick_dump built fine, but it could actually run, since a lot of the
linking happens at run time. There is one hack where we redefine the
environment stuff, since depending on igt_aux means we have to pull in
libdrm, which I do not want to do.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Mika Kuoppala [Wed, 26 Mar 2014 15:24:43 +0000 (17:24 +0200)]
lib/intel_batchbuffer fix OUT_RELOC doc tag
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Daniel Vetter [Wed, 26 Mar 2014 14:09:23 +0000 (15:09 +0100)]
lib/igt_core: fix igt_skip_on_simulation regression
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>
Daniel Vetter [Tue, 25 Mar 2014 16:46:32 +0000 (17:46 +0100)]
README: document quirks for regenerating gtk-doc
It sucks a bit atm :(
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 25 Mar 2014 13:23:20 +0000 (14:23 +0100)]
tests/gem_exec_parse: fixups for the recent massive refactoring
I think we might have some use for a do_ioctl_expected_errno or some
such thing. But that's for later.
Cc: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Brad Volkin [Wed, 29 Jan 2014 21:58:30 +0000 (13:58 -0800)]
tests/gem_exec_parse: Test a command crossing a page boundary
This is a speculative test in that it's not particularly relevant
today, but is important if we switch the parser implementation to
use kmap_atomic instead of vmap.
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Brad Volkin [Wed, 29 Jan 2014 21:58:29 +0000 (13:58 -0800)]
tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Brad Volkin [Wed, 29 Jan 2014 21:58:28 +0000 (13:58 -0800)]
tests/gem_exec_parse: Add tests for bitmask checks
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Brad Volkin [Wed, 29 Jan 2014 21:58:27 +0000 (13:58 -0800)]
tests/gem_exec_parse: Add tests for register whitelist
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Brad Volkin [Wed, 29 Jan 2014 21:58:26 +0000 (13:58 -0800)]
tests/gem_exec_parse: Add tests for rejected commands
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Brad Volkin [Wed, 29 Jan 2014 21:58:25 +0000 (13:58 -0800)]
tests: Add a test for the command parser
Start with a simple testcase that should pass.
v2: Switch to I915_PARAM_CMD_PARSER_VERSION
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Mika Kuoppala [Mon, 17 Mar 2014 17:09:23 +0000 (19:09 +0200)]
tests/gem_reset_stats: run non hw context tests also on older gens
To gain more coverage on interface, default context and banning.
As there is no proper reset support for gen <= 3, we only
do limited interface testing on those.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Fri, 14 Mar 2014 15:47:50 +0000 (16:47 +0100)]
tests/pm_rps: fixup the blt copy load helper changes
All suggested by Jeff McGee.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 23 Mar 2014 14:14:16 +0000 (15:14 +0100)]
lib/intel_batchbuffer: document header dependencies
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>
Daniel Vetter [Sun, 23 Mar 2014 14:03:14 +0000 (15:03 +0100)]
lib/drmtest: api documentation
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>
Daniel Vetter [Sun, 23 Mar 2014 13:45:13 +0000 (14:45 +0100)]
lib: Use @include tag for include files
Occasionally useful to read documentation ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 23 Mar 2014 13:38:17 +0000 (14:38 +0100)]
lib: s/igt_env_set/igt_check_boolean_env_var
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>