profile/extras/intel-gpu-tools.git
12 years agotest/sysfs_l3_parity: skip test if the sysfs interface doesn't exist
Daniel Vetter [Thu, 31 May 2012 13:45:17 +0000 (15:45 +0200)]
test/sysfs_l3_parity: skip test if the sysfs interface doesn't exist

12 years agotest/sysfs_l3_parity: fixup logic
Daniel Vetter [Thu, 31 May 2012 13:45:17 +0000 (15:45 +0200)]
test/sysfs_l3_parity: fixup logic

It didn't fail properly.

12 years agocleanups after l3_parity merge
Daniel Vetter [Thu, 31 May 2012 11:49:32 +0000 (13:49 +0200)]
cleanups after l3_parity merge

- call it sysfs_l3_parity for more consistency
- add .gitignore for intel_l3_parity

12 years agotests/dpf: simple dpf test
Ben Widawsky [Fri, 25 May 2012 23:56:27 +0000 (16:56 -0700)]
tests/dpf: simple dpf test

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agotools/dpf: Tool to read and write l3 remap registers.
Ben Widawsky [Fri, 25 May 2012 23:56:26 +0000 (16:56 -0700)]
tools/dpf: Tool to read and write l3 remap registers.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agotests/gem_wait_rendering_timeout: check polling behaviour
Daniel Vetter [Wed, 30 May 2012 18:16:24 +0000 (20:16 +0200)]
tests/gem_wait_rendering_timeout: check polling behaviour

... with timeout=0. We have special code in the kernel to optimize
that one.

12 years agolib/gem_wait_rendering_timeout: sprinkle busy_ioctl checks
Daniel Vetter [Tue, 29 May 2012 20:23:14 +0000 (22:23 +0200)]
lib/gem_wait_rendering_timeout: sprinkle busy_ioctl checks

While we have that testcase, let's cross-check the busy ioctl.

12 years agolib: fix gen5 workaround emission
Daniel Vetter [Tue, 29 May 2012 20:14:06 +0000 (22:14 +0200)]
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.

12 years agotests/gem_wait_rendering_timeout: test the timeout case
Daniel Vetter [Tue, 29 May 2012 14:52:23 +0000 (16:52 +0200)]
tests/gem_wait_rendering_timeout: test the timeout case

When I've first tried this it somehow failed, but I can't reproduce
this any more. I guess I've hunted a ghost.

12 years agotests/gem_wait_rendering_timeout: fix up the autotuner
Daniel Vetter [Tue, 29 May 2012 14:49:41 +0000 (16:49 +0200)]
tests/gem_wait_rendering_timeout: fix up the autotuner

duuh

12 years agotests/gem_wait_rendering_timout: adjust .gitignore
Daniel Vetter [Tue, 29 May 2012 14:35:35 +0000 (16:35 +0200)]
tests/gem_wait_rendering_timout: adjust .gitignore

12 years agotests/get_wait_rendering_timeout: fixup the auto-tuner
Daniel Vetter [Tue, 29 May 2012 14:35:11 +0000 (16:35 +0200)]
tests/get_wait_rendering_timeout: fixup the auto-tuner

- start at 1 iterations
- actually adjust the number of iterations like the comment claims

12 years agotests/gem_wait_rendering_timeout: some fixes for the blt function
Daniel Vetter [Tue, 29 May 2012 14:34:32 +0000 (16:34 +0200)]
tests/gem_wait_rendering_timeout: some fixes for the blt function

- widht/height are in pixel, and the cmd uses 32bit, so we need to
  adjust this.
- we write to the buffer, set the right reloc domain.

12 years agotests/gem_wait_rendering_timeout: properly skip test
Daniel Vetter [Tue, 29 May 2012 14:23:41 +0000 (16:23 +0200)]
tests/gem_wait_rendering_timeout: properly skip test

also assign the timeout value unconditionally, we want to know it even
when we've timeout out.

12 years agotests/gem_wait_rendering_timeout: make it compile
Daniel Vetter [Tue, 29 May 2012 14:14:31 +0000 (16:14 +0200)]
tests/gem_wait_rendering_timeout: make it compile

... we need to do this libdrm depency dance. Or just copy&paste it.

12 years agotests/wait render timeout test
Ben Widawsky [Fri, 11 May 2012 20:54:12 +0000 (13:54 -0700)]
tests/wait render timeout test

