platform/upstream/intel-gpu-tools.git
12 years agoreg_dumper: change and fix behavior when using dump files
Paulo Zanoni [Wed, 15 Feb 2012 18:04:00 +0000 (16:04 -0200)]
reg_dumper: change and fix behavior when using dump files

Before this patch, handling dump files was wrong:
- when HAS_PCH_SPLIT was specified, intel_reg_dumper segfaulted inside
  intel_check_pch()
- the "devid" variable was used but not set
- there was no way to specify the device id of the machine used to
  generate the dump file

This patch fixes this behavior with the following changes:
- the HAS_PCH_SPLIT variable is gone
- there is now a '-d' argument that can be used to specify the device id
  used to interpret the results
- when a dump file is used but the '-d' argument is not provided, an
  Ironlake machine is assumed

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoreg_dumper: add interlaced information to TRANSCONF
Paulo Zanoni [Wed, 15 Feb 2012 18:03:09 +0000 (16:03 -0200)]
reg_dumper: add interlaced information to TRANSCONF

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoreg_dumper: add interlaced and rotation information to PIPECONF
Paulo Zanoni [Wed, 15 Feb 2012 18:02:27 +0000 (16:02 -0200)]
reg_dumper: add interlaced and rotation information to PIPECONF

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: fixup storedw tests
Daniel Vetter [Wed, 15 Feb 2012 16:50:57 +0000 (17:50 +0100)]
tests: fixup storedw tests

We need to use _INSTRUCTION as the reloc domain because otherwise the
ppgtt pipe_control w/a for snb won't kick in and the test fails.

The storedw tests for blt and bsd are still disabled because the
corresponding patch to flag ppgtt support isn't merged upstream yet.
Without ppgtt these hang my snb here.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotest/gem_tiled_pread_pwrite: add progress indicator
Daniel Vetter [Wed, 15 Feb 2012 16:43:38 +0000 (17:43 +0100)]
test/gem_tiled_pread_pwrite: add progress indicator

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoremove old .c files
Daniel Vetter [Sun, 12 Feb 2012 11:14:27 +0000 (12:14 +0100)]
remove old .c files

Oopps, I've forgotten about this in

commit 9b32894937af27f9ba95ea572ac857d376fe9034
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Feb 11 16:52:26 2012 +0100

    prepend 'intel_' to installed programms

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: fixup copy&paste printf format issue
Daniel Vetter [Sat, 11 Feb 2012 15:54:58 +0000 (16:54 +0100)]
lib/drmtest: fixup copy&paste printf format issue

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoprepend 'intel_' to installed programms
Daniel Vetter [Sat, 11 Feb 2012 15:52:26 +0000 (16:52 +0100)]
prepend 'intel_' to installed programms

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoRemove pointless Android ifdefs for sys/fcntl.h.
Kenneth Graunke [Sat, 11 Feb 2012 06:19:16 +0000 (22:19 -0800)]
Remove pointless Android ifdefs for sys/fcntl.h.

On my system, sys/fcntl.h contains exactly one line:

   #include <fcntl.h>

So there's really no need to #ifdef it.  Also, intel_mmio.c already
included <fcntl.h>; there's no need to include it twice.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoAdded support for Android
Sateesh Kavuri [Mon, 6 Feb 2012 10:07:04 +0000 (15:37 +0530)]
Added support for Android

 Added the Android.mk file as per Android make system. Also had to modify
 the headers with the proper location for fcntl.h as per the Android
 bionic headers location

Signed-off-by: Sateesh Kavuri <sateesh.kavuri@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoRelease 1.2 1.2
Daniel Vetter [Thu, 9 Feb 2012 21:39:50 +0000 (22:39 +0100)]
Release 1.2

12 years agolib/rendercopy: fixup make distcheck
Daniel Vetter [Thu, 9 Feb 2012 21:32:54 +0000 (22:32 +0100)]
lib/rendercopy: fixup make distcheck

