1873 Commits

Author SHA1 Message Date
Ben Widawsky
d6dd0bcb1c m4: Updates to ax_python_devel.m4
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-08 10:50:57 -07:00
Daniel Vetter
0a8bfbf747 tests/gem_fence_trash: make threaded tests more through-rough
With this at least the y-tiled test reliably fails on my machines, but
x-tiled still passes on some. More ideas to tune this highly welcome.

v2: Fill cpu caches with data for each newly allocated bo. This seems
to do the trick on my snb here _really_ reliably. So apparently the
backsnoop for llc gtt writes is the crucial ingredient here to make
the test fail.

While at it, also stop leaking mmap space.

v3: Fixup commit message.

Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-08 09:47:58 +02:00
Daniel Vetter
cb3a44fa26 lib/drmtest: tune down signal handler stats
Avoids tests with a spurious WARN result in piglit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-08 00:31:06 +02:00
Daniel Vetter
1677c21291 tests/kms_flip: don't leak gpu hang state
We need to clear out the error_state. While at it also make sure that
the hang was indeed detected.

Whoever writes the next test to race against gpu hangs should probably
extract these two functions into the drmtest library. Which just one
user that's not really worth it right now.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-06 18:30:19 +02:00
Daniel Vetter
c97a45ff09 tests/prime_udl: skip harder
I fail.
2013-04-04 11:36:27 +02:00
Daniel Vetter
d16dd3a0f8 tests/prime_udl: proper return values
... especially skip properly if there's no udl device.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-04 11:06:37 +02:00
Daniel Vetter
16e44f5499 lib: fixup register access on gen2/3
This wreaked havoc with intel_reg_dumper since it's been broken in

commit c6fe31bc473a7ae44bc42bad7da5faca3c924821
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Thu Jun 21 14:31:34 2012 -0300

    intel_reg_dumper: use intel_register_access_init/fini

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-03 00:22:41 +02:00
Chris Wilson
74f6e413d3 gem_fence_thrash: Fix array allocation size for LP64 systems 2013-03-27 11:33:24 +00:00
Kenneth Graunke
43a0862697 intel_perf_counters: Add support for Sandybridge.
While the Sandybridge PRM doesn't have any documentation on the GPU's
performance counters, a lot of information can be gleaned from the older
Ironlake PRM.  Oddly, none of the information documented there actually
appears to apply to Ironlake.  However, it apparently works just great
on Sandybridge.

Since this information has all been publicly available on the internet
for around three years, we can use it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:28:52 +01:00
Kenneth Graunke
0811556747 intel_perf_counters: Abstract out Ironlake-specific code.
We want to support this tool on more platforms.  This lays the
groundwork for making that possible.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:28:45 +01:00
Eric Anholt
85667f4f7d intel_perf_counters: a little tool for dumping performance counters.
This reads the GPU's performance counters via MI_REPORT_PERF_COUNT and
prints them in a top-style interface.  While it can be useful in and of
itself, it also documents the performance counters and lets us verify
that they're working.

Currently, it only supports Ironlake.

v2 [Ken]: Rebase on master and fix compilation failures; make it abort
on non-Ironlake platforms to avoid GPU hangs; rename from 'chaps' to
intel_perf_counters since that acronym isn't used any longer; write the
above commit message.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:28:41 +01:00
Daniel Vetter
9535fed171 tests/Makefile.am: gem_fence_trash has grown subtests
Need to move it to the right make target now!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:26:46 +01:00
Mika Kuoppala
ee79b8fccd tests: add write-verify test to gem_fence_thrash
Add write-verify test to gem_fence_thrash. Test will create
multiple threads per fence then verify the write into fenced region.

v2: non-threaded, non-tiled tests added. suggested by Chris Wilson.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:23:58 +01:00
Paulo Zanoni
7253eb4e4f intel_reg_dumper: debug SDEISR on Haswell
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
1043b22bb0 lib: fix HAS_PCH_SPLIT check
So HAS_PCH_SPLIT on't be true on VLV.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
051e327247 intel_reg_dumper: dump HSW watermark registers
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
eb88ce64b7 intel_reg_dumper: decode some useful Haswell registers
I've checked the value of these registers many many many times during
development.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
5c0ce0f2a9 intel_reg_dumper: make Haswell dump useful
It was previously printing ironlake_debug_regs and haswell_debug_regs.
Since ironlake_debug_regs contains a lot of registers that don't exist
on Haswell, running intel_reg_dumper on Haswell caused "unclaimed
register" messages. Now I've copied the existing registers from
ironlake_debug_regs to haswell_debug_regs, so we won't print the
registers that don't exist anymore.

Also removed DP_TP_STATUS_A since it doesn't exist.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
2fadf695ff intel_reg_dumper: recognize LPT
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
29abdb96dc lib: detect PCH_LPT and PCH_NONE
So we don't assign PCH_IBX to anything that's not PCH_CPT nor PCH_LPT.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Kees Cook
c3bfd738c7 tests: add gem_reloc_overflow to check wrapping
This adds a test to make sure that the execbuffer validation routine is
checking for invalid addresses, single entry overflow, and multi-entry
wrapping overflow.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-22 12:19:58 +01:00
Ville Syrjälä
7da0af8855 kms_flip: Don't access freed data
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-22 12:19:57 +01:00
Ville Syrjälä
069e35e0fc kms_flip: Add flip-vs-bad-tiling test
flip-vs-bad-tiling tests that page flipping to a Y-tiled buffer returns
an error correctly, rather than triggering kernel BUG for instance.