Assures that signals interrupting the wait works properly. Because of
the scheduling around signals, interrupted waits will *seem* faster as
the GPU continues to work while all the CPU scheduling stuff happens.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agotests: fixup type in module_reload
Daniel Vetter [Fri, 25 May 2012 09:29:28 +0000 (11:29 +0200)]
tests: fixup type in module_reload

Oops, I've frobbed this to test the check but committed the wrong
version.

12 years agotests: add some help to module_reload
root [Fri, 25 May 2012 09:26:53 +0000 (11:26 +0200)]
tests: add some help to module_reload

... so that it's easier to get the kernel configuration right.

12 years agotests: add module reload testcase
root [Fri, 25 May 2012 09:02:09 +0000 (11:02 +0200)]
tests: add module reload testcase

We've broken this way too often in the past.

12 years agotests/hangman: fix when run with absolute path
Daniel Vetter [Wed, 23 May 2012 09:37:04 +0000 (11:37 +0200)]
tests/hangman: fix when run with absolute path

QA's test rig does that.

12 years agotest/flip_test: fail harder
Daniel Vetter [Tue, 22 May 2012 17:54:22 +0000 (19:54 +0200)]
test/flip_test: fail harder

We want testcase to return non-zero if they fail ...

12 years agolib: extract kmstest_dump_mode
Daniel Vetter [Tue, 22 May 2012 14:15:15 +0000 (16:15 +0200)]
lib: extract kmstest_dump_mode

12 years agotest/flip_test: use kmstest_create_fb
Daniel Vetter [Tue, 22 May 2012 14:01:32 +0000 (16:01 +0200)]
test/flip_test: use kmstest_create_fb

And bring back some frame indication that actually works.

12 years agolib: extract kmstest_create_fb
Daniel Vetter [Tue, 22 May 2012 12:37:19 +0000 (14:37 +0200)]
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>
12 years agotests: use drm_open_any more
Daniel Vetter [Tue, 22 May 2012 10:01:36 +0000 (12:01 +0200)]
tests: use drm_open_any more

And fix it up to not leak open fds, which kills all the master only
stuff.

12 years agotests/flip_test: rip out usage
Daniel Vetter [Tue, 22 May 2012 08:57:17 +0000 (10:57 +0200)]
tests/flip_test: rip out usage

Totally useless if the only option is "-h"

12 years agotests: add flip_test to .gitignore
Daniel Vetter [Tue, 22 May 2012 08:53:38 +0000 (10:53 +0200)]
tests: add flip_test to .gitignore

12 years agotests/flip_test: rip out funny pictures
Daniel Vetter [Tue, 22 May 2012 08:51:29 +0000 (10:51 +0200)]
tests/flip_test: rip out funny pictures

The path isn't properly autodetected and it yells stupid stuff into
stderr. Which causes spurious failures.

And really, these are automated tests. If you need to look at the output,
something is wrong.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_infoframes: options -p and -P require an argument
Paulo Zanoni [Fri, 27 Apr 2012 19:14:34 +0000 (16:14 -0300)]
intel_infoframes: options -p and -P require an argument

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
12 years agointel_gpu_top: allow to work on Gen7
Eugeni Dodonov [Wed, 16 May 2012 13:14:55 +0000 (10:14 -0300)]
intel_gpu_top: allow to work on Gen7

Somehow nobody noticed this before, but we were missing blt and bsd6
initialization on Gen7.

Reported-by: Philippe Lecluse <philippe.lecluse@intel.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
12 years agotests/gtt_speed: try to outwit gcc
Daniel Vetter [Thu, 10 May 2012 18:25:33 +0000 (20:25 +0200)]
tests/gtt_speed: try to outwit gcc

It optimized away the read loops ;-)

Also fix up the size to not be 1/4th of the one we want for tiled
buffer tests.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_tiled_pread_pwrite fix progname for pretty print progress
Chris Wilson [Wed, 9 May 2012 13:06:28 +0000 (14:06 +0100)]
tests/gem_tiled_pread_pwrite fix progname for pretty print progress

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
12 years agointel_error_decode: Be more lax for whitespace around parsing PCI-ID
Chris Wilson [Wed, 9 May 2012 12:50:53 +0000 (13:50 +0100)]
intel_error_decode: Be more lax for whitespace around parsing PCI-ID

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
12 years agotools: add Haswell registers into intel_reg_dumper
Eugeni Dodonov [Tue, 8 May 2012 18:55:05 +0000 (15:55 -0300)]
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>
12 years agotests/flip_test: test on each CRTC for each detected output
Jesse Barnes [Mon, 7 May 2012 19:57:05 +0000 (12:57 -0700)]
tests/flip_test: test on each CRTC for each detected output

