platform/upstream/intel-gpu-tools.git
10 years agogem_bad_reloc: Add subtest for LUT-based execbuffers
Chris Wilson [Thu, 15 May 2014 12:10:21 +0000 (13:10 +0100)]
gem_bad_reloc: Add subtest for LUT-based execbuffers

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoAdd gem_bad_reloc
Chris Wilson [Thu, 15 May 2014 07:43:11 +0000 (08:43 +0100)]
Add gem_bad_reloc

This test feeds a batch containing self-references into the kernel and
checks that the relocation offsets remain as valid GTT addresses. This
is to exercise SNA passing in negative relocation deltas which can hang
the GPU if they wrap around.

References: https://bugs.freedesktop.org/show_bug.cgi?id=78533
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests/kms_flip: Fix vblank ts check
Daniel Vetter [Wed, 14 May 2014 15:59:25 +0000 (17:59 +0200)]
tests/kms_flip: Fix vblank ts check

Oops, fumbled that in the conversion.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_fence_pin_leak: Exercise full ppgtt fence pin_count leak in the kernel
Ville Syrjälä [Mon, 12 May 2014 11:18:42 +0000 (14:18 +0300)]
tests/kms_fence_pin_leak: Exercise full ppgtt fence pin_count leak in the kernel

The kernel full ppgtt support has a bug where it can drop a pinned
fence to the floor, hence we leak the pin_count as the subsequent
fence unpin becomes a nop. We can trigger it easily by unbinding a
buffer from a ppgtt address space while the buffer is simultaneosly
being used for scanout.

Make the kernel leak the fence pin_count and trick it into picking
a new fence register for the next scanout buffer. Looping like
this for a while we leak the pin_count for all fence registers after
which the kernel can no longer find a new fence register when it needs
one. As a result we get back a SIGBUS from the GTT mmap access.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib/igt_core: Fixup docs with symbolic exit codes
Daniel Vetter [Wed, 14 May 2014 13:33:27 +0000 (15:33 +0200)]
lib/igt_core: Fixup docs with symbolic exit codes

Conflict between me and Thomas pushing patches in parallel.

Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: add exit status defines
Thomas Wood [Tue, 13 May 2014 14:22:52 +0000 (15:22 +0100)]
lib: add exit status defines

Add defines for success, skip and timeout exit statuses.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agolib: set a timeout when reading crc values
Thomas Wood [Mon, 12 May 2014 09:20:55 +0000 (10:20 +0100)]
lib: set a timeout when reading crc values

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: add igt_set_timeout
Thomas Wood [Mon, 12 May 2014 09:19:52 +0000 (10:19 +0100)]
lib: add igt_set_timeout

Add a function to stop and fail a test after the specified number of
seconds have elapsed.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotests/kms_flip: Use asserts
Daniel Vetter [Wed, 14 May 2014 09:52:35 +0000 (11:52 +0200)]
tests/kms_flip: Use asserts

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Remove unused tiling tests
Daniel Vetter [Wed, 14 May 2014 09:41:55 +0000 (11:41 +0200)]
tests/prime_nv_pcopy: Remove unused tiling tests

We now know that the hardware can't do this, and it's not designed to.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Drop return values from tests
Daniel Vetter [Wed, 14 May 2014 09:39:31 +0000 (11:39 +0200)]
tests/prime_nv_pcopy: Drop return values from tests

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Drop return values from copy/check functions
Daniel Vetter [Wed, 14 May 2014 09:31:31 +0000 (11:31 +0200)]
tests/prime_nv_pcopy: Drop return values from copy/check functions

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Use asserts in setup code
Daniel Vetter [Wed, 14 May 2014 08:57:46 +0000 (10:57 +0200)]
tests/prime_nv_pcopy: Use asserts in setup code

Now we even have more fine-grained checking and only skip if the
nouveau card isn't supported, but fail properly if something else goes
wrong.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_pcopy: Use asserts in nv_bo_alloc
Daniel Vetter [Wed, 14 May 2014 08:49:40 +0000 (10:49 +0200)]
tests/prime_nv_pcopy: Use asserts in nv_bo_alloc

Step one to untangle the control flow in this test and replace it all
with igt assert magic.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/prime_nv_api: Use asserts instead of control flow
Daniel Vetter [Wed, 14 May 2014 08:44:16 +0000 (10:44 +0200)]
tests/prime_nv_api: Use asserts instead of control flow

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_seqno_wrap: Replace control flow with asserts
Daniel Vetter [Wed, 14 May 2014 08:07:17 +0000 (10:07 +0200)]
tests/gem_seqno_wrap: Replace control flow with asserts

