platform/upstream/intel-gpu-tools.git
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>
10 years agotests/pm_pc8: BDW should also support PC8 residencies
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>
10 years agotests/pm_pc8: use XY_COLOR_BLT instead of just COLOR_BLT
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>
10 years agotests/pm_pc8: add "stay" mode
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>
10 years agoevictions: Limit the number of minor eviction surfaces to fit in RAM
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>
10 years agolib: Test against available swap
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>
10 years agotests/pm_pc8: add pci-d3-state subtest
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>
10 years agotests/pm_pc8: add reg-read-ioctl subtest
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>
10 years agogem_render_tiled_blits: Trim usage to fit within RAM
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>
10 years agogem_render_linear_blits: Trim usage to fit within RAM
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>
10 years agoquick_dump: Add missed broadwell autodetect
Ben Widawsky [Fri, 21 Feb 2014 21:15:35 +0000 (13:15 -0800)]
quick_dump: Add missed broadwell autodetect

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agokms_flip: Add dpms-vs-vblank-race and modeset-vs-vblank-race subtests
Ville Syrjälä [Fri, 21 Feb 2014 15:19:57 +0000 (17:19 +0200)]
kms_flip: Add dpms-vs-vblank-race and modeset-vs-vblank-race subtests

dpms-vs-vblank-race and modeset-vs-vblank-race try to race wait for
vblank ioctls from one thread against modeset/dpms ioctls from another.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_flip: Skip tests that try to inject GPU hangs if already terminally wedged
Chris Wilson [Fri, 21 Feb 2014 15:14:08 +0000 (15:14 +0000)]
kms_flip: Skip tests that try to inject GPU hangs if already terminally wedged

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agokms_flip: Assert that hang_gpu() should only fail is the GPU is already hung
Chris Wilson [Fri, 21 Feb 2014 15:08:22 +0000 (15:08 +0000)]
kms_flip: Assert that hang_gpu() should only fail is the GPU is already hung

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests: Compile all threaded tests with -pthread when appropriate
Chris Wilson [Fri, 21 Feb 2014 14:42:27 +0000 (14:42 +0000)]
tests: Compile all threaded tests with -pthread when appropriate

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agokms_flip: Fail the subtest if page flip hang recovery wasn't actually tested
Ville Syrjälä [Fri, 21 Feb 2014 14:08:28 +0000 (16:08 +0200)]
kms_flip: Fail the subtest if page flip hang recovery wasn't actually tested

Context banning can prevent the page flip hang tests from actaully
testing anything, so make the relevant subtests fail in that case.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_flip: Restore rings to running state in unhang_gpu()
Ville Syrjälä [Fri, 21 Feb 2014 13:14:33 +0000 (15:14 +0200)]
kms_flip: Restore rings to running state in unhang_gpu()

If things go bad, make sure the rings aren't left in the stopped state.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/pm_pc8: try to modprobe msr
Paulo Zanoni [Thu, 20 Feb 2014 20:47:53 +0000 (17:47 -0300)]
tests/pm_pc8: try to modprobe msr

Just in case it's compile with M instead of Y. If the module is not
there, the other assertions will catch the problem.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: try to modprobe i2c-dev
Paulo Zanoni [Thu, 20 Feb 2014 20:45:53 +0000 (17:45 -0300)]
tests/pm_pc8: try to modprobe i2c-dev

Just in case the module is compiled with M instead of Y. If the module
is not there, the other assertions will catch the problem.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: add gem-idle subtest
Paulo Zanoni [Tue, 18 Feb 2014 17:27:19 +0000 (14:27 -0300)]
tests/pm_pc8: add gem-idle subtest

It's triggering WARNs and DRM_ERRORs on current drm-intel-nighly.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: remove sleep() call when setting up the environment
Paulo Zanoni [Mon, 17 Feb 2014 19:29:36 +0000 (16:29 -0300)]
tests/pm_pc8: remove sleep() call when setting up the environment

This sleep was added because sometimes we didn't reach PC8+
residencies, but it was still not enough to prevent the problem every
time, and it is really not needed most of the times. I have
investigated more and it seems that we only have to wait until after
some minutes have past since the machine booted. So just remove the
sleep for now since when you run each subtest in a separate process,
you end up having to sleep at every subtest.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/gen7_forcewake_mt: use -lpthread
Paulo Zanoni [Fri, 21 Feb 2014 13:05:54 +0000 (10:05 -0300)]
tests/gen7_forcewake_mt: use -lpthread