This allows us to test on 3 pipe configs for example.

12 years agotests: add simple flip test
Jesse Barnes [Mon, 7 May 2012 19:36:28 +0000 (12:36 -0700)]
tests: add simple flip test

Add a simple flip test to test flipping on a single output with the
preferred mode.

TODO: test each crtc for 3s and print pass/fail results

12 years agointel_infoframe: fix assertion off by 1
Ben Widawsky [Sun, 29 Apr 2012 03:10:09 +0000 (20:10 -0700)]
intel_infoframe: fix assertion off by 1

this makes my compiler very unhappy

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agochipset: accidentally left the old IS_GEN7 macro
Ben Widawsky [Sun, 29 Apr 2012 03:07:40 +0000 (20:07 -0700)]
chipset: accidentally left the old IS_GEN7 macro

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agotest/ZZ_hangman: adjust to new error_state reset semantics
Daniel Vetter [Fri, 27 Apr 2012 12:08:34 +0000 (14:08 +0200)]
test/ZZ_hangman: adjust to new error_state reset semantics

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_infoframes: add support for Gen 4
Paulo Zanoni [Tue, 24 Apr 2012 21:10:25 +0000 (18:10 -0300)]
intel_infoframes: add support for Gen 4

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_infoframes: AVI InfoFrame version should be 2
Paulo Zanoni [Tue, 24 Apr 2012 21:10:24 +0000 (18:10 -0300)]
intel_infoframes: AVI InfoFrame version should be 2

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agochipset updates
Ben Widawsky [Wed, 25 Apr 2012 20:33:17 +0000 (13:33 -0700)]
chipset updates

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agotest: fix up hangman script and enable by default
Daniel Vetter [Wed, 25 Apr 2012 11:21:38 +0000 (13:21 +0200)]
test: fix up hangman script and enable by default

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_unfence_active_buffers
Daniel Vetter [Sun, 22 Apr 2012 10:35:23 +0000 (12:35 +0200)]
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>
12 years agolib: Fix render copy on gen2
Chris Wilson [Thu, 19 Apr 2012 13:11:51 +0000 (14:11 +0100)]
lib: Fix render copy on gen2

12 years agotests/gem_ringfill: add progress indicator
Daniel Vetter [Thu, 19 Apr 2012 10:34:16 +0000 (12:34 +0200)]
tests/gem_ringfill: add progress indicator

This thing takes ages on older chips.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: re-enable commented-out testcase
Daniel Vetter [Tue, 17 Apr 2012 20:38:44 +0000 (22:38 +0200)]
tests: re-enable commented-out testcase

Meh, I suck.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_set_tiling_vs_pwrite
Daniel Vetter [Tue, 17 Apr 2012 20:02:33 +0000 (22:02 +0200)]
tests: add gem_set_tiling_vs_pwrite

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_set_tiling_vs_gtt: update copyright header
Daniel Vetter [Tue, 17 Apr 2012 16:01:48 +0000 (18:01 +0200)]
tests/gem_set_tiling_vs_gtt: update copyright header

Meh, I've forgotten these.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_set_tiling_vs_gtt
Daniel Vetter [Tue, 17 Apr 2012 15:25:24 +0000 (17:25 +0200)]
tests: add gem_set_tiling_vs_gtt

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_set_tiling_vs_blt: fix on gen4+
Daniel Vetter [Tue, 17 Apr 2012 11:25:04 +0000 (13:25 +0200)]
tests/gem_set_tiling_vs_blt: fix on gen4+

Oops, the new checks need correctly tiled blts to work.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: rename gem_tiled_after_untiled_blt into gem_set_tiling_vs_blt
Daniel Vetter [Sun, 15 Apr 2012 21:59:12 +0000 (23:59 +0200)]
tests: rename gem_tiled_after_untiled_blt into gem_set_tiling_vs_blt

... it checks much more now.

Also update the comments a bit in the testcase.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: pimp tiled_after_untiled_blt
Daniel Vetter [Sun, 15 Apr 2012 21:40:20 +0000 (23:40 +0200)]
tests: pimp tiled_after_untiled_blt

