platform/upstream/intel-gpu-tools.git
10 years agopm_rps: Make frequency logging more compact
Jeff McGee [Tue, 21 Jan 2014 23:14:33 +0000 (17:14 -0600)]
pm_rps: Make frequency logging more compact

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agopm_rps: Remove repeat sysfs reads
Jeff McGee [Tue, 21 Jan 2014 23:14:32 +0000 (17:14 -0600)]
pm_rps: Remove repeat sysfs reads

Storing values avoids some unnecessary overhead but more importantly
allows all of our processing to be atomic.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agopm_rps: Expand on min and max config testing
Jeff McGee [Tue, 21 Jan 2014 23:14:31 +0000 (17:14 -0600)]
pm_rps: Expand on min and max config testing

Add a function that methodically varies min and max to exercise
several valid and invalid combinations. Allow the caller to
define what is to be checked between each step.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: update with nomodeset register access change
Jesse Barnes [Mon, 27 Jan 2014 18:43:02 +0000 (10:43 -0800)]
NEWS: update with nomodeset register access change

10 years agoquick_dump: more vlv dpio regs
Jesse Barnes [Mon, 27 Jan 2014 18:26:57 +0000 (10:26 -0800)]
quick_dump: more vlv dpio regs

10 years agommio: allow register init even if debugfs isn't available and i915 isn't loaded
Jesse Barnes [Mon, 27 Jan 2014 18:26:05 +0000 (10:26 -0800)]
mmio: allow register init even if debugfs isn't available and i915 isn't loaded

This lets us dump regs even if modeset=0 for example.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
10 years agoigt/gem_concurrent_blit: Scale resource usage to RAM correctly
Chris Wilson [Sun, 26 Jan 2014 14:36:32 +0000 (14:36 +0000)]
igt/gem_concurrent_blit: Scale resource usage to RAM correctly

Note that we use twice the number of buffers, and so we need to restrict
num_buffers appropriately to fit within RAM.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agointel_error_decode: Protect against missing ring registers
Chris Wilson [Thu, 23 Jan 2014 21:50:36 +0000 (21:50 +0000)]
intel_error_decode: Protect against missing ring registers

A dodgy kernel may miss printing out the ring registers leading to a
FPE.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agotools: Allow building on Android after noinst_PROGRAMS is not defined any more
Tvrtko Ursulin [Wed, 22 Jan 2014 10:41:05 +0000 (10:41 +0000)]
tools: Allow building on Android after noinst_PROGRAMS is not defined any more

Looks like filter-out macro gets silently unhappy about an undefined variable.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotests/gem_reset_stats: stop only one ring when submitting hang
Mika Kuoppala [Tue, 21 Jan 2014 15:40:08 +0000 (17:40 +0200)]
tests/gem_reset_stats: stop only one ring when submitting hang

If we stop all the rings, we can end up blaming the innocent
rings on hangcheck.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=73652
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agogem_storedw_batches_loop: Fix for pre-BDW
Ben Widawsky [Wed, 22 Jan 2014 02:03:42 +0000 (18:03 -0800)]
gem_storedw_batches_loop: Fix for pre-BDW

My git failures are truly remarkable. I ended up pushing the wrong
commit here:
commit 1552aa21124cabe762862bb414490510415a2b2d
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Mon Jan 13 06:28:45 2014 -0800

    gem_storedw_batches_loop: Fix for BDW

This puts the offset of the reloc in the wrong place for pre-BDW

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73866
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agokms_flip: Try to consume all fences after a flip
Chris Wilson [Mon, 20 Jan 2014 15:57:16 +0000 (15:57 +0000)]
kms_flip: Try to consume all fences after a flip

As a flip is outstanding, there is an issue that the kernel may not be
able to release one of the fences that userspace requires and erroneous
report EDEADLK (on gen2, gen3).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696

10 years agoquick_dump/watermarks: lp3, misc and debug
Ben Widawsky [Mon, 20 Jan 2014 18:40:23 +0000 (10:40 -0800)]
quick_dump/watermarks: lp3, misc and debug

I forgot to git add this originally.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoquick_dump/broadwell: Use haswell_other
Ben Widawsky [Sat, 18 Jan 2014 04:32:01 +0000 (20:32 -0800)]
quick_dump/broadwell: Use haswell_other