Only tricky bit was a bit of debug output sprinkled all over, I've
moved it all to cmp_bo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Use igt macros more
Daniel Vetter [Wed, 14 May 2014 07:56:53 +0000 (09:56 +0200)]
tests: Use igt macros more

Often just folding together of the common if (cond) printf;
abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out
more since the igt macros will already print the condition and errno.

A few tests where more work (like ripping out return codes en masse)
is needed left as-is.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: sprinkle igt logging
Daniel Vetter [Tue, 13 May 2014 22:36:04 +0000 (00:36 +0200)]
tests: sprinkle igt logging

All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.

Some information output removed when it's redundant with the subtest
status.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agopm_pc8: add system-suspend subtest
Imre Deak [Tue, 13 May 2014 12:49:58 +0000 (15:49 +0300)]
pm_pc8: add system-suspend subtest

Signed-off-by: Imre Deak <imre.deak@intel.com>
10 years agotests/kms_fbc_crc: Use igt_create_color_fb()
Ville Syrjälä [Tue, 13 May 2014 12:02:37 +0000 (15:02 +0300)]
tests/kms_fbc_crc: Use igt_create_color_fb()

No need to hand roll the alloc fb+paint code anymore, just use the
common helper.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_fbc_crc: Reset display state between subtests
Ville Syrjälä [Tue, 13 May 2014 11:49:53 +0000 (14:49 +0300)]
tests/kms_fbc_crc: Reset display state between subtests

If a subtest fails it'll leave the display in a state that may prevent
the next subtest from working. So reset the display state between
subtests.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_fbc_crc: Switch to using the igt_display stuff
Ville Syrjälä [Tue, 13 May 2014 10:56:41 +0000 (13:56 +0300)]
tests/kms_fbc_crc: Switch to using the igt_display stuff

Let's try to use the common igt_display framework to make the code a bit
nicer.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_fbc_crc: Simplify pipe_crc mess
Ville Syrjälä [Tue, 13 May 2014 10:38:20 +0000 (13:38 +0300)]
tests/kms_fbc_crc: Simplify pipe_crc mess

There's no need to keep an array of pipe_crc objects around. Just keep
one for the duration of the specific crtc/connector/test combo.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib/igt_core: Fix type on igt_log doc
Daniel Vetter [Tue, 13 May 2014 10:28:26 +0000 (12:28 +0200)]
lib/igt_core: Fix type on igt_log doc

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib/igt_core: Document testrunner interface a bit
Daniel Vetter [Tue, 13 May 2014 09:29:34 +0000 (11:29 +0200)]
lib/igt_core: Document testrunner interface a bit

Also fix up one gtkdoc fumble in igt_fb. We should use symbolic
defines if possible instead of just listening the magic 0, 77, 78
values for exit codes, but that's a separate patch.

Cc: tim.gore@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: Move igt tests to intel validation area
Tim Gore [Tue, 13 May 2014 08:34:42 +0000 (09:34 +0100)]
intel-gpu-tools: Move igt tests to intel validation area

Currently when IGT is built for Android the resulting test
executables go to /system/bin, which is not ideal. After
discussion with the core validation team i have moved them
to /system/vendor/intel/validation/core/igt by setting
LOCAL_MODULE_PATH.

I have also added a --defsym linker option to export a
symbol that allows a script to easily distinguish between
tests that have subtests and those that dont. There are
better ways to do this (viz, in the source code) but
because the igt tests are not written consistently this
would require many more changes.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Android has libcairo support now!
Daniel Vetter [Tue, 13 May 2014 09:12:34 +0000 (11:12 +0200)]
NEWS: Android has libcairo support now!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: Build tests needing cairo if ANDROID_HAS_CAIRO=1
Tim Gore [Mon, 12 May 2014 12:39:00 +0000 (13:39 +0100)]
intel-gpu-tools: Build tests needing cairo if ANDROID_HAS_CAIRO=1

Until now the tests that depended on libcairo were simply
skipped in the android build. Now that I have a cairo port
working, build these cairo dependent tests if ANDROID_HAS_CAIRO
is set to 1 in the environment.
For information on building cairo for IGT on Android see the
wiki at:

https://securewiki.ith.intel.com/display/GFXCore/IGT+Test+Suite+on+Android

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gen7_forcewake_mt: Don't set the GGTT bit in SRM command
Brad Volkin [Sat, 10 May 2014 21:11:53 +0000 (14:11 -0700)]
tests/gen7_forcewake_mt: Don't set the GGTT bit in SRM command

The command parser in newer kernels will reject it and setting this
bit is not required for the actual test case.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76670
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotestdisplay: fix restoring termio at exit
Imre Deak [Mon, 12 May 2014 10:29:49 +0000 (13:29 +0300)]
testdisplay: fix restoring termio at exit