And complete the gem_stress->rendercopy rename that I've forgotten
about.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoFix program name in intel_bios_dumper.man SYNOPSIS
Alan Coopersmith [Thu, 9 Feb 2012 01:04:45 +0000 (17:04 -0800)]
Fix program name in intel_bios_dumper.man SYNOPSIS

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoUpdate generation checks to provide basic support for Ivybridge.
Kenneth Graunke [Wed, 8 Feb 2012 20:05:05 +0000 (12:05 -0800)]
Update generation checks to provide basic support for Ivybridge.

There may be some updates required, but assuming Ivybridge is similar to
Sandybridge is a decent start; previously it fell through to the Gen2/3
case and nothing worked.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoadd sprite demo from Armin Reese
Daniel Vetter [Wed, 8 Feb 2012 15:46:57 +0000 (16:46 +0100)]
add sprite demo from Armin Reese

Also fixed up the copyright header a bit. No comments on the coding
styled used ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoMove free(cmd) to after last use of cmd in intel_gpu_top
Alan Coopersmith [Sat, 4 Feb 2012 17:05:08 +0000 (09:05 -0800)]
Move free(cmd) to after last use of cmd in intel_gpu_top

Error: Use after free (CWE 416)
   Use after free of pointer 'cmd' in call to fprintf
        at line 496 of tools/intel_gpu_top.c in function 'main'.
          Previously freed at line 491 with free.