For now, the power controls and watermarks seem to be the same offsets.
So just reuse haswell_other.txt

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoquick_dump/hsw: Watermark debug
Ben Widawsky [Sat, 18 Jan 2014 04:26:54 +0000 (20:26 -0800)]
quick_dump/hsw: Watermark debug

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoquick_dump: Allow comments in the register files
Ben Widawsky [Sat, 18 Jan 2014 04:10:46 +0000 (20:10 -0800)]
quick_dump: Allow comments in the register files

Simple addition to the parser to add the following full line comments:
{';', '#', "//"}

Empty lines will also be ignored

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoquick_dump: Fix the indentation
Ben Widawsky [Sat, 18 Jan 2014 03:35:22 +0000 (19:35 -0800)]
quick_dump: Fix the indentation

Fix the spaces to use [the python standard] 4 soft spaces for tabe.
While here, add the proper vim tag so we don't do it again.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years ago.gitignore: Add pycache
Ben Widawsky [Sat, 18 Jan 2014 04:16:55 +0000 (20:16 -0800)]
.gitignore: Add pycache

quick_dump which is python, generates files in __pycache__ which are the
moral equivalent of object files. Don't let people add them to the index
accidentally.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agotests/gem_fd_exhaustion: Make it work
Daniel Vetter [Sun, 19 Jan 2014 21:15:13 +0000 (22:15 +0100)]
tests/gem_fd_exhaustion: Make it work

- We need to drop root to actually hit the limits. This requires us to
  fork the actual test since otherwise the exit handlers (which
  require root) fail the entire test.
- Don't assert that the gem create ioctl succeeds, it won't on the
  final run of the loop.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: add __gem_create
Daniel Vetter [Sun, 19 Jan 2014 21:13:36 +0000 (22:13 +0100)]
lib: add __gem_create

Useful for when a gem_create ioctl is expected to fail.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_rps: Add missing static
Daniel Vetter [Sun, 19 Jan 2014 21:12:25 +0000 (22:12 +0100)]
tests/pm_rps: Add missing static

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodebugger: avoid global variable shadowing
Daniel Vetter [Sun, 19 Jan 2014 21:11:47 +0000 (22:11 +0100)]
debugger: avoid global variable shadowing

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: extract igt_drop_root
Daniel Vetter [Sun, 19 Jan 2014 21:06:48 +0000 (22:06 +0100)]
lib: extract igt_drop_root

Useful in other tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Add gem_fd_exhaustion
Daniel Vetter [Sun, 19 Jan 2014 17:01:24 +0000 (18:01 +0100)]
tests: Add gem_fd_exhaustion

Exhausts the system limit on open files and then tries to create
a new shmem-backed gem object. Linus Torvalds reported that this
blows up on a null obj->base.filp, but I can't reproduce this here:

http://lists.freedesktop.org/archives/intel-gfx/2014-January/038433.html

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Move pm_rps to the right Makefile target
Daniel Vetter [Sun, 19 Jan 2014 13:48:07 +0000 (14:48 +0100)]
tests: Move pm_rps to the right Makefile target

If it's not in the multi-test target group testrunners won't pick up
on the fact that they need to enumerate subtests first.

