956 Commits

Author SHA1 Message Date
Daniel Vetter
1d16f7934d test/gem_tiled_pread_pwrite: add progress indicator
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-15 17:43:38 +01:00
Daniel Vetter
24c8d2f112 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>
2012-02-12 12:16:25 +01:00
Daniel Vetter
e1ddd1c8e0 lib/drmtest: fixup copy&paste printf format issue
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11 16:57:05 +01:00
Daniel Vetter
9b32894937 prepend 'intel_' to installed programms
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11 16:52:26 +01:00
Kenneth Graunke
6cfd16648d 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>
2012-02-11 11:48:02 +01:00
Sateesh Kavuri
b39a74ba4e 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>
2012-02-10 18:43:53 +01:00
Daniel Vetter
2065ca15fb Release 1.2 2012-02-09 22:39:50 +01:00
Daniel Vetter
06bfa3d387 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>
2012-02-09 22:32:54 +01:00
Alan Coopersmith
042f40eda7 Fix program name in intel_bios_dumper.man SYNOPSIS
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-02-08 17:04:53 -08:00
Kenneth Graunke
90a6f75dd2 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>
2012-02-08 21:35:56 +01:00
Daniel Vetter
6fe3884bc9 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>
2012-02-08 16:49:15 +01:00
Alan Coopersmith
e61b917134 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>
2012-02-06 20:44:51 +01:00
Yi Sun
3d46ca8c4d 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>
2012-02-06 20:38:49 +01:00
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