3893 Commits

Author SHA1 Message Date
Yi Sun
4cceae74e3 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>
2012-02-06 20:36:45 +01:00
Daniel Vetter
36a40a5423 gem_partial_pwrite_pread: add progress indicator
Without optimized pread/pwrite this test takes forever.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-31 13:52:59 +01:00
Daniel Vetter
611e0cb333 intel_reg_dumper: add TRANS_VSYNCSHIFT
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-27 18:50:21 +01:00
Ben Widawsky
6b6b13906a intel_reg_write: use register access init/fini
This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:06:25 -08:00
Ben Widawsky
6e3066c9c3 intel_reg_read: use register access init/fini
This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:05:15 -08:00
Ben Widawsky
4c20525b7f 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>
2012-01-25 21:04:16 -08:00
Ben Widawsky
802bd74c5f 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>
2012-01-25 21:01:55 -08:00
Chris Wilson
1ffe6b0ee8 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>
2012-01-25 10:16:21 +00:00
Daniel Vetter
93a65895bb 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>
2012-01-24 23:18:21 +01:00
Daniel Vetter
7492f97cde tests: add gem_cs_prefetch
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 23:03:12 +01:00
Daniel Vetter
ca10c7231d 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>
2012-01-24 21:41:17 +01:00
Alan Coopersmith
fbae138990 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>
2012-01-24 11:38:10 +01:00
Alan Coopersmith
5c4e041dc8 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>
2012-01-24 11:38:10 +01:00
Daniel Vetter
fa461203e6 testdisplay: make udev optional
Hopefully this makes Solaris happy.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 11:28:25 +01:00
Daniel Vetter
7f7cafe729 testdisplay: extract hotplug code
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 10:50:10 +01:00
Daniel Vetter
137f4d467e lib: forcewake is gen6+
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 09:37:51 +01:00
Daniel Vetter
8d4d8b00ed 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>
2012-01-23 17:18:53 +01:00
Daniel Vetter
98129fa2ff 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>
2012-01-22 22:28:46 +01:00
Daniel Vetter
fbfe374b28 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>
2012-01-22 20:09:54 +01:00
Daniel Vetter
1a9fa8fd12 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>
2012-01-22 19:24:48 +01:00
Daniel Vetter
7132d0f977 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>
2012-01-22 19:14:25 +01:00
Daniel Vetter
6d755c39d3 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>
2012-01-22 18:04:24 +01:00
Wu Fengguang
e64abe581a 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>
2012-01-21 23:35:09 +01:00
Wu Fengguang
3beea0bd0c 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>
2012-01-21 23:34:47 +01:00
Daniel Vetter
08ccec1ec7 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>
2012-01-19 13:07:25 +01:00
Daniel Vetter
f07e4d1885 lib: extract rendercopy functions from gem_stress
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 21:23:56 +01:00
Daniel Vetter
1357427fd0 gem_stress: s/gem_stress.h/rendercopy.h 2012-01-18 17:53:12 +01:00
Daniel Vetter
f7c2dab5bd gem_stress: move keep_gpu_busy stuff out of render copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:51:48 +01:00
Daniel Vetter
b9fe673f49 gem_stress: move option struct out of header
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:47:33 +01:00
Daniel Vetter
9f20ecc3b3 gem_stress: add width/height arg to rendercpy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:46:00 +01:00
Daniel Vetter
699d30950f gem_stress: move a few things out of gem_stress.h
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 01:12:52 +01:00
Daniel Vetter
f1de285e7e gem_stress: pass batch as arg to render_copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:55:49 +01:00
Daniel Vetter
72f74ce355 gem_stress: remove logical_tile_no arg from render_copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:36:37 +01:00
Daniel Vetter
205510badf 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>
2012-01-18 00:34:15 +01:00
Daniel Vetter
d75d69d0a9 lib/drmtest: extract mappable aperture trasher infrastructure
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 18:32:11 +01:00
Daniel Vetter
7b14b093d4 lib/drmtest: add gem_mappable_aperture_size
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 17:40:41 +01:00
Daniel Vetter
7f944349ef lib/drmtest: extract gem_aperture_size
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 17:14:56 +01:00
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