2434 Commits

Author SHA1 Message Date
Jeff McGee
0102b6bde6 pm_rps: Add read back checking on sysfs writes
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-18 15:17:16 +01:00
Daniel Vetter
e07e758004 tools: Install them all
No reason really not too, especially since we install manpages for
some of them.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66656
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-17 07:42:22 +01:00
Daniel Vetter
8fa2066d7e tests/gem_gtt_hog: Use igt_simple_main
Results in the compiler complaining about wrong exits and return values.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-15 23:59:52 +01:00
Daniel Vetter
eb1fddc057 tests/primve_nv_pcopy: Comment out unused check_swizzle function
I've botched this in my patch to disable the swizzled pcopy test.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-15 23:58:50 +01:00
Chris Wilson
5e278c86ed gem_gtt_hog: use a normal exit()
Since we don't execute any subtests, using igt_exit leads to
inconsistent behaviour. In the future, this may be converted.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73641
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-15 10:46:19 +00:00
Robert Beckett
a896ef9c1f igt: tests/Android.mk: fix LOCAL_PATH usage
Fix usage of shared variable LOCAL_PATH in deferred variable expansion area.

In Makefile language, rule and dependency definitions use immediate
expansions of variables, so they get expanded as soon as the rule is
created (1st pass). Rule implementation (a.k.a recipe) use deferred
expansion (2nd pass).

Android effectively makes all Android.mk files a single makefile by
including them all in a big tree from the toplevel makefile. The rules
are all evaluated in the first pass and targets are generated. Then the
2nd pass happens and the required target's recipes are run. At this
point, LOCAL_PATH has been assigned the value from the last evaluated
Android.mk in the 1st phase that defined LOCAL_PATH (most Android.mk use
this variable). In my particular case, it was the bootloader's
Android.mk that was evaluated last and had defined LOCAL_PATH to it's
path. The errors are rather misleading due to it looking like a bug in
another module's Android.mk rather than this one :)

Basically, if you want to use a variable that any other Android.mk
defines, then you can only use it in an immediate expansion context,
not a deferred expansion context as it will likely be re-defined by
the time the 2nd pass happens.

This patch stores it in a unique variable that should not be being
used by other Android.mk files. An alternative fix would be to use $@
and $< as the files in question are target and dependency, but I never
like using those as they can easily break if dependencies are added
etc. I prefer variable to be explicitly named to make them obvious.

See gnu make manual for explanation of deferred vs immediate
expansion of variables :
http://www.gnu.org/software/make/manual/make.html#Reading-Makefiles

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Robert Beckett <robert.beckett@intel.com>
2014-01-14 18:53:00 +00:00
Mika Kuoppala
44c0b2aeff tests/gem_reset_stats: run tests on all rings
Run all relevant tests on all rings.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-14 19:40:49 +01:00
Mika Kuoppala
3367359a98 tests/gem_reset_stats: split ctx tests
Split context related tests from non-context ones
and cleanup the naming.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-14 19:40:46 +01:00
Daniel Vetter
fef1930bf3 tests/prime_nv_pcopy: disable swizzle tests
It's pure luck that nv can detile some of the intel layouts since one
of the video MC formats matches it. Since we can't possible fix this
comment the test out.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73538
Acked-by: Maarten Lankhorst <bugs@mblankhorst.nl>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-14 13:41:21 +01:00
Ben Widawsky
1552aa2112 gem_storedw_batches_loop: Fix for BDW
Existing code was trying to be too clever and wasn't properly emitting
the high dword, or the correct length.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-13 06:28:45 -08:00
Ville Syrjälä
fee27cf822 tests: Drop glib.h include from kms_cursor_crc and kms_fbc_crc
kms_cursor_crc and kms_fbc_crc don't need glib.h. This was just some
copy-paste error on my part.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-01-13 17:11:18 +02:00
Jeff McGee
2a7dbe5f01 pm_rps: Use igt exit handler for restore
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Jeff McGee
d0b5fd2bff pm_rps: Fix test to target original min and max
The goal of the test is to confirm that gt_cur_freq_mhz can be forced
to the boundaries of the frequency range by collapsing gt_min_freq_mhz
and gt_max_freq_mhz to the target value. But we miss testing the upper
end of the range by targetting the current value of max after it has
been set equal to min. So fix by targetting orginal max instead of
current max.

