178 Commits

Author SHA1 Message Date
Daniel Vetter
0efa6c7b27 tools/reg_dumper: really dump pipe C regs
Not just a copy of pipe B. Meh.

Also kill a few redudant #define for pipe B - they match pipe A.
2012-08-08 22:05:14 +02:00
Paulo Zanoni
5ba39da67e lib: add more Haswell PCI IDs
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2012-08-07 10:43:32 -03:00
Daniel Vetter
f56a289aa8 tools/reg_dumper: dump pipe C regs
Also reorder the pipe B regs a bit to be consisten with pipe A.
2012-08-07 14:50:54 +02:00
Yi Sun
41fe811feb tests/testdisplay.c: Add a option '-r'.
With the option '-r', the testdisplay could paint a 2-D bar code(QR
bar code) on the screen. The word "pass" is hiden in the bar code
image.  Further more, with this option, testdisplay will wait until a
system signal 'SIGUSR1' coming after each mode setting. This function
is for another program to control testdisplay.

danvet: Fix up the missing static.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-26 15:01:08 +02:00
Daniel Vetter
6bc22e3dfd tests: add basic re-importing prime test
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23 09:52:10 +02:00
Daniel Vetter
434be47f12 shut up the compiler a bit
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23 09:52:10 +02:00
Ben Widawsky
cbb3c685b5 rendercopy_gen7: add support for haswell
Only compile tested.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-30 19:32:33 -07:00
Ben Widawsky
a635a5ac3b context: libdrm wrappers
This wraps libdrm functionality to exec with contexts. This patch
shouldn't be applied until libdrm for contexts is updated.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-29 11:24:52 -07:00
Ben Widawsky
2234f87a08 lib: add a gen7 rendercopy
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-28 22:52:04 -07:00
Ben Widawsky
5a28ef8580 context: update for new execbuf2 element
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-14 10:15:42 -07:00
Eugeni Dodonov
b28a399dcd intel_reg_dumper: dump more PM registers
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-06-13 15:50:44 -03:00
Jesse Barnes
34240176c1 add VLV PCI ID
This allows the tests to run on the prototype boards.
2012-06-11 12:08:32 -07:00
Chris Wilson
77586dcdf7 test/gem_gtt_speed: Add a baseline test for the performance of a CPU mmap
When looking at the pwrite/pread/wc performance, it is useful to judge
that against the performance of an ordinary CPU mmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-04 17:50:51 +01:00
Daniel Vetter
bfbe813f8f lib: fix gen5 workaround emission
Using BEGIN_BATCH can lead to a nice inf recursion through require_space
-> flush_batch -> BEGIN_BATCH.

Also fix things up to always require BATCH_RESERVED. We need 2 dwords
for the gen5 workaround and 2 dwords for MI_BB_END.
2012-05-29 22:14:06 +02:00
Daniel Vetter
17787f30c6 lib: extract kmstest_dump_mode 2012-05-22 16:15:15 +02:00
Daniel Vetter
662d732199 lib: extract kmstest_create_fb
We should get more kms tests soon, and not needing to copy-paste a
nice test pattern should be useful.

That establishes a firm depency of i-g-t on cairo over everything, but
I don't care so much about that.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22 15:56:29 +02:00
Daniel Vetter
0732cc59ab tests: use drm_open_any more
And fix it up to not leak open fds, which kills all the master only
stuff.
2012-05-22 12:01:36 +02:00
Eugeni Dodonov
3986d9faf3 tools: add Haswell registers into intel_reg_dumper
For now, only print their content for diffing, but also add the necessary
bits that can be used for more verbose output in the fugure.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-08 21:14:20 +02:00
Ben Widawsky
43fda53199 chipset: accidentally left the old IS_GEN7 macro
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-04-28 20:07:40 -07:00
Ben Widawsky
4d053f97db chipset updates
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-04-25 13:33:17 -07:00
Daniel Vetter
cf72da57dc tests: add gem_unfence_active_buffers
Unfortunately this requires slab poisoning to catch anything :(

Also add a new helper to drmtest to get the available fence count.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-22 12:35:23 +02:00
Chris Wilson
19a28d06ad lib: Fix render copy on gen2 2012-04-19 14:18:14 +01:00
Chris Wilson
5ce86f88a0 Use mmap64() for performing the GTT mapping
Although the address space for GTT mappings may only be 32-bits, we need
to use the explicit 64-bit mmap interface so that on a 32-bit platform
the offset we pass is not truncated to 31-bits.

Fixes gem_mmap_offset_exhaustion on 32-bit platforms.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-12 15:47:00 +01:00
Ben Widawsky
f841f4028c tests: rc6 residency test
This is meant to test the sysfs entry for showing rc6 residency in
milliseconds. Remember, sysfs is a permanent interface.

v2: use new get_card interface to try "all" devices
check rc6p and rc6pp in addition to rc6

v3: rename rc6_residency.c to sysfs_rc6_residency.c
print better error messages
skip test if rc6 isn't enabled

v4: update to new sysfs names

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2012-04-10 21:11:13 -07:00
Ben Widawsky
2585bea428 drm/i915: extract card getting
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-04-10 21:11:13 -07:00
Chris Wilson
b7bd1837cc Make the assertions guarding syscalls (drmIoctl in particular) verbose
Currently all we see is gem_read: ret == 0 failed, where it would help
to see the errno and/or the ret.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-29 12:50:07 +01:00
Daniel Vetter
afbdc7af8d tests: adapt storedw tests to ppgtt
MI_MEM_VIRTUAL actually means use global gtt now, not setting the bit
means use ppgtt. On previous gens, not setting the bits ment 'use
physical memory'. So what, the usual confusion.

Note that for some odd reasong this is broken on gen6, but only on the
bsd ring. Unexpected.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-22 14:00:22 +01:00
Daniel Vetter
16c4f52782 tests: add gem_mmap_offset_exhaustion
This also adds a gem_madvise helper to lib/drmtest.c

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-20 14:27:05 +01:00
Chris Wilson
a50550f223 lib: Downgrade error for unknown 'swap' not 'ram'
Oops, my mistake for copying a compile fix from another machine...

If we can't detect how much RAM we have, 0 is not a suitable default, so
keep the error for the time being and only downgrade the error for
unknown swap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-28 09:31:17 +00:00
Chris Wilson
2035119201 lib: Downgrade error for failing to determine swap interface to a warning
If we can't detect how much swap is available, presume none.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-28 09:29:11 +00:00
Chris Wilson
fa6c2757fe tests/gem_ringfill: Exercise all rings
On SandyBridge, the BLT commands were split from the RENDER commands as
well as the BSD split inherited from Ironlake. So we need to make sure
we do exercise each ring, and in order to do so we also need to make
sure each batch takes longer to execute than it takes for us to
submit it.

v2: Exercise each ring sequentially.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:48:03 +01:00
Eric Anholt
732547793f intel_reg_dumper: Add dumping of GPU turbo regs.
I was interested in finding why my IVB system is not getting GPU turbo
after suspend/resume.  The piece that looks weird to me is that
INTERRUPT_THRESHOLD is sitting at 0, whereas pre-suspend it's
0x12000000.
2012-02-22 10:45:01 +01:00
Eric Anholt
3e0bd266d2 instdone: Fix fallthroughs to invalid instdone bits on newer hardware. 2012-02-22 10:43:19 +01:00
Eric Anholt
4fc909fd48 instdone: Add support for one of the IVB instdone regs.
[danvet: added GAM and GAFM bits.]
2012-02-22 10:43:06 +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
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
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
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
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
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
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
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
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
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
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
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