At normal exit in test_all_modes we don't restore the original termio,
since g_io_channel_shutdown() closes the stdin fd and so the following
tcsetattr on stdin will fail. We also don't restore the termio at signal
exit. Fix both cases by installing an exit hanlder with a dup'ed stdin fd.

Signed-off-by: Imre Deak <imre.deak@intel.com>
10 years agotests/kms_fbc_crc: Check context support earlier
Ville Syrjälä [Thu, 8 May 2014 12:56:24 +0000 (15:56 +0300)]
tests/kms_fbc_crc: Check context support earlier

Check for context support before doing anything else in the subtest.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_fbc_crc: Allow the subtests to pass even if some planes aren't FBC capable
Ville Syrjälä [Thu, 8 May 2014 12:56:24 +0000 (15:56 +0300)]
tests/kms_fbc_crc: Allow the subtests to pass even if some planes aren't FBC capable

Don't skip the entire subtest if FBC only works on some of the primary
planes, as is the case on pre-gen4 and hsw+. Only skip the entire subtest
if all crtc/connector combinations skip.

Also print some kind of status for all otherwise valid crtc/connector combos
if they skip due to FBC being disabled or CRC support not being there.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoigt/gem_render_tiled_blits: Speed up by using the GPU to detile
Chris Wilson [Thu, 8 May 2014 10:56:56 +0000 (11:56 +0100)]
igt/gem_render_tiled_blits: Speed up by using the GPU to detile

Avoid accessing via the slow GTT to read back and compare the contents
of each bo against expected results. It is much faster, on llc at least,
to detile using the GPU and then copy to system memory for the compare.

Before:

IVB: time sudo ./gem_render_tiled_blits
IGT-Version: 1.6-ge46ff3f (x86_64) (Linux: 3.15.0-rc3+ x86_64)
Using 3072 1MiB buffers
Verifying initialisation...
Cyclic blits, forward...
Cyclic blits, backward...
Random blits...

real 6m26.005s
user 6m19.234s
sys 0m2.414s

PNV: time sudo ./gem_render_tiled_blits
IGT-Version: 1.6-g8556f8a (i686) (Linux: 3.15.0-rc2+ i686)
Using 768 1MiB buffers
Verifying initialisation...
Cyclic blits, forward...
Cyclic blits, backward...
Random blits...

real 1m45.431s
user 1m34.960s
sys 0m4.624s

Using pread:

IVB: time sudo ./gem_render_tiled_blits
IGT-Version: 1.6-ge46ff3f (x86_64) (Linux: 3.15.0-rc3+ x86_64)
Using 3072 1MiB buffers
Verifying initialisation...
Cyclic blits, forward...
Cyclic blits, backward...
Random blits...

real 0m14.717s
user 0m3.699s
sys 0m3.192s

Using snoop:

IVB: time sudo ./gem_render_tiled_blits
IGT-Version: 1.6-ge46ff3f (x86_64) (Linux: 3.15.0-rc3+ x86_64)
Using 3072 1MiB buffers
Using a snoop linear buffer for comparisons
Verifying initialisation...
Cyclic blits, forward...
Cyclic blits, backward...
Random blits...

real 0m13.774s
user 0m3.900s
sys 0m2.089s

PNV: time sudo ./gem_render_tiled_blits
IGT-Version: 1.6-g8556f8a (i686) (Linux: 3.15.0-rc2+ i686)
Using 768 1MiB buffers
Using a snoop linear buffer for comparisons
Verifying initialisation...
Cyclic blits, forward...
Cyclic blits, backward...
Random blits...

real 0m20.831s
user 0m4.384s
sys 0m5.032s

So roughly 10-30x faster depending on platform.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78244
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agoigt/gem_lut_handle: Fix errno checking
Chris Wilson [Thu, 8 May 2014 09:04:35 +0000 (10:04 +0100)]
igt/gem_lut_handle: Fix errno checking

Regression from
commit c1404e05b7477122b9923ba029593c2cb64671a7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 29 07:14:33 2014 +0100

    errno is reset after each syscall

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests/gem_flink_race,prime_self_import: fix object counts
Mika Kuoppala [Wed, 7 May 2014 13:46:19 +0000 (16:46 +0300)]
tests/gem_flink_race,prime_self_import: fix object counts

We need to add one drm_open_any() before getting the object counts
as first call to drm_open_any() allocates file descriptors for
exit handlers and thus is not symmetrical.

The regression, assymmetric behaviour, was introduced in:

commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84
Author: Mika Kuoppala <mika.kuoppala@intel.com>
Date:   Fri Mar 28 10:52:46 2014 +0200

    lib/drmtest: don't dup quiescent fd

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77867
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77875
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agointel_bios_reader: make edp block decode match kernel
Jani Nikula [Tue, 6 May 2014 11:06:52 +0000 (14:06 +0300)]
intel_bios_reader: make edp block decode match kernel

All the somewhat recent VBT specs and the kernel have different format
for the eDP block than what the tool decodes. What the tool does *may*
be correct for really old VBT, but I have no specs or other reference to
suppor this. Just do what the kernel does, that's what we're interested
in anyway.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 years agogem_alive: A utility to see if the driver or GPU has hung
Chris Wilson [Mon, 5 May 2014 09:57:12 +0000 (10:57 +0100)]
gem_alive: A utility to see if the driver or GPU has hung

10 years agooverlay: Parse /proc/interrupts in lieu of debugfs/i915_gem_interrupt
Chris Wilson [Wed, 30 Apr 2014 17:39:27 +0000 (18:39 +0100)]
overlay: Parse /proc/interrupts in lieu of debugfs/i915_gem_interrupt

So the interrupt counter was removed from i915_gem_interrupt, and if we
do not have the perf API available, we therefore need to read it from
/proc/interrupts instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agooverlay: Use new i915_frequency_info in fallback code
Chris Wilson [Wed, 30 Apr 2014 17:38:26 +0000 (18:38 +0100)]
overlay: Use new i915_frequency_info in fallback code

Actually use the new location to get frequency information when perf is
not available.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests/pm_pc8: subtests for runtime pm for dpms
Daniel Vetter [Thu, 24 Apr 2014 21:37:05 +0000 (23:37 +0200)]
tests/pm_pc8: subtests for runtime pm for dpms

Very basic since I lack a bit ideas. After all with the latest
patches runtime pm doesn't make much a difference between dpms off
and disabling the outputs completely with SetCrtc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: extract kmstest_set_connector_dpms
Daniel Vetter [Thu, 24 Apr 2014 21:33:09 +0000 (23:33 +0200)]
lib: extract kmstest_set_connector_dpms

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Fix make depencies for test list
Daniel Vetter [Wed, 30 Apr 2014 16:05:21 +0000 (18:05 +0200)]
tests: Fix make depencies for test list

Oops, pretty bad ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoAdd Cherryview PCI IDs
Ville Syrjälä [Tue, 18 Dec 2012 15:43:13 +0000 (17:43 +0200)]
Add Cherryview PCI IDs

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoNEWS: Updates
Daniel Vetter [Tue, 29 Apr 2014 15:17:24 +0000 (17:17 +0200)]
NEWS: Updates

10 years agoerrno is reset after each syscall
Chris Wilson [Tue, 29 Apr 2014 06:14:33 +0000 (07:14 +0100)]
errno is reset after each syscall

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78055
Bugilla: https://bugs.freedesktop.org/show_bug.cgi?id=78053
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotests/gem_stress: Fix rendercopy vs. keep_gpu_busy on gen6+
Ville Syrjälä [Mon, 28 Apr 2014 14:58:45 +0000 (17:58 +0300)]
tests/gem_stress: Fix rendercopy vs. keep_gpu_busy on gen6+

If the hardware has a blt ring blits aren't allowed on the render ring.
Trying to execute blits on the render ring results in a GPU hang.

Flush outstanding blits from keep_gpu_busy() before calling rendercopy()
so that they don't end up on the render ring.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/gem_exec_params: One more invalid ring tests
Daniel Vetter [Mon, 28 Apr 2014 13:26:15 +0000 (15:26 +0200)]
tests/gem_exec_params: One more invalid ring tests

With the vebox 2 patches the number of internal rings don't match the
number of exposed rings. So add another subtest with an invalid ring
which should be invalid both internally and externally. The bug this
will catch is using the ring structure before validation, which the
old "invalide-ring" wont be able to due to the internal vebox2 ring.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: skip the test if runtime PM is disabled
Imre Deak [Fri, 25 Apr 2014 07:26:46 +0000 (10:26 +0300)]
tests/pm_pc8: skip the test if runtime PM is disabled

The PC8 state won't be entered unless runtime PM is enabled, so support
for PC8 residency counters alone is not enough to run this test.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotest: Fixup for the previous patch
Daniel Vetter [Fri, 25 Apr 2014 15:57:22 +0000 (17:57 +0200)]
test: Fixup for the previous patch

Oops, failed to git add.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotest/gem_userptr_*: Fix compile fail
Daniel Vetter [Fri, 25 Apr 2014 15:52:02 +0000 (17:52 +0200)]
test/gem_userptr_*: Fix compile fail