Cc: jeff.mcgee@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agopm_rps: Fix verbose option and streamline its use
Jeff McGee [Fri, 17 Jan 2014 22:56:06 +0000 (16:56 -0600)]
pm_rps: Fix verbose option and streamline its use

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agopm_rps: Convert to subtest structure
Jeff McGee [Fri, 17 Jan 2014 22:56:05 +0000 (16:56 -0600)]
pm_rps: Convert to subtest structure

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agopm_rps: Add read back checking on sysfs writes
Jeff McGee [Fri, 17 Jan 2014 22:56:04 +0000 (16:56 -0600)]
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>
10 years agotools: Install them all
Daniel Vetter [Fri, 17 Jan 2014 06:42:22 +0000 (07:42 +0100)]
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>
10 years agotests/gem_gtt_hog: Use igt_simple_main
Daniel Vetter [Wed, 15 Jan 2014 22:59:52 +0000 (23:59 +0100)]
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>
10 years agotests/primve_nv_pcopy: Comment out unused check_swizzle function
Daniel Vetter [Wed, 15 Jan 2014 22:58:50 +0000 (23:58 +0100)]
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>
10 years agogem_gtt_hog: use a normal exit()
Chris Wilson [Wed, 15 Jan 2014 10:40:40 +0000 (10:40 +0000)]
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>
10 years agoigt: tests/Android.mk: fix LOCAL_PATH usage
Robert Beckett [Tue, 14 Jan 2014 18:01:38 +0000 (18:01 +0000)]
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>
10 years agotests/gem_reset_stats: run tests on all rings
Mika Kuoppala [Fri, 10 Jan 2014 15:24:17 +0000 (17:24 +0200)]
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>
10 years agotests/gem_reset_stats: split ctx tests
Mika Kuoppala [Fri, 10 Jan 2014 15:24:16 +0000 (17:24 +0200)]
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>
10 years agotests/prime_nv_pcopy: disable swizzle tests
Daniel Vetter [Tue, 14 Jan 2014 12:41:21 +0000 (13:41 +0100)]
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>
10 years agogem_storedw_batches_loop: Fix for BDW
Ben Widawsky [Mon, 13 Jan 2014 14:28:45 +0000 (06:28 -0800)]
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>
10 years agotests: Drop glib.h include from kms_cursor_crc and kms_fbc_crc
Ville Syrjälä [Mon, 13 Jan 2014 15:05:19 +0000 (17:05 +0200)]
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>
10 years agopm_rps: Use igt exit handler for restore
Jeff McGee [Fri, 10 Jan 2014 21:12:33 +0000 (15:12 -0600)]
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>
10 years agopm_rps: Fix test to target original min and max
Jeff McGee [Fri, 10 Jan 2014 21:12:32 +0000 (15:12 -0600)]
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>
10 years agopm_rps: Assert that valid sysfs writes return success
Jeff McGee [Fri, 10 Jan 2014 21:12:31 +0000 (15:12 -0600)]
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>
10 years agopm_rps: Use unbuffered I/O on sysfs files
Jeff McGee [Fri, 10 Jan 2014 21:12:30 +0000 (15:12 -0600)]
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>
10 years agotests/gem_pipe_control_store_loop: Delete bogus assertion
Chris Wilson [Fri, 10 Jan 2014 21:13:56 +0000 (21:13 +0000)]
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>
10 years agogem_gtt_hog: Print elapsed time in ms
Chris Wilson [Fri, 10 Jan 2014 16:09:57 +0000 (16:09 +0000)]
gem_gtt_hog: Print elapsed time in ms

Missed one last diff before pushing

10 years agotests: Add gem_gtt_hog
Chris Wilson [Fri, 10 Jan 2014 13:42:55 +0000 (13:42 +0000)]
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.

10 years agotests/gem_largeobject: Prefault instead of pin
Daniel Vetter [Fri, 10 Jan 2014 08:21:54 +0000 (09:21 +0100)]
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>
10 years agotests: fixup igt_simple_main fallout
Daniel Vetter [Fri, 10 Jan 2014 08:21:15 +0000 (09:21 +0100)]
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>
10 years agotests/gem_ctx_exec: fix ram requirement fumble
Daniel Vetter [Wed, 8 Jan 2014 19:24:36 +0000 (20:24 +0100)]
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>
10 years agotests/NAMING-CONVENTION: s/snooped/snoop/
Daniel Vetter [Tue, 7 Jan 2014 18:25:11 +0000 (19:25 +0100)]
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>
10 years agobuild: Added -UNDEBUG to tools/Android.mk
Devon Davies [Wed, 8 Jan 2014 16:07:06 +0000 (16:07 +0000)]
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>
10 years agotools: Remove intel_disable_clock_gating
Damien Lespiau [Mon, 6 Jan 2014 14:56:02 +0000 (14:56 +0000)]
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>
10 years agotools: Removed unused tools/intel_iosf_read.c
Damien Lespiau [Tue, 4 Jun 2013 12:55:06 +0000 (13:55 +0100)]
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>
10 years agolib: Use INSTDONE_I965 and INSTDONE_1 for gen6
Damien Lespiau [Tue, 4 Jun 2013 10:36:23 +0000 (11:36 +0100)]
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>
10 years agolib: Move the INSTDONE bit definitions to instdone.c
Damien Lespiau [Tue, 4 Jun 2013 08:06:50 +0000 (09:06 +0100)]
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>
10 years agoinstdone: Add an assert to make sure we never overflow instdone_bits
Damien Lespiau [Tue, 4 Jun 2013 05:48:49 +0000 (06:48 +0100)]
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>
10 years agointel_reg: Renamed INST_DONE to INSTDONE
Damien Lespiau [Tue, 4 Jun 2013 04:41:36 +0000 (05:41 +0100)]
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>
10 years agotests/kms_flip: free the test_output struct when counting modes
Paulo Zanoni [Mon, 30 Dec 2013 13:40:03 +0000 (11:40 -0200)]
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>
10 years agotests/kms_flip: don't leak the connector_config struct
Paulo Zanoni [Mon, 30 Dec 2013 13:33:16 +0000 (11:33 -0200)]
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>
10 years agotests/kms_flip: don't leak the CRTC
Paulo Zanoni [Mon, 30 Dec 2013 13:30:03 +0000 (11:30 -0200)]
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>
10 years agotests/kms_flip: don't leak the connector when setting DPMS
Paulo Zanoni [Mon, 30 Dec 2013 13:27:57 +0000 (11:27 -0200)]
tests/kms_flip: don't leak the connector when setting DPMS