Otherwise it fails to compile on my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agokms_flip: Try to make hang_gpu() robust against hanging the GPU
Chris Wilson [Fri, 21 Feb 2014 09:38:43 +0000 (09:38 +0000)]
kms_flip: Try to make hang_gpu() robust against hanging the GPU

On a bad day, hanging the GPU may be terminal. Yet even if the GPU is
terminally wedged we expect modesetting (and pageflips) to continue.
That deserves to be a dedicated test, but in the meantime we should
strive to avoid falling over just because the code is not resilient.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoAdd i915_pciids.h
Chris Wilson [Thu, 20 Feb 2014 13:41:41 +0000 (13:41 +0000)]
Add i915_pciids.h

This is a pure copy from the central location at
kernel/include/drm/i915_pciids.h

10 years agotests: Add gen7_forcewake_mt
Chris Wilson [Thu, 20 Feb 2014 13:27:05 +0000 (13:27 +0000)]
tests: Add gen7_forcewake_mt

This is supposed to be snafu...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agobuild: Skip kms_plane on Android
Joao Santos [Wed, 19 Feb 2014 14:19:19 +0000 (14:19 +0000)]
build: Skip kms_plane on Android

Skipping this test until we have Cairo in the build.

Signed-off-by: Joao Santos <joao.santos@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_pipe_crc_basic: Remove spurious inclusion of glib.h
Damien Lespiau [Tue, 18 Feb 2014 14:17:10 +0000 (14:17 +0000)]
kms_pipe_crc_basic: Remove spurious inclusion of glib.h

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_plane: Remove spurious inclusion of glib.h
Damien Lespiau [Tue, 18 Feb 2014 14:16:49 +0000 (14:16 +0000)]
kms_plane: Remove spurious inclusion of glib.h

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotest/kms_flip: fix up igt logging conversion
Daniel Vetter [Thu, 13 Feb 2014 18:22:53 +0000 (19:22 +0100)]
test/kms_flip: fix up igt logging conversion

Silly me ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotestdisplay: Allow to specify the dpms level
Daniel Vetter [Thu, 13 Feb 2014 18:22:35 +0000 (19:22 +0100)]
testdisplay: Allow to specify the dpms level

aka the jbarnes-me-harder mode

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotestdisplay: implement dpms test
Daniel Vetter [Thu, 13 Feb 2014 18:15:38 +0000 (19:15 +0100)]
testdisplay: implement dpms test

For those who wonder about the -j switch ... all the good ones have
been taken, so this is the Jesse-flag.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Mention new logging support
Daniel Vetter [Thu, 13 Feb 2014 13:43:20 +0000 (14:43 +0100)]
NEWS: Mention new logging support

10 years agotests/kms_flip: use igt logging
Daniel Vetter [Thu, 13 Feb 2014 13:25:55 +0000 (14:25 +0100)]
tests/kms_flip: use igt logging

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_seqno_wrap: use igt logging
Daniel Vetter [Thu, 13 Feb 2014 13:12:03 +0000 (14:12 +0100)]
tests/gem_seqno_wrap: use igt logging

Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotest/pm_rps: use igt logging
Daniel Vetter [Thu, 13 Feb 2014 13:09:41 +0000 (14:09 +0100)]
test/pm_rps: use igt logging

Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: (somewhat) structured logging support
Daniel Vetter [Wed, 12 Feb 2014 14:19:15 +0000 (15:19 +0100)]
lib: (somewhat) structured logging support

Apparently there's a bit a need for more verbose output in testcases,
mostly for debugging purposes. At least gem_reset_stats and pm_rps
have a verbose mode.

On top of that we're currently not taking advantage of piglit's "warn"
state all that much. But I think it might be useful for testcases which
are notorious for some kinds of spurious failures, like e.g. the really
nasty timing checks in kms_flip. If we demote some of them to just
warnings we could run the overall tests more often.

Hence this patchs adds a new igt_log function with the three levels DEBUG,
INFO and WARN. Plus a bunch of convenience helpers to keep the test
code tidy.

The level can be set through an enviroment vairable IGT_LOG_LEVEL with
info being the default. Also tests can look at the selected log level in
case they want to run costly debug functions only when needed.