Also shut up warnings. Those revealed incorrect usage of local
variables in conjunction with igt_fixture/igt_subtest. Since those use
longjmps we need to move the out of the stackframe those magic blocks
are declared in.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact
Tvrtko Ursulin [Fri, 25 Apr 2014 14:42:20 +0000 (15:42 +0100)]
tests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact

This adds a small benchmark for the new userptr functionality.

Apart from basic surface creation and destruction, also tested is the
impact of having userptr surfaces in the process address space. Reason
for that is the impact of MMU notifiers on common address space
operations like munmap() which is per process.

v2:
  * Moved to benchmarks.
  * Added pointer read/write tests.
  * Changed output to say iterations per second instead of
    operations per second.
  * Multiply result by batch size for multi-create* tests
    for a more comparable number with create-destroy test.

v3:
  * Use ALIGN macro.
  * Catchup with big lib/ reorganization.
  * Removed unused code and one global variable.
  * Fixed up some warnings.

v4:
  * Fixed feature test, does not matter here but makes it
    consistent with gem_userptr_blits and clearer.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Brad Volkin <bradley.d.volkin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_vmap_blits: Remove obsolete test case
Tvrtko Ursulin [Fri, 25 Apr 2014 14:42:19 +0000 (15:42 +0100)]
tests/gem_vmap_blits: Remove obsolete test case

No need for the old test case once the new one was added.

v2:
   * Just rebase for lib/ reorganization.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_userptr_blits: Expanded userptr test cases
Tvrtko Ursulin [Fri, 25 Apr 2014 14:42:18 +0000 (15:42 +0100)]
tests/gem_userptr_blits: Expanded userptr test cases

A set of userptr test cases to support the new feature.

For the eviction and swapping stress testing I have extracted
some common behaviour from gem_evict_everything and made both
test cases use it to avoid duplicating the code.

Both unsynchronized and synchronized userptr objects are
tested but the latter set of tests will be skipped if kernel
is compiled without MMU_NOTIFIERS.

Also, with 32-bit userspace swapping tests are skipped if
the system has a lot more RAM than process address space.
Forking swapping tests are not skipped since they can still
trigger swapping by cumulative effect.

v2:
   * Fixed dmabuf test.
   * Added test for rejecting read-only.
   * Fixed ioctl detection for latest kernel patch.

v3:
   * Use ALIGN macro.
   * Catchup with big lib/ reorganization.
   * Fixed up some warnings.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agokms_cursor_crc: Fix the test on platforms where the pipe->port mapping has restrictions
Ville Syrjälä [Fri, 25 Apr 2014 12:27:57 +0000 (15:27 +0300)]
kms_cursor_crc: Fix the test on platforms where the pipe->port mapping has restrictions

On gen2 for instance the LVDS port can only be fed from pipe B. Check
whether the combinations is valid before trying to run the test. Also
clean up the state back to PIPE_ANY properly so that following tests
can again go through all the combinations.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75131
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Wrap igt_require() in igt_fixture
Ville Syrjälä [Fri, 25 Apr 2014 10:37:09 +0000 (13:37 +0300)]
kms_cursor_crc: Wrap igt_require() in igt_fixture

igt_require() must be within a fixture or subtest.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Replace snprintf()+%s with just %d
Ville Syrjälä [Fri, 25 Apr 2014 10:38:31 +0000 (13:38 +0300)]
kms_cursor_crc: Replace snprintf()+%s with just %d

There's no point in first printing the int to temp string using %d
and then printing that out with %s. Just stick the %d into the final
string.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Allow the test to run without cursor cap support
Ville Syrjälä [Fri, 25 Apr 2014 10:50:59 +0000 (13:50 +0300)]
kms_cursor_crc: Allow the test to run without cursor cap support

Assume that only 64x64 cursor size is supported if the cursor size caps
aren't supported by the kernel. This allows the test to run on older
kernels.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Wrap cursor fb creating into igt_fixture
Ville Syrjälä [Fri, 25 Apr 2014 10:49:11 +0000 (13:49 +0300)]
kms_cursor_crc: Wrap cursor fb creating into igt_fixture

We don't want to attempt creating the cursor fb when enumerating
subtests. So wrap it into igt_fixture. Also destroy the cursor
fb after the tests.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Simplify the pipe_crc mess
Ville Syrjälä [Thu, 24 Apr 2014 16:07:18 +0000 (19:07 +0300)]
kms_cursor_crc: Simplify the pipe_crc mess

Instead of allocating an array of igt_pipe_ctc_t objects, just allocate
one and stick it into test_data.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Add background picture
Antti Koskipaa [Thu, 10 Apr 2014 12:08:12 +0000 (15:08 +0300)]
kms_cursor_crc: Add background picture

