956 Commits

Author SHA1 Message Date
Daniel Vetter
d749921e48 tests: update .gitignore 2012-01-15 16:40:32 +01:00
Daniel Vetter
a50eb34398 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>
2012-01-15 16:39:49 +01:00
Daniel Vetter
eb64591613 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>
2012-01-15 16:05:43 +01:00
Gaetan Nadon
91a01e0348 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>
2012-01-12 09:13:08 -05:00
Gaetan Nadon
812ca58f8a 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>
2012-01-12 09:13:08 -05:00
Gaetan Nadon
65b7c72335 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>
2012-01-12 09:13:08 -05:00
Gaetan Nadon
3ceb75828c 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>
2012-01-12 09:13:08 -05:00
Gaetan Nadon
4768adf7d7 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>
2012-01-12 09:13:08 -05:00
Daniel Vetter
9f87660304 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>
2012-01-11 17:19:53 +01:00
Daniel Vetter
7a54bfa772 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>
2012-01-11 16:56:50 +01:00
Daniel Vetter
cbaa8a389e 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>
2012-01-11 15:33:00 +01:00
Daniel Vetter
36d25cc744 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>
2012-01-11 14:59:47 +01:00
root
553021d974 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>
2012-01-11 14:47:09 +01:00
root
e287fe1958 tests/gem_fenced_exec_trash: use drmtest helpers more
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 22:34:52 +01:00
Daniel Vetter
527cad1618 lib/drmtest: extract gem_mmap
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:41:46 +01:00
Daniel Vetter
7a6042e87e lib/drmtest: extract gem_create
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:30:39 +01:00
Daniel Vetter
73d1b88129 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>
2012-01-10 18:20:39 +01:00
Daniel Vetter
db7462e1f5 testdisplay: fixup smaller compiler warnings
const char * issues and redudant getopt stuff

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:15:05 +01:00
Daniel Vetter
08cd2f220e tests: use the gem_write wrapper some more
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 16:10:48 +01:00
Daniel Vetter
673e6b220a 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>
2012-01-10 16:05:34 +01:00
Daniel Vetter
a7a80c2c2f tests: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:50:20 +01:00
Daniel Vetter
bd5cf9a07d lib/drmtest: extract gem_read
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:37:53 +01:00
Daniel Vetter
319638ba6d 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>
2012-01-10 15:31:11 +01:00
Daniel Vetter
5dd17d3f4b lib/drmtest: extract gem_close
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:07:19 +01:00
Daniel Vetter
aa67b22e42 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>
2012-01-10 14:59:58 +01:00
Daniel Vetter
1be3fd7eee lib: fixup new compiler warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:42:19 +01:00
Daniel Vetter
bd811d2d39 tools/intel_stepping: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
faf3dd1135 tools/intel_gtt: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
5774fadf7d tools/intel_reg_dumper: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
d50e6368ab remove tools/intel_decode
Everyone's using the libdrm decoder now.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
904bcab7ba tools/intel_gpu_top: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
2ca6c6b4fd tools/intel_dump_decode: use libdrm decoder
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
24a33db7f0 tools/intel_bios_reader: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Daniel Vetter
74b70baf14 tools/intel_bios_dumper: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:28 +01:00
Daniel Vetter
03ab1328a7 tools/intel_audio_dump: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:28 +01:00
Daniel Vetter
391e6aa89a tools/intel_error_decode: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:28 +01:00
Daniel Vetter
7ee9f16e51 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>
2012-01-09 23:38:17 +01:00
Jesse Barnes
555cfd4597 testdisplay: update to new colorkey ioctl 2012-01-09 14:34:19 -08:00
Alan Coopersmith
504c4fa94f 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>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
4e3c85f153 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>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
c461006bac 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>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
00751594db 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>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
f73dddc767 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>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
9ebb860e39 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>
2012-01-08 21:49:03 +01:00
Gaetan Nadon
65db78f687 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>
2012-01-04 10:47:11 +01:00
Gaetan Nadon
d63a1f6c73 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>
2012-01-04 10:47:11 +01:00
Gaetan Nadon
a03ef7abb5 config: set-up xorg automatic rebuilding rules
The current code is a noop. Use the same configuration as all
the other xorg modules. This will change in the future but it is less
confusing when all modules behave the same way.
Note that these rules apply to building from a tarball only.

Restore autogen.sh to be identical in all xorg modules.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:11 +01:00
Gaetan Nadon
665b86664a config: use project wide xorg warnings variable
Use CWARNFLAGS as in all of xorg. There seems to be no reason why this
module should be different. The warnings were updated recently
for those who install the latest util-macros.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:11 +01:00
Gaetan Nadon
1722b78128 config: remove duplicate AC_PROG_CC and AC_PROG__CC_99
The compiler was configured three times.
It is done once by XORG_DEFAULT_OPTIONS in util-macros.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:10 +01:00
Gaetan Nadon
4435791013 config: remove unrequired AM_PROG_CC_C_O
Required when using per-target flags or subdir-objects with C sources.

http://www.gnu.org/software/automake/manual/automake.html

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:10 +01:00