[ This bug was found by the Parfait 0.4.2 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/testdisplay.c: rewite function dump_connectors and dump_crtcs.
Yi Sun [Fri, 3 Feb 2012 14:45:39 +0000 (22:45 +0800)]
tests/testdisplay.c: rewite function dump_connectors and dump_crtcs.

Replace the globe variable drm_fd with local variable passed from parameter.

Signed-off-by: Yi Sun <yi.sun@intel.com>
[danvet: fixup whitespace]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/testdisplay.c: Fix the black screen issue while force mode.
Yi Sun [Fri, 3 Feb 2012 11:23:55 +0000 (19:23 +0800)]
tests/testdisplay.c: Fix the black screen issue while force mode.

Replace the 8 globe force mode variables with a struct drmModeInfo variable.
Next step, we could reduce the number of globe veriables, to be convenient to call the functions.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_partial_pwrite_pread: add progress indicator
Daniel Vetter [Tue, 31 Jan 2012 12:52:59 +0000 (13:52 +0100)]
gem_partial_pwrite_pread: add progress indicator

Without optimized pread/pwrite this test takes forever.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_reg_dumper: add TRANS_VSYNCSHIFT
Daniel Vetter [Fri, 27 Jan 2012 17:50:21 +0000 (18:50 +0100)]
intel_reg_dumper: add TRANS_VSYNCSHIFT

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_reg_write: use register access init/fini
Ben Widawsky [Thu, 26 Jan 2012 05:05:15 +0000 (21:05 -0800)]
intel_reg_write: use register access init/fini

This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agointel_reg_read: use register access init/fini
Ben Widawsky [Thu, 26 Jan 2012 05:05:15 +0000 (21:05 -0800)]
intel_reg_read: use register access init/fini

This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agommio: refactor reg init/fini
Ben Widawsky [Thu, 26 Jan 2012 05:04:16 +0000 (21:04 -0800)]
mmio: refactor reg init/fini

Rearrange register access init and fini so that we properly accomodate
platforms without forcewake.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agoi-g-t: silence -Winline
Ben Widawsky [Sun, 15 Jan 2012 21:41:42 +0000 (13:41 -0800)]
i-g-t: silence -Winline

In this case, the code already has a comment about the problem. We don't
need to flood the build with this less than useful message.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agointel_bios_reader: Sanitize input to ensure all data blocks are within bounds
Chris Wilson [Wed, 25 Jan 2012 10:11:49 +0000 (10:11 +0000)]
intel_bios_reader: Sanitize input to ensure all data blocks are within bounds

Running intel_bios_reader upon itself causes the reader to crash and
burn. It obviously finds a VBT signature inside the binary, but then
does not rigorously check that all data blocks are valid before
dereferencing them.

Reported-by: Emanuel Bronshtein
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45205
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
12 years agodrmtest: add progress indicator
Daniel Vetter [Tue, 24 Jan 2012 22:18:21 +0000 (23:18 +0100)]
drmtest: add progress indicator

Some test that trash the aperture necessarily need to take forever, so
add a little progress indicator to keep worried minds at peace.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_cs_prefetch
Daniel Vetter [Tue, 24 Jan 2012 17:05:11 +0000 (18:05 +0100)]
tests: add gem_cs_prefetch

Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_error_decode: fixup glibc free warning
Daniel Vetter [Tue, 24 Jan 2012 20:41:17 +0000 (21:41 +0100)]
intel_error_decode: fixup glibc free warning

Usually some random stack garbage doesn't equal some other
random stack garbage, leading to the filename != path check
succeeding.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoAdd Solaris implementation of intel_get_total_swap_mb()
Alan Coopersmith [Tue, 24 Jan 2012 04:13:49 +0000 (20:13 -0800)]
Add Solaris implementation of intel_get_total_swap_mb()

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoMake benchmarks also link against libpciaccess
Alan Coopersmith [Tue, 24 Jan 2012 04:13:48 +0000 (20:13 -0800)]
Make benchmarks also link against libpciaccess

Fixes Solaris build error on build of intel_upload_blit_large:

Undefined first referenced
 symbol       in file
pci_device_probe                    ../lib/.libs/libintel_tools.a(intel_pci.o)  (symbol belongs to implicit dependency libpciaccess.so.0)
pci_system_init                     ../lib/.libs/libintel_tools.a(intel_pci.o)  (symbol belongs to implicit dependency libpciaccess.so.0)
pci_device_find_by_slot             ../lib/.libs/libintel_tools.a(intel_pci.o)  (symbol belongs to implicit dependency libpciaccess.so.0)
ld: fatal: symbol referencing errors. No output written to intel_upload_blit_large

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: make udev optional
Daniel Vetter [Tue, 24 Jan 2012 10:28:25 +0000 (11:28 +0100)]
testdisplay: make udev optional

Hopefully this makes Solaris happy.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: extract hotplug code
Daniel Vetter [Tue, 24 Jan 2012 09:50:05 +0000 (10:50 +0100)]
testdisplay: extract hotplug code

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib: forcewake is gen6+
Daniel Vetter [Tue, 24 Jan 2012 08:37:51 +0000 (09:37 +0100)]
lib: forcewake is gen6+

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_tiled_swapping: be more conservative with the swap requirements
Daniel Vetter [Mon, 23 Jan 2012 16:18:53 +0000 (17:18 +0100)]
tests/gem_tiled_swapping: be more conservative with the swap requirements

Blew up and angered the OOM killer on one of my machines.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_tiled_swapping
Daniel Vetter [Sun, 22 Jan 2012 20:58:27 +0000 (21:58 +0100)]
tests: add gem_tiled_swapping

Also add a drmtest_exchange_int helper, might come handy at other
places.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib: extract drmtest_permute_array
Daniel Vetter [Sun, 22 Jan 2012 19:09:54 +0000 (20:09 +0100)]
lib: extract drmtest_permute_array

Lots of tests need to create havoc to LRUs in the kernel or otherwise
need to shuffle things around a bit. So make a small array permutation
function available.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib: add intel_get_total_swap_mb
Daniel Vetter [Sun, 22 Jan 2012 18:24:48 +0000 (19:24 +0100)]
lib: add intel_get_total_swap_mb

Test that try to exercise the swap paths need to check whether swap is
available, otherwise they'll just oom.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoRevert "tests/gem_tiled_pread_pwrite: actually try to use more than total ram"
Daniel Vetter [Sun, 22 Jan 2012 18:14:25 +0000 (19:14 +0100)]
Revert "tests/gem_tiled_pread_pwrite: actually try to use more than total ram"

This test is actually not really designed to test swap.

This reverts commit 6d755c39d38e9f0e5a991933cc82e015d1ccd272.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_tiled_pread_pwrite: actually try to use more than total ram
Daniel Vetter [Sun, 22 Jan 2012 17:04:24 +0000 (18:04 +0100)]
tests/gem_tiled_pread_pwrite: actually try to use more than total ram

Luckily there's usually enough other stuff around to waste the last
few mb ...

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_audio_dump: show more AUD_CONFIG bits
Wu Fengguang [Mon, 16 Jan 2012 23:19:24 +0000 (07:19 +0800)]
intel_audio_dump: show more AUD_CONFIG bits

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_audio_dump: fix missing Audio DIP tabs
Wu Fengguang [Mon, 16 Jan 2012 23:18:08 +0000 (07:18 +0800)]
intel_audio_dump: fix missing Audio DIP tabs

This makes the SNB/IVY Audio DIP values aligned with others.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: make testdisplay non-optional
Daniel Vetter [Thu, 19 Jan 2012 12:01:03 +0000 (13:01 +0100)]
tests: make testdisplay non-optional

Not testing modesetting should not be an option.

Also this hopefully prevents testdisplay build-breakage from lingering
on for days like it has in the past.

And we want to eventually test the gem/kms cross-section, i.e.
pageflips.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib: extract rendercopy functions from gem_stress
Daniel Vetter [Wed, 18 Jan 2012 20:23:56 +0000 (21:23 +0100)]
lib: extract rendercopy functions from gem_stress

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_stress: s/gem_stress.h/rendercopy.h
Daniel Vetter [Wed, 18 Jan 2012 16:53:12 +0000 (17:53 +0100)]
gem_stress: s/gem_stress.h/rendercopy.h

12 years agogem_stress: move keep_gpu_busy stuff out of render copy functions
Daniel Vetter [Wed, 18 Jan 2012 16:51:48 +0000 (17:51 +0100)]
gem_stress: move keep_gpu_busy stuff out of render copy functions

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_stress: move option struct out of header
Daniel Vetter [Wed, 18 Jan 2012 16:47:33 +0000 (17:47 +0100)]
gem_stress: move option struct out of header

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_stress: add width/height arg to rendercpy functions
Daniel Vetter [Wed, 18 Jan 2012 16:46:00 +0000 (17:46 +0100)]
gem_stress: add width/height arg to rendercpy functions

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_stress: move a few things out of gem_stress.h
Daniel Vetter [Wed, 18 Jan 2012 00:03:20 +0000 (01:03 +0100)]
gem_stress: move a few things out of gem_stress.h

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_stress: pass batch as arg to render_copy functions
Daniel Vetter [Tue, 17 Jan 2012 23:55:49 +0000 (00:55 +0100)]
gem_stress: pass batch as arg to render_copy functions

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_stress: remove logical_tile_no arg from render_copy functions
Daniel Vetter [Tue, 17 Jan 2012 23:36:37 +0000 (00:36 +0100)]
gem_stress: remove logical_tile_no arg from render_copy functions

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_stress: add buf->size
Daniel Vetter [Tue, 17 Jan 2012 23:34:15 +0000 (00:34 +0100)]
gem_stress: add buf->size

Removes a dependency on gem_stress internals from the rendercpy
functions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract mappable aperture trasher infrastructure
Daniel Vetter [Sun, 15 Jan 2012 17:32:11 +0000 (18:32 +0100)]
lib/drmtest: extract mappable aperture trasher infrastructure

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: add gem_mappable_aperture_size
Daniel Vetter [Sun, 15 Jan 2012 16:40:41 +0000 (17:40 +0100)]
lib/drmtest: add gem_mappable_aperture_size

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_aperture_size
Daniel Vetter [Sun, 15 Jan 2012 16:14:56 +0000 (17:14 +0100)]
lib/drmtest: extract gem_aperture_size

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: update .gitignore
Daniel Vetter [Sun, 15 Jan 2012 15:40:32 +0000 (16:40 +0100)]
tests: update .gitignore

12 years agotests: add ZZ_hangman
Daniel Vetter [Sun, 15 Jan 2012 15:39:49 +0000 (16:39 +0100)]
tests: add ZZ_hangman

Not yet enabled by default because the kernel can't recover from this
on chips where we don't have a gpu reset implemented.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add ZZ_check_dmesg
Daniel Vetter [Sat, 14 Jan 2012 16:05:39 +0000 (17:05 +0100)]
tests: add ZZ_check_dmesg

This way the testsuit automatically fails if we hit a DRM_ERROR
or a WARN/BUG somewhere.

... i.e. this is the Jesse Barnes catcher ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools: use correct src and build location
Gaetan Nadon [Wed, 11 Jan 2012 01:30:23 +0000 (20:30 -0500)]
tools: use correct src and build location

Headers are found under top_srcdir/
Headers are CPP flags, not C Flags
libintel_tools.la is located in top_builddir.
Use dist_bin_SCRIPTS so it is included in tarball
Line-up the line continuation characters

Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
12 years agoscripts: use PYTHON primary directive for python scripts
Gaetan Nadon [Thu, 5 Jan 2012 23:56:28 +0000 (18:56 -0500)]
scripts: use PYTHON primary directive for python scripts

Should it become installlable in the future, it will get compiled
at installation time by Automake. Because it is "source", they get
included in the tarball.

Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
12 years agolib: fix include directives, alphabetize sources
Gaetan Nadon [Thu, 5 Jan 2012 23:44:49 +0000 (18:44 -0500)]
lib: fix include directives, alphabetize sources

Headers are found under top_srcdir/...
Headers are CPP flags, not C Flags

Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
12 years agoBenchmark: use correct src and build location
Gaetan Nadon [Thu, 5 Jan 2012 22:02:30 +0000 (17:02 -0500)]
Benchmark: use correct src and build location

Headers are found under top_srcdir/...
Haeders are CPP flags, not C Flags
AM_CPPFLAGS, AM_CFLAGS and LDAAD apply to all targets.
libintel_tools.la is located in top_builddir.

Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
12 years agoDebugger: convert existing makefiles to Automake.
Gaetan Nadon [Tue, 10 Jan 2012 22:25:24 +0000 (17:25 -0500)]
Debugger: convert existing makefiles to Automake.

A common xorg idiom is used. The dependencies are auto-detected.
If they are present, the debugger is build.
If any are missing, the debugger is silently skipped.
If --enable-shader-debugger is specified, the configuration
will abort if any of the dependencies is missing.
No user actions is needed, no env variable to set (as it should be)

This will fix a number of problems:
build cannot start due Makefile missing in tarball.
build fails as GEN4ASM variable not available in Makefile.
distcheck is also disturbed.

In the process other minor problems were fixed:
helper target is missing dependencies on evict.h.
too may arguments given to pre_cpp.py but they were ignored.
fills /tmp with temporary files.

Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
12 years agolib/drmtest: add gpu quiescent helper
Daniel Vetter [Wed, 11 Jan 2012 16:19:53 +0000 (17:19 +0100)]
lib/drmtest: add gpu quiescent helper

Some tests are higly timing dependent and others carelessly leave
active buffers behind. So add a helper to quiescent the gpu and call
it unconditionally when opening an fd in a vain attempt to make all
this race-condition hitting more scientifically sound.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add drm_vma_limiter_cached to check libdrm cache mmap pruning
Daniel Vetter [Wed, 11 Jan 2012 15:56:50 +0000 (16:56 +0100)]
tests: add drm_vma_limiter_cached to check libdrm cache mmap pruning

Suggested by Chris Wilson.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract helpers for signal interruptions
Daniel Vetter [Wed, 11 Jan 2012 14:33:00 +0000 (15:33 +0100)]
lib/drmtest: extract helpers for signal interruptions

Also add some hackish stat to check it works.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add drm_vma_limiter variants that only check gtt/cpu mmaps
Daniel Vetter [Wed, 11 Jan 2012 13:59:47 +0000 (14:59 +0100)]
tests: add drm_vma_limiter variants that only check gtt/cpu mmaps

Suggested by Chris Wilson.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add drm_vma_limiter
root [Wed, 11 Jan 2012 13:37:42 +0000 (14:37 +0100)]
tests: add drm_vma_limiter

v2: Also check whether a 2nd mmap on the same bo still works.
Suggested by Chris Wilson.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_fenced_exec_trash: use drmtest helpers more
root [Tue, 10 Jan 2012 21:34:52 +0000 (22:34 +0100)]
tests/gem_fenced_exec_trash: use drmtest helpers more

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_mmap
Daniel Vetter [Tue, 10 Jan 2012 17:41:46 +0000 (18:41 +0100)]
lib/drmtest: extract gem_mmap

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_create
Daniel Vetter [Tue, 10 Jan 2012 17:29:30 +0000 (18:29 +0100)]
lib/drmtest: extract gem_create

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: rename global fd variable to drm_fd
Daniel Vetter [Tue, 10 Jan 2012 17:20:39 +0000 (18:20 +0100)]
testdisplay: rename global fd variable to drm_fd

Shuts up compiler warnings about shadowing in functions.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: fixup smaller compiler warnings
Daniel Vetter [Tue, 10 Jan 2012 17:15:05 +0000 (18:15 +0100)]
testdisplay: fixup smaller compiler warnings

const char * issues and redudant getopt stuff

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: use the gem_write wrapper some more
Daniel Vetter [Tue, 10 Jan 2012 15:10:48 +0000 (16:10 +0100)]
tests: use the gem_write wrapper some more

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_set_domain and gem_sync
Daniel Vetter [Tue, 10 Jan 2012 15:05:34 +0000 (16:05 +0100)]
lib/drmtest: extract gem_set_domain and gem_sync

gem_sync just does a gtt sync by using set_domain(GTT, GTT).

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: fixup new warnings
Daniel Vetter [Tue, 10 Jan 2012 14:50:20 +0000 (15:50 +0100)]
tests: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_read
Daniel Vetter [Tue, 10 Jan 2012 14:37:53 +0000 (15:37 +0100)]
lib/drmtest: extract gem_read

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_write
Daniel Vetter [Tue, 10 Jan 2012 14:31:11 +0000 (15:31 +0100)]
lib/drmtest: extract gem_write

Astonishing how many different function signatures are possible for
something that simple.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_close
Daniel Vetter [Tue, 10 Jan 2012 14:07:19 +0000 (15:07 +0100)]
lib/drmtest: extract gem_close

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/drmtest: extract gem_set_tiling
Daniel Vetter [Tue, 10 Jan 2012 13:59:58 +0000 (14:59 +0100)]
lib/drmtest: extract gem_set_tiling

Way too much copy-pasting going on here.

Also fix a compiler warnings in gem_stress while fixup things up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib: fixup new compiler warnings
Daniel Vetter [Mon, 9 Jan 2012 22:42:19 +0000 (23:42 +0100)]
lib: fixup new compiler warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_stepping: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:37:36 +0000 (23:37 +0100)]
tools/intel_stepping: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_gtt: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:35:21 +0000 (23:35 +0100)]
tools/intel_gtt: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_reg_dumper: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:34:38 +0000 (23:34 +0100)]
tools/intel_reg_dumper: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoremove tools/intel_decode
Daniel Vetter [Mon, 9 Jan 2012 22:24:12 +0000 (23:24 +0100)]
remove tools/intel_decode