Caught by Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agodrmtest: don't leak memory when parsing the arguments
Paulo Zanoni [Mon, 30 Dec 2013 13:20:39 +0000 (11:20 -0200)]
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>
10 years agoNEWS updates
Daniel Vetter [Tue, 7 Jan 2014 07:14:33 +0000 (08:14 +0100)]
NEWS updates

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel_error_decode: Factor out common decoding code
Damien Lespiau [Mon, 16 Dec 2013 11:28:39 +0000 (11:28 +0000)]
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>
10 years agoconfigure.ac: Fix shader debugger for real
Ben Widawsky [Fri, 3 Jan 2014 05:33:57 +0000 (19:33 -1000)]
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>
10 years agokmstest: Fix up lifetimes of cairo objects
Chris Wilson [Mon, 30 Dec 2013 17:48:43 +0000 (17:48 +0000)]
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>
10 years agoconfigure.ac: Fixup conditional shader debugger
Ben Widawsky [Mon, 30 Dec 2013 18:41:43 +0000 (10:41 -0800)]
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>
10 years agoconfigure.ac: Remove GEN4ASM define
Ben Widawsky [Mon, 30 Dec 2013 18:32:06 +0000 (10:32 -0800)]
configure.ac: Remove GEN4ASM define

This was a leftover hunk that got accidently merged.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_exec_blit: gen8 updates for blit
Ben Widawsky [Tue, 24 Dec 2013 21:12:31 +0000 (13:12 -0800)]
gem_exec_blit: gen8 updates for blit

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoshader-debugger: Use in tree gen4asm
Ben Widawsky [Sat, 21 Dec 2013 05:15:16 +0000 (21:15 -0800)]
shader-debugger: Use in tree gen4asm

Reported-by: Patrick McMunn <doctorwhoguy@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoREADME: Fix spelling fail
Daniel Vetter [Fri, 20 Dec 2013 15:56:14 +0000 (16:56 +0100)]
README: Fix spelling fail

Thanks to Jani for spotting this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoREADME: Document how to avoid Waffle with piglit
Daniel Vetter [Fri, 20 Dec 2013 14:49:59 +0000 (15:49 +0100)]
README: Document how to avoid Waffle with piglit

Suggested by Paulo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: check if we can't become DRM master
Paulo Zanoni [Mon, 16 Dec 2013 20:47:39 +0000 (18:47 -0200)]
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>
10 years agobuild: Create version and config information files in Android
Oscar Mateo [Fri, 13 Dec 2013 20:48:24 +0000 (20:48 +0000)]
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>
10 years agotests/gem_close_race: Adapt the test for Full PPGTT
Oscar Mateo [Fri, 13 Dec 2013 16:24:37 +0000 (16:24 +0000)]
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>
10 years agolib: Include the necessary stdint.h in gen6_render.h
Damien Lespiau [Fri, 13 Dec 2013 12:53:31 +0000 (12:53 +0000)]
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>
10 years agotests: Document the Makefile variables a bit better
Daniel Vetter [Thu, 12 Dec 2013 21:46:18 +0000 (22:46 +0100)]
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>
10 years agotests/gem_reset_stats: add reverse order in close-pending-fork
Mika Kuoppala [Tue, 10 Dec 2013 08:50:48 +0000 (10:50 +0200)]
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>
10 years agotests: Move gem_reset_stats to the right place
Daniel Vetter [Thu, 12 Dec 2013 08:26:58 +0000 (09:26 +0100)]
tests: Move gem_reset_stats to the right place