Create a third fb for this purpose. After the fb has been created,
change its tiling mode to Y. When performing a flip, target this
Y-tiled fb and make sure we get the expected error value.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-22 12:19:57 +01:00
Ville Syrjälä
7ab8e53b5d kms_flip: Add a flip-vs-panning-vs-hang test
The flip-vs-panning-vs-hang is just like the regular flip-vs-panning
test, except it also hangs the GPU. This will test whether panning
works after a pending page flip has been cancelled by a GPU reset,
and also whether page flip events get delivered correctly.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-22 12:19:57 +01:00
Ville Syrjälä
1f5957c64e kms_flip: Split the "no events" logic into a separate flag
Do not use the TEST_HANG flag to determine whether page flip events are
used. Add a new TEST_NOEVENT flag that can be used to disable the use
of events instead.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-22 12:19:57 +01:00
Damien Lespiau
c6c6f0f593 lib: Add a comment about why we only parse long options for subtests
For thet next one wondering about that.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-22 11:08:17 +00:00
Damien Lespiau
764b9e503e build: Fix typo if the test setting enable_debugger
Of course, a 'x' need to be inserted there.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:59:00 +00:00
Damien Lespiau
4591991769 assembler: Mark format() as PRINTFLIKE in the disassembler
So when making changes in code using that function, we get warnings
about mismatches between the format string and arguments.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
92262e1ff8 assembler: Fix the decoding of the destination horizontal stride
dest_horizontal_stride needs go through the horiz_stride[] indirection
to pick up the rigth stride when its value is 11b (4 elements).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
d9afa5bfea assembler: Group the header inclusions together
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
f0365d40b4 assembler: Don't use GL types
sed -i -e 's/GLuint/unsigned/g' -e 's/GLint/int/g' \
       -e 's/GLfloat/float/g' -e 's/GLubyte/uint8_t/g' \
       -e 's/GLshort/int16_t/g' assembler/*.[ch]

Drop the GL types here, they don't bring anything to the table. For
instance, GLuint has no guarantee to be 32 bits, so it does not make too
much sense to use it in structure describing hardware tables and
opcodes.

Of course, some bikeshedding can be applied to use uin32_t instead, I
figured that some of the GLuint are used without size constraints, so
a sed with uint32_t did not seem the right thing to do. On top of that
initial sed, one bothered enough could change the structures with size
constraints to actually use uint32_t.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
2d8b92a24b assembler: Remove trailing white space
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
2f502bcaaa assembler: Use defines for width
Instead of just using hardcoded numbers or resorting to ffs().

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
2de8b40c48 assembler: Merge declared_register's type into the reg structure
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
45d87d7f0b assembler: Finish importing brw_eu_*c from mesa
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
fa2b679cc9 assembler: Use set_instruction_src1() in send
No reason not to!

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:42 +00:00
Damien Lespiau
28ff66a13c assembler: Put struct opcode_desc back in brw_context.h
I originally moved struct opcode_desc from brw_context.h to brw_eu.h on
the mesa side, but that was before the realization we needed struct
brw_context if we wanted to not touch the code too much.

So put it back there now that the mesa patch has been dropped.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
e75faa3e43 assembler: Don't pollute the library files with gen4asm.h
gen4asm.h is assembler specific while we want the library files to be
somewhat of a proper library.

This means that we have to redefine the GL* typedefs for brw_structs.h,
not using any of thet GL typedef will be for a future commit.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
26da375471 assembler: Use brw_*() functions for 3-src instructions
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
67f3f949bf assembler: Add support for D and UD in 3-src instructions
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
a2a6583518 assembler: Expose setters for 3src operands
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
49861a03b6 assembler: Introduce set_instruction_saturate()
Also simplify the logic that was setting the saturate bit in the math
instruction.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
b21c2e60e9 assembler: Introduce set_intruction_pred_cond()
This allow us to factor out the test that checks if, when using both
predicates and conditional modifiers, we are using the same flag
register.

Also get rid of of a FIXME that we are now dealing with (the warning
mentioned above).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
5d526c8317 assembler: Introduce set_instruction_opcode()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
6bf3aa84e0 assembler: Isolate all the options in their own structure
Like with the predicate fields before, there's no need to use the full
instruction to collect the list of options. This allows us to decouple
the list of options from a specific instruction encoding.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
bca2ff2a02 assembler: Unify adding options to the header
Right now we have duplicated code for when the option is the last in the
list or not. Put that code in a common function.

Interestingly it appears that both sides haven't been kept in sync and
that EOT and ACCWRCTRL had limitations on where they had to be in the
option list. It's fixed now!

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
dfe6adacc9 assembler: Gather all predicate data in its own structure
Rather than user a full instruction for that. Also use
set_instruction_predicate() for a case that coud not be done like that
before the refactoring (because everyone now uses the same instruction
structure).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
9b78f74f23 assembler: Move struct relocation out of relocatable instructions
Now that all instructions (relocatable or not) are struct
brw_program_instructions, this means we can move the relocation specific
information out the "relocatable instruction" structure. This will allow
us to share the relocation information between different types of
instructions.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
f6e9052e8d assembler: Unify all instructions to be brw_program_instructions
Time to finally unify all instructions on the same structure.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00
Damien Lespiau
d008064b3e assembler: Renamed the instruction field to insn
This will be less typing for the refactoring to come (which is use
struct brw_program_instruction in gram.y for the type of all the
instructions).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:54:41 +00:00