Everyone's using the libdrm decoder now.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_gpu_top: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:22:21 +0000 (23:22 +0100)]
tools/intel_gpu_top: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_dump_decode: use libdrm decoder
Daniel Vetter [Mon, 9 Jan 2012 22:19:32 +0000 (23:19 +0100)]
tools/intel_dump_decode: use libdrm decoder

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_bios_reader: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:11:58 +0000 (23:11 +0100)]
tools/intel_bios_reader: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_bios_dumper: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:10:44 +0000 (23:10 +0100)]
tools/intel_bios_dumper: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_audio_dump: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:09:37 +0000 (23:09 +0100)]
tools/intel_audio_dump: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_error_decode: fixup new warnings
Daniel Vetter [Mon, 9 Jan 2012 22:06:41 +0000 (23:06 +0100)]
tools/intel_error_decode: fixup new warnings

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_error_decode: convert over to libdrm decoder
Daniel Vetter [Mon, 9 Jan 2012 22:38:17 +0000 (23:38 +0100)]
tools/intel_error_decode: convert over to libdrm decoder

Note that a per-ring error decode state would make more sense - this
way we could better decode the ring head and tail. But our current
head tracking is already lame (we need the kernel to also dump the
ringbuffer head/tail first, not just acthd), so I didn't bother.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: update to new colorkey ioctl
Jesse Barnes [Mon, 9 Jan 2012 22:33:39 +0000 (14:33 -0800)]
testdisplay: update to new colorkey ioctl