Binaries should only be added to the HANG target if they're completely
broken. If they just cause a recoverable gpu hang as part of the test
then they need to be somewhere else.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/kms_setmode: avoid 2 connectors on the same encoder
Paulo Zanoni [Tue, 3 Dec 2013 17:03:02 +0000 (15:03 -0200)]
tests/kms_setmode: avoid 2 connectors on the same encoder

Don't try to set modes on two connectors that share the same encoder.
That will just fail.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68463
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agokms_flip: consolidate run_test_on_{crtc,crtc_pair}
Imre Deak [Tue, 10 Dec 2013 13:33:07 +0000 (15:33 +0200)]
kms_flip: consolidate run_test_on_{crtc,crtc_pair}

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agokms_flip: keep drm_fd open for the dpms restore exit handler
Imre Deak [Tue, 10 Dec 2013 12:00:19 +0000 (14:00 +0200)]
kms_flip: keep drm_fd open for the dpms restore exit handler

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69161

Signed-off-by: Imre Deak <imre.deak@intel.com>
10 years agokms_flip: fix seq_step for 2xcrtc subtests
Imre Deak [Mon, 9 Dec 2013 15:28:50 +0000 (17:28 +0200)]
kms_flip: fix seq_step for 2xcrtc subtests

This also raises the absolute wait-for-vblank sequence step from 5 to
10, just to make it consistent with the corresponding 1x subtests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69161
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agorendercopy/bdw: Fix length of a bunch of zeroed out packets.
Kenneth Graunke [Tue, 10 Dec 2013 07:29:36 +0000 (23:29 -0800)]
rendercopy/bdw: Fix length of a bunch of zeroed out packets.

A bunch of packets were too short.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Damien Lespiau <damien.lespiau@intel.com>
10 years agorendercopy/bdw: Emit 3DSTATE_WM_HZ_OP.
Kenneth Graunke [Tue, 10 Dec 2013 07:29:35 +0000 (23:29 -0800)]
rendercopy/bdw: Emit 3DSTATE_WM_HZ_OP.

We don't want depth/stencil fast clears or HiZ resolves; we want normal
drawing.  Without this, the pixel pipeline doesn't work.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Damien Lespiau <damien.lespiau@intel.com>
10 years agoignore version.h
Daniel Vetter [Tue, 10 Dec 2013 09:30:59 +0000 (10:30 +0100)]
ignore version.h

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: roll out igt_simple_init/igt_simple_main
Daniel Vetter [Tue, 10 Dec 2013 09:18:32 +0000 (10:18 +0100)]
tests: roll out igt_simple_init/igt_simple_main

Also use igt_skip a bit more to simplify some of the tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: gem_close_race has subtests!
Daniel Vetter [Tue, 10 Dec 2013 08:58:28 +0000 (09:58 +0100)]
tests: gem_close_race has subtests!

Oops.

v2: Found more.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: igt_simple_main/init for subtest-less tests
Daniel Vetter [Tue, 10 Dec 2013 08:41:48 +0000 (09:41 +0100)]
lib: igt_simple_main/init for subtest-less tests

Atm only used to print the version information.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: print uname information in the version string
Daniel Vetter [Tue, 10 Dec 2013 08:26:08 +0000 (09:26 +0100)]
lib: print uname information in the version string

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: Add host platform to version string
Daniel Vetter [Tue, 10 Dec 2013 08:23:44 +0000 (09:23 +0100)]
lib: Add host platform to version string

This is import on systems where we compile 32bit tests that run on
64bit platforms.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel-gpu-tools: Version information
Ben Widawsky [Sat, 7 Dec 2013 04:35:29 +0000 (20:35 -0800)]
intel-gpu-tools: Version information