This gives the cursor something to be on, instead of just a black
background. Slows the test down only one second over six minutes.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
10 years agokms_cursor_crc: Add random cursor placement test
Antti Koskipaa [Thu, 10 Apr 2014 12:08:11 +0000 (15:08 +0300)]
kms_cursor_crc: Add random cursor placement test

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
10 years agokms_cursor_crc: Add moving cursor test
Antti Koskipaa [Thu, 10 Apr 2014 12:08:10 +0000 (15:08 +0300)]
kms_cursor_crc: Add moving cursor test

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
10 years agokms_cursor_crc: Add reference software rendering
Antti Koskipaa [Thu, 10 Apr 2014 12:08:09 +0000 (15:08 +0300)]
kms_cursor_crc: Add reference software rendering

This patch first render the cursor with hardware rendering and
then with software, acquiring the CRC in both cases so they can be
properly compared. Say goodbye to crc_must_match variable.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
10 years agokms_cursor_crc: Separate onscreen and offscreen tests
Antti Koskipaa [Thu, 10 Apr 2014 12:08:08 +0000 (15:08 +0300)]
kms_cursor_crc: Separate onscreen and offscreen tests

Also remove onscreen boolean from parameter list. All test-related
data should be put into test_data from now.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
10 years agokms_cursor_crc: Use a function pointer to call test
Antti Koskipaa [Thu, 10 Apr 2014 12:08:07 +0000 (15:08 +0300)]
kms_cursor_crc: Use a function pointer to call test

More tests are coming, and this allows us to not repeat the boilerplate
code in run_test() for each subtest.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
10 years agokms_cursor_crc: Move cursor enable and disable calls where they belong
Antti Koskipaa [Thu, 10 Apr 2014 12:08:06 +0000 (15:08 +0300)]
kms_cursor_crc: Move cursor enable and disable calls where they belong

We can't have the hw cursor enabled during software render tests.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
[vsyrjala: collect the crc before disalbing the cursor]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Remove some test cases and change cursor to color
Antti Koskipaa [Thu, 10 Apr 2014 12:08:05 +0000 (15:08 +0300)]
kms_cursor_crc: Remove some test cases and change cursor to color

Currently this test is quite useless, since it only checks for valid CRCs when
the correct output from a test is a completely black screen (invisible or visible
but black cursor, or cursor is offscreen) and disables the check when anything
visible is onscreen.

This patch changes the cursor to a colorful one and removes the test cases
that become redundant because of this change. The cursor is designed to be
asymmetrical such that future tests involving rotation, mirroring, etc. produce
different CRCs and failures can be detected.

This (temporarily) disables CRC testing until the next patch which will add
software rendering of the cursor and the CRC generation.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
10 years agoReset errno to 0 after success
Chris Wilson [Fri, 25 Apr 2014 06:40:34 +0000 (07:40 +0100)]
Reset errno to 0 after success

errno is only valid after a syscall wrapper (e.g. ioctl()) reports an
error. However, we report the last errno value as a part of the
igt_assert() output and so we display spurious values such as:

Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802:
Last errno: 11, Resource temporarily unavailable
Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agobenchmarks: Build them on Android.
Tvrtko Ursulin [Wed, 23 Apr 2014 16:03:23 +0000 (17:03 +0100)]
benchmarks: Build them on Android.

They build fine so give them some exposure.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agotests: Extract ALIGN macro into a common header
Tvrtko Ursulin [Wed, 23 Apr 2014 15:07:55 +0000 (16:07 +0100)]
tests: Extract ALIGN macro into a common header

Makes for a little bit less code duplication, especially since
it will be used from more callers in the future.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agotests: Skip building kms_flip_tiling on Android
Tvrtko Ursulin [Wed, 23 Apr 2014 15:02:47 +0000 (16:02 +0100)]
tests: Skip building kms_flip_tiling on Android

Dependencies are not available at the moment so it does not build.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
10 years agotests/gem_exec_params: Fix rel-constants-invalid subtest
Daniel Vetter [Thu, 24 Apr 2014 08:43:38 +0000 (10:43 +0200)]
tests/gem_exec_params: Fix rel-constants-invalid subtest

Reported by Ville and Zhao Yakui.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_dummy_reloc_loop: Add one subtest based on multi drm_fd to test CPU<->GPU...
Zhao Yakui [Thu, 24 Apr 2014 02:15:45 +0000 (10:15 +0800)]
tests/gem_dummy_reloc_loop: Add one subtest based on multi drm_fd to test CPU<->GPU sync under multi BSD rings

The Broadwell GT3 machine has two independent BSD rings in kernel driver while
it is transparent to the user-space driver. In such case it needs to check
the CPU<->GPU sync for the second BSD ring.