12 years agoFix pthread compiler flags to work on Solaris and with Studio compiler
Alan Coopersmith [Fri, 6 Jan 2012 23:45:29 +0000 (15:45 -0800)]
Fix pthread compiler flags to work on Solaris and with Studio compiler

AC_USE_SYSTEM_EXTENSIONS is used to let autoconf take care of setting
the right system defintions for POSIX threads & similar extensions to
the base POSIX API.   Since it will also #define _GNU_SOURCE 1, remove
the extra setting to avoid compiler warnings about redefined macros.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoinclude <fcntl.h> in lib/intel_mmio.c for open() prototype on Solaris
Alan Coopersmith [Fri, 6 Jan 2012 22:37:20 +0000 (14:37 -0800)]
include <fcntl.h> in lib/intel_mmio.c for open() prototype on Solaris

<fcntl.h> is the POSIX standard specified header for open(), so should
be available on all platforms.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoList out array values instead of using gcc range extension
Alan Coopersmith [Fri, 6 Jan 2012 22:37:19 +0000 (14:37 -0800)]
List out array values instead of using gcc range extension

Required to compile with Solaris Studio cc compiler.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoUse sched_yield instead of pthread_yield
Alan Coopersmith [Fri, 6 Jan 2012 23:45:28 +0000 (15:45 -0800)]
Use sched_yield instead of pthread_yield