This correction exposes a problem in setfreq where min is always set
to target before max, which should fail if the target value is greater
than max. So fix that too.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Jeff McGee
44b5d7b330 pm_rps: Assert that valid sysfs writes return success
do_writeval now always checks the return value, whether we expect
success or a specific error. Also add new macro writeval_inval to
simplify repeated use of do_writeval to test for EINVAL return code.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Jeff McGee
265efbb2c4 pm_rps: Use unbuffered I/O on sysfs files
Bionic C library may not re-read a buffered, read-only file which
results in failure to monitor changes in gt_cur_freq_mhz.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Chris Wilson
45d63644d2 tests/gem_pipe_control_store_loop: Delete bogus assertion
target_bo->offset was just being used to verify that the batch
submission worked and fortunately was not being relied upon for any
subsequent conditions. However, address 0 is valid and so the assertion
itself was bogus as it is possible (almost assured with full-ppgtt) for
the target_bo to be located at address 0.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72984
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-10 21:17:43 +00:00
Chris Wilson
84af2b9be8 gem_gtt_hog: Print elapsed time in ms
Missed one last diff before pushing
2014-01-10 16:10:31 +00:00
Chris Wilson
f62abaff99 tests: Add gem_gtt_hog
The purpose of this test is to exercise the userspace latency hogs
reported by Arjan van de Ven. He found some applications blocked the
device by stalling on the GPU inside the pagefault handler.
2014-01-10 15:44:11 +00:00
Daniel Vetter
2c9e761845 tests/gem_largeobject: Prefault instead of pin
This doesn't test pin but pwriting to big objects ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72901
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 09:24:33 +01:00
Daniel Vetter
cb9e8376fa tests: fixup igt_simple_main fallout
Oops, I should look at compilier warnings a bit better.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 09:24:33 +01:00
Daniel Vetter
7775fca2df tests/gem_ctx_exec: fix ram requirement fumble
We need to half available ram, not double it ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72557
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08 20:25:26 +01:00
Daniel Vetter
864d09ed4c tests/NAMING-CONVENTION: s/snooped/snoop/
Oops. We should be a bit more consistent with which verb form we're
picking. tile,tiled,tiling is even worse ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08 20:25:26 +01:00
Devon Davies
67c80f8d81 build: Added -UNDEBUG to tools/Android.mk
NDEBUG is defined by default in Android and causes assert(x) to be
defined as void(x). This change ensures that asserts work as
expected in tools.

This flag is already inside tests/Android.mk

Reviewed-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Devon Davies <devon.davies@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-08 17:20:00 +00:00
Damien Lespiau
0ec9c94bea tools: Remove intel_disable_clock_gating
This tool only supports ILK. I take the fact that nobody has felt the
need to update for later platform a sign it's not very useful.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:09 +00:00
Damien Lespiau
5fdca4c166 tools: Removed unused tools/intel_iosf_read.c
Also intel_iosf_read() does not exist, and would need a bit more
arguments.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:06 +00:00
Damien Lespiau
a1baf3050e lib: Use INSTDONE_I965 and INSTDONE_1 for gen6
The GEN6_INSTDONE_1 and GEN6_INSTDONE_2 registers are just the old
INSTDONE_I965 and INSTDONE_1 registers but renamed. Let's use the old
names (this is what the kernel does).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:04 +00:00
Damien Lespiau
3ebd8aa95e lib: Move the INSTDONE bit definitions to instdone.c
This is the only place where they are used and we've even started using
1 << n constants with gen 7.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:02 +00:00
Damien Lespiau
da78bc497b instdone: Add an assert to make sure we never overflow instdone_bits
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:00 +00:00
Damien Lespiau
d8b1dee220 intel_reg: Renamed INST_DONE to INSTDONE
That's how the registers are named in the kernel defines.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:47:33 +00:00
Paulo Zanoni
98c10d379b tests/kms_flip: free the test_output struct when counting modes
Looks like we have to do a lot of work just to count the number of
modes...

Caught by Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-01-07 09:57:04 -02:00
Paulo Zanoni
69856b5e7b tests/kms_flip: don't leak the connector_config struct
... in case we can't find a compatible mode. We already have
config[0], we can't return without freeing it first.