V1->V2: Follow Daniel's comment to add one subtext instead of one individual
test case, which is used to test the CPU<->GPU sync under multi BSD rings.

V2->V3: Follow Imre's comment to remove the unnecessary initialization and
use igt_assert_f instead of igt_assert

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Add one ring sync case based on multi drm_fd to test ring semaphore sync under...
Zhao Yakui [Thu, 24 Apr 2014 02:15:44 +0000 (10:15 +0800)]
tests: Add one ring sync case based on multi drm_fd to test ring semaphore sync under multi BSD rings

The Broadwell GT3 machine has two independent BSD rings in kernel driver while
it is transparent to the user-space driver. In such case it needs to check
the ring sync between the two BSD rings. At the same time it also needs to
check the sync among the second BSD ring and the other rings.

V2->V3: Follow Imre's comment to remove the unnecessary initialization and
use igt_assert_f instead of igt_assert.

V3->V4: Add gem_multi_bsd_sync_loop.c into the tests/.gitignore

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Add gem_exec_params
Daniel Vetter [Wed, 23 Apr 2014 18:23:28 +0000 (20:23 +0200)]
tests: Add gem_exec_params

This fills all the gaps we've had in our execbuf testing. Overflow
testing of the various arrays is already done by gem_reloc_overflow.

Also add kms_flip_tiling to .gitignore.

This will cause a bunch of failures since current kernels don't catch
all fallout.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoAdd gem_render_copy_redux
Chris Wilson [Thu, 24 Apr 2014 06:58:09 +0000 (07:58 +0100)]
Add gem_render_copy_redux

This is an "advanced" form of the the simple gem_render_copy test.
Instead of aiming for maximal simplicity to aide debugging of new
rendercopy backends, this test aims to exercise the execbuf interface
using the render ring.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agolib: Fix potential out of bounds access in ring stop code
Ville Syrjälä [Wed, 16 Apr 2014 14:05:43 +0000 (17:05 +0300)]
lib: Fix potential out of bounds access in ring stop code

The subsequet code expects the read() to not have filled the entire
buffer, and yet we allow it to do so. Reduce the size passed to read()
by 1 to make the code sane.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib: Fix assert failure in ring stop code
Ville Syrjälä [Wed, 16 Apr 2014 14:07:07 +0000 (17:07 +0300)]
lib: Fix assert failure in ring stop code

The assert in igt_set_stop_rings() is a bit bogus. Suppsoedly it was
meant to assure that the caller always restores the rings to running
state after stopping them. But in its current form it will trigger
any time someone calls the function and the rings were already stopped.
So you can't even restore the rings to running state w/o the assert
triggering.

Fix it up so that it'll ignore the current ring state when we're trying
to restore the rings back to running state.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests: Compile all the tests
Ville Syrjälä [Mon, 14 Apr 2014 13:23:18 +0000 (16:23 +0300)]
tests: Compile all the tests

A bunch of the tests aren't being built due to a missing '\'. Fix it.

The problem was introduced here:
 commit ddf8cc107e3b78e4c8200b083ed298c24eec1f03
 Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
 Date:   Wed Apr 2 15:31:38 2014 +0300

    test: Add test for checking if page flip changes tiling

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/kms_flip_tiling: Fixes
Daniel Vetter [Fri, 11 Apr 2014 14:16:31 +0000 (16:16 +0200)]
tests/kms_flip_tiling: Fixes

- Wrap up testcase correctly into the magic code block.
- Put local variables out of the longjmp danger zone.

Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotest: Add test for checking if page flip changes tiling
Ander Conselvan de Oliveira [Wed, 2 Apr 2014 12:31:38 +0000 (15:31 +0300)]
test: Add test for checking if page flip changes tiling

Test that a page flip from a tiled buffer to a linear one works
correctly. First, it sets the crtc with the linear buffer andr
generate a reference crc for the pipe. Then, the crtc is set with
the tiled one and page flip to the linear one issued. A new crc is
generated and compared to the rerence one.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
10 years agolib/kmstest: Fix up tiled buffer creation
Daniel Vetter [Tue, 11 Mar 2014 15:14:33 +0000 (16:14 +0100)]
lib/kmstest: Fix up tiled buffer creation

When extracting a raw __gem_set_tiling helper I've fumbled this in

commit 590f6101402b51bca54f69c002380bda967484ea
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Oct 9 20:50:50 2013 +0200

    lib/drmtest: extract rawer __gem_set_tiling

Fix things up so that we properly propaget the error again.

Now to make this all properly work we also need to make kms_flip a
notch more robust against such failures ...