Despite the name implying it's a standard part of the POSIX threads API,
pthread_yield is actually non-standard and less portable than sched_yield.
For instance, Solaris only has sched_yield, and not pthread_yield.
Since even the Linux man page suggests using sched_yield, just call that.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoSolaris defines struct winsize in termios.h
Alan Coopersmith [Fri, 6 Jan 2012 22:37:17 +0000 (14:37 -0800)]
Solaris defines struct winsize in termios.h

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoProvide Solaris implementation of intel_get_total_ram_mb
Alan Coopersmith [Fri, 6 Jan 2012 22:37:16 +0000 (14:37 -0800)]
Provide Solaris implementation of intel_get_total_ram_mb

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoconfig: restore the libtool minimum version to 1.5
Gaetan Nadon [Wed, 4 Jan 2012 02:13:39 +0000 (21:13 -0500)]
config: restore the libtool minimum version to 1.5

Very few systems still use this old version, but it would be
inconvenient to build a video driver with libtool 1.5 and have
to build the gpu tools on another system having libtool 2.2.

The toolchain version requirements are documented here:
http://www.x.org/wiki/ModularDevelopersGuide#GNU_Build_System

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoconfig: the minimum version for autoconf is 2.60
Gaetan Nadon [Wed, 4 Jan 2012 02:12:25 +0000 (21:12 -0500)]
config: the minimum version for autoconf is 2.60

A version later than 2.60 can be used, but no new features from such
a later version can be used in configure.ac.

The toolchain version requirements are documented here:
http://www.x.org/wiki/ModularDevelopersGuide#GNU_Build_System

Minimum version for Automake is 1.10 but we have not written it
in any xorg module so far and there has been no issues.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>