Caught by Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-01-07 09:57:04 -02:00
Paulo Zanoni
056500bdc5 tests/kms_flip: don't leak the CRTC
The kms_flip program calls kmstest_get_connector_config, which returns
a struct containing some allocated variables, including a pointer to
the CRTC. The problem is that we copy the values returned by this
structure to the test_output struct, but we ignore the CRTC pointer.
So free the CRTC pointer instead of leaking it.

Caught by Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-01-07 09:57:04 -02:00
Paulo Zanoni
02ad7e04dd tests/kms_flip: don't leak the connector when setting DPMS
Caught by Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-01-07 09:57:04 -02:00
Paulo Zanoni
329faeccf7 drmtest: don't leak memory when parsing the arguments
Found this while investigating memory leaks on kms_flip. Detected by
Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-01-07 09:57:03 -02:00
Daniel Vetter
bb40494671 NEWS updates
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07 08:14:33 +01:00
Damien Lespiau
1d2ef9553a intel_error_decode: Factor out common decoding code
4 pieces of code were looking very similar. Let's factor out a common
function in the not so unlikely case we need to tweak that code.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-06 13:40:21 +00:00
Ben Widawsky
01eeab9448 configure.ac: Fix shader debugger for real
I tried to get fancy before, but ended up pushing something which I
didn't test. Keep the thing simple and stupid, and just make it work.

Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-02 20:10:01 -10:00
Chris Wilson
164d9d26ac kmstest: Fix up lifetimes of cairo objects
cairo_t is the short lived drawing context, whereas cairo_surface_t is
the heavyweight object that persists and is also tied to underlying GEM
objects. So make the kmstest API reflect the different weights and fix
the lifetime and underlying object reference leaks.

Based on the fix by Paulo Zanoni.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-31 12:30:30 +00:00
Ben Widawsky
9d6cfa6b59 configure.ac: Fixup conditional shader debugger
The original patch was incomplete. Testing no assembler build is a pain
for me. Sorry for the mess.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-30 10:41:43 -08:00
Ben Widawsky
3ed4b5bd11 configure.ac: Remove GEN4ASM define
This was a leftover hunk that got accidently merged.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-30 10:32:06 -08:00
Ben Widawsky
72fe2b6414 gem_exec_blit: gen8 updates for blit
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-24 13:12:31 -08:00
Ben Widawsky
94b2b861f5 shader-debugger: Use in tree gen4asm
Reported-by: Patrick McMunn <doctorwhoguy@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-20 21:15:16 -08:00
Daniel Vetter
4f28614777 README: Fix spelling fail
Thanks to Jani for spotting this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-20 16:56:14 +01:00
Daniel Vetter
fd6c66c4a2 README: Document how to avoid Waffle with piglit
Suggested by Paulo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-20 15:49:59 +01:00
Paulo Zanoni
2a71bff317 tests/pm_pc8: check if we can't become DRM master
QA reported a failure that I believe happened because we couldn't
become DRM master, so add code that checks for this and prints a nice
error message.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-16 18:51:39 -02:00
Oscar Mateo
62e1cbc634 build: Create version and config information files in Android
Also, skip the compilation of pm_lpsp in Android (uses Cairo)

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-13 21:38:05 +01:00
Oscar Mateo
4eae05f03b tests/gem_close_race: Adapt the test for Full PPGTT
With Full PPGTT, each new fd creates a new context and thus a new
PPGTT, so we have to reduce the number of simultaneous fds or face
OOM problems. For every new PPGTT, its PDEs are stored in the GGTT
which imposes a limit of 1024 new contexts. We want to leave at
least 1/4 of the GGTT available for "important" stuff like scanout
buffers, so never open more than 768 fds.

v2: Unconditionally use the lower limit, as suggested by Daniel
Vetter

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-13 17:49:13 +01:00
Damien Lespiau
be14c7bb04 lib: Include the necessary stdint.h in gen6_render.h
Instead of assuming someone else will do it.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-13 15:04:07 +00:00
Daniel Vetter
16531069f6 tests: Document the Makefile variables a bit better
Also, this is a test for the patchwork hook.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-12 22:48:25 +01:00
Mika Kuoppala
a68937ca3b tests/gem_reset_stats: add reverse order in close-pending-fork
Use own copy of gem_quiescent_gpu() so that test still works
if it gets changed. Further improve the test by posting a batch
to rings in reverse order.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-12 11:59:47 +01:00