Now with more tiling transition tests. Changes:
- refactoring to reuse the tiling transition functions.
- add a tiled->untiled transition
- add a tiled->tiled transition with different stride
- add a check at the end to ensure that the tiling has indeed changed
  on the test_bo

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoAdd tools/intel_infoframes
Paulo Zanoni [Fri, 13 Apr 2012 13:27:01 +0000 (10:27 -0300)]
Add tools/intel_infoframes

This is a command-line tool that allows us to display and modify the
InfoFrames we send.

v2: use argv instead of stdin

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: skip rc6_residency test if not supported
Daniel Vetter [Thu, 12 Apr 2012 21:12:24 +0000 (23:12 +0200)]
tests: skip rc6_residency test if not supported

Fixes spurious failures.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoUse mmap64() for performing the GTT mapping
Chris Wilson [Thu, 12 Apr 2012 14:47:00 +0000 (15:47 +0100)]
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>
12 years agotests: add gem_gtt_concurrent_blit
Daniel Vetter [Wed, 11 Apr 2012 13:28:26 +0000 (15:28 +0200)]
tests: add gem_gtt_concurrent_blit

Same test as Chris Wilson's gem_cpu_concurrent_blit, but for
gtt mmaps.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add sysfs_rc6_residency to .gitignore
Daniel Vetter [Wed, 11 Apr 2012 13:02:32 +0000 (15:02 +0200)]
tests: add sysfs_rc6_residency to .gitignore

12 years agotests/sysfs_rc6_residency: add some sleep before testing
Daniel Vetter [Wed, 11 Apr 2012 12:55:30 +0000 (14:55 +0200)]
tests/sysfs_rc6_residency: add some sleep before testing

That way I can run i-g-t on my ivb without spurious failures.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: rc6 residency test
Ben Widawsky [Sun, 25 Mar 2012 02:04:10 +0000 (19:04 -0700)]
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>
12 years agodrm/i915: extract card getting
Ben Widawsky [Sun, 25 Mar 2012 23:04:07 +0000 (16:04 -0700)]
drm/i915: extract card getting

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agobuild: make sure we have asprintf
Ben Widawsky [Sun, 25 Mar 2012 02:03:38 +0000 (19:03 -0700)]
build: make sure we have asprintf

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
12 years agotest/gem_cpu_concurrent_blit: Limit memory usage to half aperture
Chris Wilson [Tue, 10 Apr 2012 18:41:43 +0000 (19:41 +0100)]
test/gem_cpu_concurrent_blit: Limit memory usage to half aperture

So that we don't cause needless thrashing on older devices and spoil the
test.

12 years agotest: Exercise concurrent GPU read/write with CPU domain access
Chris Wilson [Tue, 10 Apr 2012 17:21:33 +0000 (18:21 +0100)]
test: Exercise concurrent GPU read/write with CPU domain access

Designed to exercise this patch to i915.ko:

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index fbf1118..57ae1f2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3181,9 +3181,11 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_obj
        if (ret)
                return ret;

-       ret = i915_gem_object_wait_rendering(obj);
-       if (ret)
-               return ret;
+       if (write || obj->pending_gpu_write) {
+               ret = i915_gem_object_wait_rendering(obj);
+               if (ret)
+                       return ret;
+       }

        i915_gem_object_flush_gtt_write_domain(obj);

By exercising the conditions whereby should either of the checks be missed
an error is detected.

12 years agotests: explicit use bash
Daniel Vetter [Tue, 10 Apr 2012 14:23:18 +0000 (16:23 +0200)]
tests: explicit use bash

We use bashisms, which debian's default sh dash doesn't like.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add wedging tests
Ben Widawsky [Wed, 4 Apr 2012 06:02:59 +0000 (23:02 -0700)]
tests: add wedging tests

Used to check that i915_error_state works. Unfortunately this
kills the gpu because wedging is permanent.

Base on a patch by Ben Widawsky.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: fixup drm_lib.sh sourcing
Daniel Vetter [Wed, 4 Apr 2012 09:07:44 +0000 (11:07 +0200)]
tests: fixup drm_lib.sh sourcing

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: use / as path separator instead of _
Daniel Vetter [Wed, 4 Apr 2012 08:56:50 +0000 (10:56 +0200)]
tests: use / as path separator instead of _