This only blows up on gen2/3 with the pan tests which want a too wide
framebuffer for tiling.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: fix length check in inject_hang
Mika Kuoppala [Thu, 10 Apr 2014 14:51:39 +0000 (17:51 +0300)]
tests/gem_reset_stats: fix length check in inject_hang

To avoid writing past the batch end.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agotests/gem_reset_stats: check gpu state before each subtest
Mika Kuoppala [Fri, 28 Mar 2014 13:12:14 +0000 (15:12 +0200)]
tests/gem_reset_stats: check gpu state before each subtest

Some tests, namely the close pending variety, tries to
carefully drop all handles to gpu when hang is intruduced,
to expose bugs in reset handling without any clients.

Add guards after and before tests to really know if
the gpu is still alive as the particular test might
report success and then gpu dies few seconds after.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agolib/drmtest: don't dup quiescent fd
Mika Kuoppala [Fri, 28 Mar 2014 08:52:46 +0000 (10:52 +0200)]
lib/drmtest: don't dup quiescent fd

If we dup the fd, we are in mercy of the context banning
of the test application. Better to have our own to guarantee
that gem_quiescent_gpu won't find itself banned on exit.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agotests: use lib igt_[get|set]_stop_rings()
Mika Kuoppala [Tue, 25 Mar 2014 10:52:19 +0000 (12:52 +0200)]
tests: use lib igt_[get|set]_stop_rings()

on gem_reset_stats, kms_flip and pm_rps.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75876
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agolib: add igt_get_stop_rings and igt_set_stop_rings
Mika Kuoppala [Tue, 25 Mar 2014 10:21:44 +0000 (12:21 +0200)]
lib: add igt_get_stop_rings and igt_set_stop_rings

Multiple tests are introducing hangs by fidding with i915_ring_stop
debugfs entry.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agotests/gem_reset_stats: end hanging batch properly
Mika Kuoppala [Thu, 10 Apr 2014 13:06:27 +0000 (16:06 +0300)]
tests/gem_reset_stats: end hanging batch properly

As we use chained batch into itself to hang the gpu, there
was no need to end the batchbuffer with BATCH_BUFFER_END.

With the introduction of command parser, the batch
need to have proper BATCH_BUFFER_END in it or it
will be rejected.

While at it, shift the upper half of batch gtt_offset
accordingly with gen8+

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
10 years agotests/gem_exec_parse: Test for OACONTROL tracking
Brad Volkin [Thu, 27 Mar 2014 18:44:45 +0000 (11:44 -0700)]
tests/gem_exec_parse: Test for OACONTROL tracking

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agogem_tiled_swapping: Test using all available fences
Chris Wilson [Mon, 7 Apr 2014 12:10:41 +0000 (13:10 +0100)]
gem_tiled_swapping: Test using all available fences

Use extra threads to cause extra memory pressure and stress upon the
relevant code. Limit the number of threads to available fences to avoid
falling off the fence cliff.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agogem_tiled_swapping: Purge all page/swap caches first
Chris Wilson [Mon, 7 Apr 2014 12:09:46 +0000 (13:09 +0100)]
gem_tiled_swapping: Purge all page/swap caches first

Reset the system to a vanilla state before we query how much RAM/swap
space is available for our testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel-gpu-overlay: Update debugfs path for min/max frequency
Chris Wilson [Mon, 7 Apr 2014 11:07:14 +0000 (12:07 +0100)]
intel-gpu-overlay: Update debugfs path for min/max frequency

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotools/intel_reg_dumper: use haswell_debug_regs on BDW too
Paulo Zanoni [Fri, 4 Apr 2014 16:24:53 +0000 (13:24 -0300)]
tools/intel_reg_dumper: use haswell_debug_regs on BDW too

Instead of using an older set of registers.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: skip tests when no screens are connected
Paulo Zanoni [Fri, 4 Apr 2014 16:22:56 +0000 (13:22 -0300)]
tests/pm_pc8: skip tests when no screens are connected

Instead of failing, just skip the tests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73642
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: add missing newline
Paulo Zanoni [Mon, 31 Mar 2014 20:01:59 +0000 (17:01 -0300)]
tests/pm_pc8: add missing newline

Otherwise the output will get even more confusing.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/gem_cmd_parse: restrict to gen7
Daniel Vetter [Thu, 3 Apr 2014 16:03:21 +0000 (18:03 +0200)]
tests/gem_cmd_parse: restrict to gen7

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76982
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agogem_tiled_swapping: Limit to available memory
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>
10 years agolib/rendercopy: fix alloc len for gen7_bind_buf
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>
10 years agotests: create files that list the available tests
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>
10 years agointel-gpu-tools: avoid include of cairo.h on Android builds
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>