Provide two arguments version, and verbose, which allow printing from an
arbitrary igt test. It will show system information (from build time,
not runtime), as well as the git SHA being used.

This will help reduce errors when people try to reproduce problems.

As an example if I want to verify someone is running the correct version
of a test, I could ask them to do:
bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --verbose
gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT
Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux)
Time to exec x 1:  35.000µs (ring=render)
Time to exec x 2:  28.000µs (ring=render)
Time to exec x 4:  20.000µs (ring=render)
Time to exec x 8:  14.625µs (ring=render)
Time to exec x 16:  11.188µs (ring=render)
Time to exec x 32:  11.125µs (ring=render)
Time to exec x 64:  10.328µs (ring=render)
Time to exec x 128:  10.172µs (ring=render)
Time to exec x 256:  10.234µs (ring=render)
Time to exec x 512:  10.232µs (ring=render)
Time to exec x 1024:  10.121µs (ring=render)
Time to exec x 2048:  10.151µs (ring=render)
Time to exec x 4096:  11.474µs (ring=render)
Time to exec x 8192:   9.432µs (ring=render)
Time to exec x 16384:   6.003µs (ring=render)
Time to exec x 32768:   5.029µs (ring=render)
Time to exec x 65536:   4.206µs (ring=render)
Time to exec x 131072:   3.630µs (ring=render)
Subtest render: SUCCESS

--verbose is provided for completeness, but doesn't seem too useful at
the moement.

bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --version
gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT
Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux)

I've put version.h in the root directory so that any subdir can access
it. I've added the tests usage since it's immediately useful, and done
easily via Daniels igt infrastructure work.

v2:
- Always print the version number.
- We want to print uname at runtime.
- Also prefix the i-g-t release version.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: Always print errno in igt assert/require macros
Daniel Vetter [Tue, 10 Dec 2013 07:07:11 +0000 (08:07 +0100)]
lib: Always print errno in igt assert/require macros

Useful to figure out why things have failed.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_media_fill: Remove unnecessary include
Tvrtko Ursulin [Fri, 6 Dec 2013 12:38:49 +0000 (12:38 +0000)]
tests/gem_media_fill: Remove unnecessary include

Causes trouble for Android builds.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: add pm_lpsp
Paulo Zanoni [Tue, 3 Dec 2013 21:44:45 +0000 (19:44 -0200)]
tests: add pm_lpsp

QA has asked me "How can we make sure LPSP is working?". Now, instead
of writing big paragraphs, I can just answer "make sure pm_lpsp
works".

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agolib: rename some power well bit names
Paulo Zanoni [Tue, 3 Dec 2013 18:44:08 +0000 (16:44 -0200)]
lib: rename some power well bit names

I did the same change in the Kernel a few months ago. This should help
not getting confused about which bit does what.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agoassembler/bdw: Update write(...)
Xiang, Haihao [Fri, 6 Dec 2013 01:16:58 +0000 (09:16 +0800)]
assembler/bdw: Update write(...)

write(...) is used for Render Target Write and Media Block Write.
The two message types no longer share the same cache agent on GEN8,
So a parameter is needed for cache agent. The 4th parameter of write()
is used for write commit bit which has been removed since GEN7. Hence
we can re-use the 4th parameter as cache agent on GEN8

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agolib: make igt_pipe_crc_start never fail
Daniel Vetter [Fri, 6 Dec 2013 09:48:25 +0000 (10:48 +0100)]
lib: make igt_pipe_crc_start never fail

It's what callers expect - pipe_crc_new is the function where
we pass a potential failure back to callers.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: add igt_pipe_crc_check
Daniel Vetter [Fri, 6 Dec 2013 09:47:10 +0000 (10:47 +0100)]
lib: add igt_pipe_crc_check

No need to duplicate this all over the place.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: drm_open_any doesn't fail
Daniel Vetter [Fri, 6 Dec 2013 09:45:49 +0000 (10:45 +0100)]
tests: drm_open_any doesn't fail

Or more precisely: It already has an igt_require. So we cant ditch it
from tests.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agogitignore: Ignore gem_media_fill
Damien Lespiau [Fri, 6 Dec 2013 13:02:51 +0000 (13:02 +0000)]
gitignore: Ignore gem_media_fill

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>