Oops. Originally by me, noticed while reviewing Ben Widawsky's patch.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: use common code for scripts
Ben Widawsky [Wed, 4 Apr 2012 06:02:58 +0000 (23:02 -0700)]
tests: use common code for scripts

This removes cut and pasted code and uses a more central source.

Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoMake the assertions guarding syscalls (drmIoctl in particular) verbose
Chris Wilson [Thu, 29 Mar 2012 11:45:59 +0000 (12:45 +0100)]
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>
12 years agotests: use gem_create and gem_close more
Daniel Vetter [Sat, 24 Mar 2012 18:30:29 +0000 (19:30 +0100)]
tests: use gem_create and gem_close more

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_fence_thrash: make some good use of drmtest helpers
Daniel Vetter [Sat, 24 Mar 2012 18:22:21 +0000 (19:22 +0100)]
tests/gem_fence_thrash: make some good use of drmtest helpers

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_exec_faulting_reloc: kill superflous mmap_bo
Daniel Vetter [Sat, 24 Mar 2012 18:17:43 +0000 (19:17 +0100)]
tests/gem_exec_faulting_reloc: kill superflous mmap_bo

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_tiled_after_untiled_blt
Daniel Vetter [Fri, 23 Mar 2012 18:28:08 +0000 (19:28 +0100)]
tests: add gem_tiled_after_untiled_blt

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: adapt storedw tests to ppgtt
Daniel Vetter [Thu, 22 Mar 2012 12:47:57 +0000 (13:47 +0100)]
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>
12 years agotests: don't just bail out when there's not enough RAM
Daniel Vetter [Thu, 22 Mar 2012 11:27:43 +0000 (12:27 +0100)]
tests: don't just bail out when there's not enough RAM

... but actually run the test with reduced memory requirements,
as the messages claims. Additional print it to stdout, stderr
seems to imply FAIL in our QA's testing rig.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_mmap_offset_exhaustion
Daniel Vetter [Tue, 20 Mar 2012 13:24:14 +0000 (14:24 +0100)]
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>
12 years agoupdate .gitingore
Daniel Vetter [Tue, 20 Mar 2012 13:25:56 +0000 (14:25 +0100)]
update .gitingore

12 years agointel_sprite_on: kill overtly verbose and totally content-free comments
Daniel Vetter [Tue, 20 Mar 2012 13:03:18 +0000 (14:03 +0100)]
intel_sprite_on: kill overtly verbose and totally content-free comments

/me just hates fluff

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_sprite_on: remove copy&pasted gem functions
Daniel Vetter [Tue, 20 Mar 2012 13:00:55 +0000 (14:00 +0100)]
intel_sprite_on: remove copy&pasted gem functions

Can we just please stop this?

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_gpu_top: Trust the register access is safe
Chris Wilson [Mon, 19 Mar 2012 14:25:13 +0000 (14:25 +0000)]
intel_gpu_top: Trust the register access is safe

Fixes intel_gpu_top on gen3 which otherwise refuses to do mmio.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
12 years agodecode: Use the correct start mask for gen3 fence registers
Chris Wilson [Mon, 19 Mar 2012 14:24:22 +0000 (14:24 +0000)]
decode: Use the correct start mask for gen3 fence registers

A cut'n'paste error from gen2 apparently.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
12 years agoconfigure: Add AC_SYS_LARGEFILE for mmap64 support on 64-bit
Chris Wilson [Wed, 14 Mar 2012 10:59:51 +0000 (10:59 +0000)]
configure: Add AC_SYS_LARGEFILE for mmap64 support on 64-bit

Without enabling largefile support the prototype for mmap64() is broken
on Linux/x86_64 with the result being a 32-bit integer sign-extended
to fill a 64-bit pointer. Hilarity ensues.

12 years agointel_reg_read: add a flag to simplify bit decoding
Eugeni Dodonov [Tue, 28 Feb 2012 20:40:32 +0000 (17:40 -0300)]
intel_reg_read: add a flag to simplify bit decoding

This allows to specify '-d' parameter which will decode individual bits in
each register being read.

The register bits are printed horizontally for space reasons. This
requires more than 80x25 terminal to see them all. An alternative solution
would be to print them vertically, but this will become much more
difficult to read when printing multiple registers at the same time.