Comments highly welcome, I plan to roll this out over tests which can
use it (not all, imo that's too much churn) once we've settled on the
interfaces/semantics.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoAssembler/bdw: Remove the unsupported cache agent for WRITE(...)
Zhao Yakui [Tue, 28 Jan 2014 01:53:50 +0000 (09:53 +0800)]
Assembler/bdw: Remove the unsupported cache agent for WRITE(...)

The Sampler/Constant cache is read-only. And it can't be used as
the target cache agent of WRITE message.

Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotests: fix sub-test enumeration
Thomas Wood [Wed, 12 Feb 2014 15:54:27 +0000 (15:54 +0000)]
tests: fix sub-test enumeration

Ensure sub-tests can be listed correctly by doing any test setup within
an igt_fixture block.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Mention Damien's new helper library
Daniel Vetter [Tue, 11 Feb 2014 23:12:07 +0000 (00:12 +0100)]
NEWS: Mention Damien's new helper library

10 years agolib: Make igt_skip noreturn
Daniel Vetter [Tue, 11 Feb 2014 22:54:19 +0000 (23:54 +0100)]
lib: Make igt_skip noreturn

This is a remnant from the subtest code before we had proper
fixture blocks. With those there's no no reason to have igt_skip
calls outside of fixtures or subtests, so we can assert this and
hence always jump out.

Suggested by Thomas Wood since static analyzers got confused about
this.

To check for fallout I've run all tests as non-root so that they'll
all skip. Only very little fallout resulted.

Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: install exit handler only on success for prefault control
Daniel Vetter [Tue, 11 Feb 2014 23:07:11 +0000 (00:07 +0100)]
lib: install exit handler only on success for prefault control

Otherwise we'll hit an igt_skip in the exit handler, which upsets
the new in_fixture||in_subtests checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotest/gem_gtt_hog: bail out earlier
Daniel Vetter [Tue, 11 Feb 2014 23:05:57 +0000 (00:05 +0100)]
test/gem_gtt_hog: bail out earlier

This way we properly skip instead of failing hard. Just result
polish when running on non-intel systems.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_madvise: use correct main block
Daniel Vetter [Tue, 11 Feb 2014 22:52:43 +0000 (23:52 +0100)]
tests/gem_madvise: use correct main block

igt_simple_main doesn't enumerate subtests ...

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_bad_ctx_exec: Properly wrap in igt_fixtures
Daniel Vetter [Tue, 11 Feb 2014 22:50:10 +0000 (23:50 +0100)]
tests/gem_bad_ctx_exec: Properly wrap in igt_fixtures

Caught by the new nasty assert in igt_skip.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_close_race: Properly wrap init code in fixtures
Daniel Vetter [Tue, 11 Feb 2014 22:47:50 +0000 (23:47 +0100)]
tests/gem_close_race: Properly wrap init code in fixtures

Blows up otherwise if there's no intel gpu around.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: fix header include
Daniel Vetter [Tue, 11 Feb 2014 22:36:24 +0000 (23:36 +0100)]
lib: fix header include

drm/ path is for the headers from kernel sources, without when using
the pkgconfig libdrm version.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib/display: Fix typo in igt_plane_get_fd_id() (fb)
Damien Lespiau [Tue, 11 Feb 2014 17:53:00 +0000 (17:53 +0000)]
lib/display: Fix typo in igt_plane_get_fd_id() (fb)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_pipe_crc_basic: Remove igt_display_get_n_pipes() usage in main
Damien Lespiau [Tue, 11 Feb 2014 17:48:32 +0000 (17:48 +0000)]
kms_pipe_crc_basic: Remove igt_display_get_n_pipes() usage in main

The fixture won't be run when listing the subtests and thus we can't use
igt_display_get_n_pipes() in the list of tests. The alternative here is
to list the subtests with the maximum values and skip when not supported
on the platform.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: Fix igt_ouput_get_plane() typo (output)
Damien Lespiau [Tue, 11 Feb 2014 17:45:48 +0000 (17:45 +0000)]
lib: Fix igt_ouput_get_plane() typo (output)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: Don't wait in igt_wait_for_keypress() if stdin is not a tty
Damien Lespiau [Tue, 11 Feb 2014 13:54:10 +0000 (13:54 +0000)]
lib: Don't wait in igt_wait_for_keypress() if stdin is not a tty

When running in a non interactive terminal, there's little point in
trying to wait for some input on stdin.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_plane: Start a basic display plane test
Damien Lespiau [Thu, 6 Feb 2014 21:20:35 +0000 (21:20 +0000)]
kms_plane: Start a basic display plane test

We test the sprite plane positionning in there, for now.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/display: Fix assertion in set_plane()
Damien Lespiau [Fri, 7 Feb 2014 14:12:44 +0000 (14:12 +0000)]
lib/display: Fix assertion in set_plane()

When cycling throuth planes, we still want to reach the cursor plane. We
have to special case IGT_PLANE_CURSOR as a shorthand to select the
cursor plane (the last plane on the pipe).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/display: Wait for a vblank after SetPlane()
Damien Lespiau [Thu, 6 Feb 2014 21:18:28 +0000 (21:18 +0000)]
lib/display: Wait for a vblank after SetPlane()

Let's be testing friendly and gently wait for the next vblank before
returning from commit() when needed.

After igt_display_commit() one can safely look at the CRC.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/display: Print the fb id, not its pointer in the set_fb() log message
Damien Lespiau [Thu, 6 Feb 2014 21:06:59 +0000 (21:06 +0000)]
lib/display: Print the fb id, not its pointer in the set_fb() log message

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/display: Add a way to wait at every commit for inspection
Damien Lespiau [Thu, 6 Feb 2014 21:06:25 +0000 (21:06 +0000)]
lib/display: Add a way to wait at every commit for inspection

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: Add a helper to wait for a keypress
Damien Lespiau [Thu, 6 Feb 2014 21:06:07 +0000 (21:06 +0000)]
lib: Add a helper to wait for a keypress

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_pipe_crc_basic: Use kmstest_create_color_fb()
Damien Lespiau [Thu, 6 Feb 2014 19:10:51 +0000 (19:10 +0000)]
kms_pipe_crc_basic: Use kmstest_create_color_fb()

Reducing again the per-test number of lines.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: Include drm_fourcc.h from igt_kms.h
Damien Lespiau [Thu, 6 Feb 2014 19:09:53 +0000 (19:09 +0000)]
lib: Include drm_fourcc.h from igt_kms.h

This include is needed for the DRM_FORMAT* defines used in the fb
creation helpers.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_cursor_crc: Use kmstest_create_color_fb()
Damien Lespiau [Thu, 6 Feb 2014 19:04:58 +0000 (19:04 +0000)]
kms_cursor_crc: Use kmstest_create_color_fb()

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: Introduce a new helper kmstest_create_color_fb()
Damien Lespiau [Thu, 6 Feb 2014 19:04:12 +0000 (19:04 +0000)]
lib: Introduce a new helper kmstest_create_color_fb()

We need to create fbs of a single color in a few places. Time to
abstract that out to a helper function.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/display: Add support for DRM planes
Damien Lespiau [Thu, 6 Feb 2014 17:54:33 +0000 (17:54 +0000)]
lib/display: Add support for DRM planes

We can now extend our plane support beyond primary and cursor planes.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotests/kms_cursor_crc: Use igt_pipe_crc_collect_crc()
Damien Lespiau [Thu, 6 Feb 2014 16:26:31 +0000 (16:26 +0000)]
tests/kms_cursor_crc: Use igt_pipe_crc_collect_crc()

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/crc: Add a helper to read a single CRC value
Damien Lespiau [Thu, 6 Feb 2014 16:17:38 +0000 (16:17 +0000)]
lib/crc: Add a helper to read a single CRC value

In this case, we also take care of starting/stopping the CRC collection.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/crc: Factor out reading a single CRC value
Damien Lespiau [Thu, 6 Feb 2014 16:17:14 +0000 (16:17 +0000)]
lib/crc: Factor out reading a single CRC value

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/display: Check if we're trying to use the same pipe on 2 outputs
Damien Lespiau [Thu, 6 Feb 2014 16:05:19 +0000 (16:05 +0000)]
lib/display: Check if we're trying to use the same pipe on 2 outputs

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib/display: Allow to override the display verbosity with an env variale
Damien Lespiau [Wed, 5 Feb 2014 17:51:50 +0000 (17:51 +0000)]
lib/display: Allow to override the display verbosity with an env variale

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_cursor_crc: Port the test to the new modeset API
Damien Lespiau [Wed, 5 Feb 2014 17:14:12 +0000 (17:14 +0000)]
kms_cursor_crc: Port the test to the new modeset API

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>