v2: fix spacing to get us a bit closer to the code nirvana.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
12 years agointel_reg_read: support reading multiple registers
Eugeni Dodonov [Tue, 28 Feb 2012 20:33:54 +0000 (17:33 -0300)]
intel_reg_read: support reading multiple registers

The registers must be passed on the command line and will be read
sequentially, one at a time.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
12 years agointel_reg_read: add support for getopt
Eugeni Dodonov [Tue, 28 Feb 2012 20:20:35 +0000 (17:20 -0300)]
intel_reg_read: add support for getopt

This will allow us to pass more options to it in the future.

v2: fix whitespacing issues and improve scary warning text as suggested by
Paul Menzel.

Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
12 years agotests: some more tuning on the tiled partial pwrite/pread test
Daniel Vetter [Wed, 29 Feb 2012 19:22:45 +0000 (20:22 +0100)]
tests: some more tuning on the tiled partial pwrite/pread test

... 8 pages is just not enough to somewhat reliably get one page that
needs bit17 swizzling.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_tiled_partial_pread/write: fixes
Daniel Vetter [Wed, 29 Feb 2012 16:36:04 +0000 (17:36 +0100)]
tests/gem_tiled_partial_pread/write: fixes

Astonishing how dense I sometimes am ...
- increase the bo size so that we don't have any round-up to next tile
  size areas (which the 2d blit go over, but the 1d pread/pwrite calls
  will notice).
- correctly set tiling bits when copying back to a linear buffer.
- read back through a tiled bo to avoid messing with swizzling.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add tiled partial pwrite/pread test
Daniel Vetter [Wed, 29 Feb 2012 14:57:30 +0000 (15:57 +0100)]
tests: add tiled partial pwrite/pread test

And indeed, this blows up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib: Downgrade error for unknown 'swap' not 'ram'
Chris Wilson [Tue, 28 Feb 2012 09:31:17 +0000 (09:31 +0000)]
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>
12 years agolib: Downgrade error for failing to determine swap interface to a warning
Chris Wilson [Tue, 28 Feb 2012 09:29:11 +0000 (09:29 +0000)]
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>
12 years agotestdisplay: remove unnecessary passing of width, height, stride, depth
Jesse Barnes [Mon, 27 Feb 2012 20:50:50 +0000 (12:50 -0800)]
testdisplay: remove unnecessary passing of width, height, stride, depth

These are globals, no need to shadow them everywhere.

12 years agotestdisplay: remove plane test support
Jesse Barnes [Mon, 27 Feb 2012 20:46:11 +0000 (12:46 -0800)]
testdisplay: remove plane test support

This is better done in intel_sprite_on and was broken anyway.

12 years agodemos/intel_sprite_on: build warning fixes
Daniel Vetter [Wed, 22 Feb 2012 09:58:39 +0000 (10:58 +0100)]
demos/intel_sprite_on: build warning fixes

... from Armin Reese.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_ringfill: shut up the compiler
Daniel Vetter [Wed, 22 Feb 2012 09:50:52 +0000 (10:50 +0100)]
tests/gem_ringfill: shut up the compiler

Double-include ftl and local variable shadowing. While fixing the
later I've noticed that we mix up width and height in the blt copy
function.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_ringfill: Exercise all rings
Chris Wilson [Mon, 20 Feb 2012 22:53:26 +0000 (22:53 +0000)]
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>
12 years agogem_ringfill: Make this actually test that all the batches executed.
Eric Anholt [Mon, 20 Feb 2012 18:04:02 +0000 (10:04 -0800)]
gem_ringfill: Make this actually test that all the batches executed.

I was looking into some strange behavior in Mesa that looks like
batches maybe being skipped, but this test didn't catch it.

12 years agointel_reg_dumper: Add dumping of GPU turbo regs.
Eric Anholt [Mon, 20 Feb 2012 18:04:01 +0000 (10:04 -0800)]
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.

12 years agoreg_dumper: Refactor duplicated reg-dumping code.
Eric Anholt [Mon, 20 Feb 2012 18:04:00 +0000 (10:04 -0800)]
reg_dumper: Refactor duplicated reg-dumping code.

12 years agoinstdone: Fix fallthroughs to invalid instdone bits on newer hardware.
Eric Anholt [Mon, 20 Feb 2012 18:03:58 +0000 (10:03 -0800)]
instdone: Fix fallthroughs to invalid instdone bits on newer hardware.