profile/extras/intel-gpu-tools.git
11 years agolib/drmtest: add drmtest_disable/enable_prefault() function
Xiong Zhang [Fri, 19 Jul 2013 10:42:51 +0000 (18:42 +0800)]
lib/drmtest: add drmtest_disable/enable_prefault() function

V2: add exit handler to enable prefault (Daniel)

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
11 years agotests: Add some tiled tests to the runs on simulation
Damien Lespiau [Thu, 18 Jul 2013 11:23:49 +0000 (12:23 +0100)]
tests: Add some tiled tests to the runs on simulation

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agotests: Instrument gem_seqno_wrap to run in simulation
Damien Lespiau [Thu, 18 Jul 2013 10:53:55 +0000 (11:53 +0100)]
tests: Instrument gem_seqno_wrap to run in simulation

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agotests: Instrument gem_lut_handle for simulation
Damien Lespiau [Thu, 18 Jul 2013 10:36:56 +0000 (11:36 +0100)]
tests: Instrument gem_lut_handle for simulation

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agotests: Instrument tests run in simulation to run quickly
Damien Lespiau [Mon, 25 Mar 2013 20:06:20 +0000 (20:06 +0000)]
tests: Instrument tests run in simulation to run quickly

We tweak the tests marked as runnable in simulation to run more quickly,
more often then not at the expense of stress testing (which is of an
arguable interest for the initial bring up in simulation). Hopefully the
values chosen still test something, which is not always straightforward.

It does run quickly, the number on an IVB machines are:

$ time sudo IGT_SIMULATION=0 ./piglit-run.py tests/igt.tests foo
[...]
real 2m0.141s
user 0m16.365s
sys 1m33.382s

Vs.

$ time sudo IGT_SIMULATION=1 ./piglit-run.py tests/igt.tests foo
[...]
real 0m0.448s
user 0m0.226s
sys 0m0.183s

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agotests: Black list tests we don't want to run on simulation
Damien Lespiau [Mon, 29 Apr 2013 17:40:39 +0000 (18:40 +0100)]
tests: Black list tests we don't want to run on simulation

Let's start by a small set of tests, to eventually consider running
more.

The current list should then be:

gem_mmap
gem_pread_after_blit
gem_ring_sync_loop
gem_ctx_basic
gem_pipe_control_store_loop
gem_storedw_loop_render
gem_storedw_loop_blt
gem_storedw_loop_bsd
gem_render_linear_blits
gem_tiled_blits
gem_cpu_reloc

gem_exec_nop
gem_mmap_gtt

v2 add (Daniel Vetter)
gem_exec_bad_domains
gem_exec_faulting_reloc
gem_flink
gem_reg_read
gem_reloc_overflow
gem_tiling_max_stride
prime_*

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agolib: Remove old dead code intel_batchbuffer_emit_mi_flush()
Damien Lespiau [Thu, 18 Jul 2013 13:49:46 +0000 (14:49 +0100)]
lib: Remove old dead code intel_batchbuffer_emit_mi_flush()

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agolib: Introduce drmtest_skip_on_simulation()
Damien Lespiau [Mon, 29 Apr 2013 15:04:52 +0000 (16:04 +0100)]
lib: Introduce drmtest_skip_on_simulation()

This will allow us to explicitely blacklist tests we don't want to run
on simulation.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agolib: Rename IGT_QUICK to INTEL_SIMULATION
Damien Lespiau [Mon, 25 Mar 2013 17:25:14 +0000 (17:25 +0000)]
lib: Rename IGT_QUICK to INTEL_SIMULATION

It's more accurate this way as the quick mode is really useful for in
the simulation environment.

v2: Use the INTEL_ prefix to have a chance to share the same environment
    variable as piglit OpenGL tests

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agobuild: Depend on cairo 1.12.0 for CAIRO_FORMAT_RGB30
Damien Lespiau [Wed, 17 Jul 2013 15:25:29 +0000 (16:25 +0100)]
build: Depend on cairo 1.12.0 for CAIRO_FORMAT_RGB30

We've somewhat recently added RGB30 support to testdisplay, but we need
cairo 1.12.0 for that. Barf early.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotools/inter_error_decode: decode for ctl and acthd
Mika Kuoppala [Fri, 12 Jul 2013 14:02:04 +0000 (17:02 +0300)]
tools/inter_error_decode: decode for ctl and acthd

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/prime_nv_api: check multiple foreign imports with flink
Daniel Vetter [Mon, 15 Jul 2013 09:55:09 +0000 (11:55 +0200)]
tests/prime_nv_api: check multiple foreign imports with flink

We want prime to only ever create one native gem object for each
dma-buf it sees. This can e.g. happen if multiple processes import the
same foreign dma-buf, e.g. the application imports a yuv frame from
v4l to encode it into a video stream and the compositor imports it
into his fd again to display it with an overlay.

Hence add a bunch of tests which check all the various orders in which
this could happen. Currently they all fail.

Checking flink names is the easiest (and afaik only) way to check
whether we're indeed dealing with the same object.

This checks both ways, i.e. exporting from i915 and from nouveau, each
with two variants of the test: One reuses the prime fd, the other
closes it and creates a new one.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotest/prime_nv_test: use gem drmtest functions for pread/pwrite
Daniel Vetter [Mon, 15 Jul 2013 09:12:31 +0000 (11:12 +0200)]
test/prime_nv_test: use gem drmtest functions for pread/pwrite

Different argument order, otherwise the same.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotest/prime_nv_test: nicer test names
Daniel Vetter [Mon, 15 Jul 2013 09:09:57 +0000 (11:09 +0200)]
test/prime_nv_test: nicer test names

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotest/prime_nv_api: more descriptive subtest names
Daniel Vetter [Mon, 15 Jul 2013 09:04:20 +0000 (11:04 +0200)]
test/prime_nv_api: more descriptive subtest names

Preprocessor magic ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/prime_nv_api: Drop bogus check from import-twice
Daniel Vetter [Mon, 15 Jul 2013 08:59:55 +0000 (10:59 +0200)]
tests/prime_nv_api: Drop bogus check from import-twice

It's purely accidental that importing that same bo to different
drm nouveau fds yields the same handle.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/prime_nv_api: convert to subtest infrastructure
Daniel Vetter [Mon, 15 Jul 2013 08:51:10 +0000 (10:51 +0200)]
tests/prime_nv_api: convert to subtest infrastructure

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_write_ring_switch: Skip on pre-SNB
Chris Wilson [Fri, 12 Jul 2013 09:05:34 +0000 (10:05 +0100)]
tests/gem_write_ring_switch: Skip on pre-SNB

The test requires MI commands only introduced with SNB, and so causes
GPU death on gm45 and ilk.

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

11 years agotests/gem_write_read_ring_switch: Repeat under rude interrupter
Chris Wilson [Fri, 12 Jul 2013 08:54:55 +0000 (09:54 +0100)]
tests/gem_write_read_ring_switch: Repeat under rude interrupter

Another waiter that will then be subject to being interrupted, so retest
the ring switches with the rude interrupter.

11 years agotools/quickdump: gitignore generated files
Daniel Vetter [Wed, 10 Jul 2013 13:35:13 +0000 (15:35 +0200)]
tools/quickdump: gitignore generated files

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: actually add gem_write_read_ring_switch
Daniel Vetter [Wed, 10 Jul 2013 13:34:56 +0000 (15:34 +0200)]
tests: actually add gem_write_read_ring_switch

Duh ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotest: add gem_write_read_ring_switch
Daniel Vetter [Wed, 10 Jul 2013 08:35:10 +0000 (10:35 +0200)]
test: add gem_write_read_ring_switch

This is meant to exercise the bug fixed in

https://patchwork.kernel.org/patch/2825192/

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotools/intel_reg_dumper: fix up END register
Daniel Vetter [Tue, 9 Jul 2013 21:04:20 +0000 (23:04 +0200)]
tools/intel_reg_dumper: fix up END register

I'm full of fail ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotools/intel_reg_dumper: add gen6+ fences
Daniel Vetter [Tue, 9 Jul 2013 08:46:09 +0000 (10:46 +0200)]
tools/intel_reg_dumper: add gen6+ fences

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agogem_(tiled|linear)_blits: s/interrutible/interruptible/
Chris Wilson [Thu, 4 Jul 2013 00:11:05 +0000 (01:11 +0100)]
gem_(tiled|linear)_blits: s/interrutible/interruptible/

Spelling fix in "interruptible" subtest name.

11 years agotests/kms_flip: don't run blocking relateve vblank waits with interrupts
Daniel Vetter [Wed, 3 Jul 2013 23:50:55 +0000 (01:50 +0200)]
tests/kms_flip: don't run blocking relateve vblank waits with interrupts

They simply take forever with the current kernel implementation. And
since everyone switched over to the event based interface I don't see
much incentive to try to fix that.

So just disable them.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agointel_reg_dumper: enable the power well
Paulo Zanoni [Wed, 3 Jul 2013 17:42:48 +0000 (14:42 -0300)]
intel_reg_dumper: enable the power well

The intel_reg_dumper tool reads a lot of display registers. If we
don't turn on the power well, dmesg will get flooded with tons of
messages about unclaimed registers. So here we enable the "Debug"
power well register and then restore its state later. It's impossible
to guarantee that other things won't mess with the debug register
between our put and get calls, but at least we're trying our best to
keep things working fine, and it's the debug register anyway.

As far as I know, nothing else uses the Debug register for anything,
so we should be safe for now.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agolib: fix WM_DBG register address
Paulo Zanoni [Wed, 3 Jul 2013 17:13:34 +0000 (14:13 -0300)]
lib: fix WM_DBG register address

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agointel_reg_dumper: add hsw_debug_lp_wm
Paulo Zanoni [Tue, 7 May 2013 15:53:52 +0000 (12:53 -0300)]
intel_reg_dumper: add hsw_debug_lp_wm

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agoMake the failure message for drm_open_any() more specific
Chris Wilson [Wed, 3 Jul 2013 09:02:27 +0000 (10:02 +0100)]
Make the failure message for drm_open_any() more specific

Do not suggest retrying as root if we already are.

11 years agoAvoid corrupting the exitcode with a failure to open a quiescent fd
Chris Wilson [Wed, 3 Jul 2013 08:58:28 +0000 (09:58 +0100)]
Avoid corrupting the exitcode with a failure to open a quiescent fd

In the atexit handler, we attempt to quiesce the GPU. This involves
opening a fd - which will fail if the test is not being run as root and
will obliterate the test status and pollute the output.

11 years agotests/gem_linear|tiled_blits: convert to subtests
Daniel Vetter [Wed, 3 Jul 2013 06:47:34 +0000 (08:47 +0200)]
tests/gem_linear|tiled_blits: convert to subtests

Finer granularity for nightly runs and regression reporting is always
nice.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm_lib.sh: Be more precise in detecting the i915 /sys path
Chris Wilson [Wed, 3 Jul 2013 07:10:28 +0000 (08:10 +0100)]
drm_lib.sh: Be more precise in detecting the i915 /sys path

We need to be careful in case other devices grow an error file in the
future. The first step here is just to check the minor that corresponds
with the debugfs path found for the device

11 years agotests/hangman: Be lenient towards a non-existent sysfs error state
Chris Wilson [Wed, 3 Jul 2013 07:00:13 +0000 (08:00 +0100)]
tests/hangman: Be lenient towards a non-existent sysfs error state

As /sys/class/drm/cardX/error is a new interface for 3.11, we need to be
quiet when it does not exist or else we upset the automated tests.

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

11 years agotests/gem_(linear|tiled)_blits: Repeat whilst being interrupted
Chris Wilson [Tue, 2 Jul 2013 10:24:57 +0000 (11:24 +0100)]
tests/gem_(linear|tiled)_blits: Repeat whilst being interrupted

Since these two tests exercise a working set larger than aperture, they
require stalls which are prone to being interrupted - so interrupt them
and check that everything still works.

11 years agotests/drm_lib.sh: Don't die if the sysfs path can't be found
Daniel Vetter [Tue, 2 Jul 2013 07:13:57 +0000 (09:13 +0200)]
tests/drm_lib.sh: Don't die if the sysfs path can't be found

That just means that the sysfs error file isn't there.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotest/drm_lib.sh: Updated sysfs error filename
Daniel Vetter [Tue, 2 Jul 2013 07:09:56 +0000 (09:09 +0200)]
test/drm_lib.sh: Updated sysfs error filename

I've forgotten to bikeshed that part ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/ZZ_hangman: Test both error_state interfaces
Mika Kuoppala [Fri, 28 Jun 2013 11:35:41 +0000 (14:35 +0300)]
tests/ZZ_hangman: Test both error_state interfaces

Test both debugfs and sysfs error_state interfaces.

v2: sysfs error_state not mandatory

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: Update sysfs file name.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: add i915_sfs_path
Mika Kuoppala [Thu, 27 Jun 2013 13:54:43 +0000 (16:54 +0300)]
tests: add i915_sfs_path

To access 'error_state' through sysfs.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: rename debugfs base path to be more specific
Mika Kuoppala [Thu, 27 Jun 2013 13:54:42 +0000 (16:54 +0300)]
tests: rename debugfs base path to be more specific

In preparation to have sysfs entries used in scripts
rename to more specific name.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/kms_flip: Repeat all of the tests whilst being rudely interrupted
Chris Wilson [Mon, 1 Jul 2013 11:24:55 +0000 (12:24 +0100)]
tests/kms_flip: Repeat all of the tests whilst being rudely interrupted

Once upon a time, our modesetting code used to fail if it was
interrupted. So lets make sure that never happens whilst flipping.

11 years agoquick_dump: Add VLV DPIO registers
Ville Syrjälä [Wed, 26 Jun 2013 17:57:34 +0000 (20:57 +0300)]
quick_dump: Add VLV DPIO registers

Add the names of all VLV DPIO registers.

v2: Use the third element to signal DPIO registers, and split
    the code changes to a separate patch

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agoquick_dump: Document the register definition format
Ville Syrjälä [Wed, 26 Jun 2013 17:57:33 +0000 (20:57 +0300)]
quick_dump: Document the register definition format

Add a small comment about what the elements in the register
tuple mean.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agoquick_dump: Add automagic DPIO register support
Ville Syrjälä [Wed, 26 Jun 2013 17:57:32 +0000 (20:57 +0300)]
quick_dump: Add automagic DPIO register support

Repurpose the (currently unused) third element in the register
definition tuple to indicate the type of the register. 'DPIO'
is the only special register type for now.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agolib/drmtest: set default sighandler for QUIT in the signal process
Daniel Vetter [Sat, 29 Jun 2013 16:31:45 +0000 (18:31 +0200)]
lib/drmtest: set default sighandler for QUIT in the signal process

Otherwise the thing doesn't reliably die when run from the piglit
framework somehow.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_cpu_concurrent_blit: stop signal helper again
Daniel Vetter [Sat, 29 Jun 2013 15:50:49 +0000 (17:50 +0200)]
tests/gem_cpu_concurrent_blit: stop signal helper again

Not doing so totally upsets the piglit igt runner since we leave
a bunch of zombies behind.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_cpu_concurrent_blit: Restore lost intel_copy_bo()
Chris Wilson [Sat, 29 Jun 2013 16:17:52 +0000 (17:17 +0100)]
tests/gem_cpu_concurrent_blit: Restore lost intel_copy_bo()

Accidentally replaced the intel_copy_bo() with the set_bo() in the
"overwrite-source" in 4fd34977aff60f58cd955eb9c2d568d5fb824611 when
clearly I wanted to simply add the calls to set_bo() first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_cpu_concurrent_blit: Undo debugging hack
Chris Wilson [Sat, 29 Jun 2013 16:09:21 +0000 (17:09 +0100)]
tests/gem_cpu_concurrent_blit: Undo debugging hack

Accidentally left in the hack to run the
"overwrite-source-interruptible" for only one loop, used whilst testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotest/gem_(cpu|gtt)_concurrent_blit: Move the set_bo() from create to the test
Chris Wilson [Sat, 29 Jun 2013 16:05:24 +0000 (17:05 +0100)]
test/gem_(cpu|gtt)_concurrent_blit: Move the set_bo() from create to the test

Hiding the initial set_bo() required for the "overwrite-source" tests
lead to a nice bit of hilarity as I missed repeating the initialisation
for the multiple loops of the interruptible version of
"overwrite-source".

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_(cpu|gtt)_concurrent_blit: Restore the old tests and add the new interrupti...
Chris Wilson [Sat, 29 Jun 2013 15:45:46 +0000 (16:45 +0100)]
tests/gem_(cpu|gtt)_concurrent_blit: Restore the old tests and add the new interruptible as new tests

Daniel preferred to keep the old tests intact lest we accidentally break
them, and to add the new interruptible tests as new subtests.

In the process also make sure the GPU is idle before starting each loop.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_(cpu|gtt)_concurrent_blit: Enable signals
Chris Wilson [Sat, 29 Jun 2013 15:15:38 +0000 (16:15 +0100)]
tests/gem_(cpu|gtt)_concurrent_blit: Enable signals

In order to exercise the bug behind:

commit 22fd5ca947b58901927d100d2b1aa0f1672b3435
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jun 28 16:54:08 2013 +0100

    drm/i915: Only clear write-domains after a successful wait-seqno

we need to check for concurrent access with the potential to be
interrupted by a signal. The framework for doing so is already in place,
so just enable it and repeat the tests for longer to give better chance
of being interrupted at just the wrong moment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_lut_handle: Quit when we hit ENOSPC
Chris Wilson [Thu, 27 Jun 2013 18:58:57 +0000 (19:58 +0100)]
tests/gem_lut_handle: Quit when we hit ENOSPC

I'd been working under the falsehood that we would always generate an
error for an invalid reloc->target_handle before reserving any object.
However, only the execlist is checked up front for validity before
reservation so ENOSPC is a genuine error condition raised by the test.
Fix it so that we stop reporting that limit as a test failure.

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

11 years agotests/gem_lut_handle: Simplify creation of broken handles
Chris Wilson [Mon, 24 Jun 2013 12:53:44 +0000 (13:53 +0100)]
tests/gem_lut_handle: Simplify creation of broken handles

Limit the broken handles to UINT32_MAX-4096 so that we can be sure that
they do not alias with a valid handle.

References: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/kms_flip: Suppress failure from setting mode
Chris Wilson [Mon, 24 Jun 2013 11:03:54 +0000 (12:03 +0100)]
tests/kms_flip: Suppress failure from setting mode

We may fail to set a mode if it fails some hidden constraints, such as
bandwidth on the third pipe. This is expected, so skip testing such
modes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66111
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agom4/ax_python_devel: Update to upstream
Ben Widawsky [Sun, 23 Jun 2013 23:12:51 +0000 (16:12 -0700)]
m4/ax_python_devel: Update to upstream

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agokms_render: Skip unsupported display configurations
Chris Wilson [Fri, 21 Jun 2013 15:52:53 +0000 (16:52 +0100)]
kms_render: Skip unsupported display configurations

Certain modes may not be supported by certain combinations of pipes.
This is impossible to determine upfront, and we await an atomic
modesetting query operation. In the meantime, if we fail to set a mode,
just skip that test.

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

11 years agogem_lut_handle: Print some more information upon failure
Chris Wilson [Wed, 19 Jun 2013 13:19:07 +0000 (14:19 +0100)]
gem_lut_handle: Print some more information upon failure

References: https://bugs.freedesktop.org/show_bug.cgi?id=65391

11 years agoquick_dump: vlv mipi dsi register support
Jani Nikula [Tue, 4 Jun 2013 12:42:15 +0000 (15:42 +0300)]
quick_dump: vlv mipi dsi register support

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agolib: fix drm_fourcc.h include path
Imre Deak [Fri, 7 Jun 2013 18:29:02 +0000 (21:29 +0300)]
lib: fix drm_fourcc.h include path

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agogem_lut_handle: Avoid using a valid handle when testing BROKEN
Chris Wilson [Fri, 7 Jun 2013 10:44:40 +0000 (11:44 +0100)]
gem_lut_handle: Avoid using a valid handle when testing BROKEN

11 years agolist-workarounds: Some workarounds start with WA, not Wa
Damien Lespiau [Thu, 6 Jun 2013 15:52:09 +0000 (16:52 +0100)]
list-workarounds: Some workarounds start with WA, not Wa

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agotests: add kms_render
Imre Deak [Thu, 30 May 2013 19:59:59 +0000 (22:59 +0300)]
tests: add kms_render

Add a test going through all connectors/crtcs/modes/formats painting to
a front FB with CPU or painting to a back FB with CPU and blitting it
to the front FB.

Only formats understood by cairo are supported for now.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
11 years agolib: refactor kmstest_create_fb
Imre Deak [Fri, 24 May 2013 14:26:54 +0000 (17:26 +0300)]
lib: refactor kmstest_create_fb

Factor out parts that will be used by an upcoming patch adding
kmstest_create_fb2.

Also call the fb paint functions directly, there is not much
point in passing a function pointer for that.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
11 years agolib: add kmstest_get_connector_config
Imre Deak [Thu, 30 May 2013 21:21:43 +0000 (00:21 +0300)]
lib: add kmstest_get_connector_config

This is used by multiple test cases, so make it shared.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
11 years agolib: use kmstest_cairo_printf_line in paint_marker
Imre Deak [Wed, 5 Jun 2013 19:11:11 +0000 (22:11 +0300)]
lib: use kmstest_cairo_printf_line in paint_marker

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
11 years agolib: add kmstest_cairo_printf_line
Imre Deak [Thu, 30 May 2013 12:03:48 +0000 (15:03 +0300)]
lib: add kmstest_cairo_printf_line

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
[v3: fix mode printing in paint_output_info() botched by debugging leftover :/ ]

11 years agolib: move connector_type_str and co to drmtest
Imre Deak [Thu, 30 May 2013 19:53:53 +0000 (22:53 +0300)]
lib: move connector_type_str and co to drmtest

These are used by multiple test cases, so make them shared.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
11 years agointel_chipset: Adding more reserved PCI IDs for Haswell.
Rodrigo Vivi [Mon, 13 May 2013 20:54:12 +0000 (17:54 -0300)]
intel_chipset: Adding more reserved PCI IDs for Haswell.

At DDX commit Chris mentioned the tendency we have of finding out more
PCI IDs only when users report. So Let's add all new reserved Haswell IDs.

Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=63701
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agointel_chipset: Fix Haswell GT3 names.
Rodrigo Vivi [Mon, 13 May 2013 20:54:11 +0000 (17:54 -0300)]
intel_chipset: Fix Haswell GT3 names.

When publishing first HSW ids we weren't allowed to use "GT3" codname.
But this is the correct codname and Mesa is using it already.
So to avoid people getting confused why in Mesa it is called GT3 and here
it is called GT2_PLUS let's fix this name in a standard and correct way.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agogem_lut_handle: Make the error checking explicit for LUT handling
Chris Wilson [Wed, 5 Jun 2013 10:10:04 +0000 (11:10 +0100)]
gem_lut_handle: Make the error checking explicit for LUT handling

What this test is interested in is the handling of the LUT for very
large arrays, irrespective of whether such batch are actually
executable. So adjust the pass/fail checks to be explicit in the error
they are looking for, so that we do not conflate memory/aperture
pressure as a failure in the LUT API.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agogem_reg_read: Only check errno after a definite error
Chris Wilson [Thu, 30 May 2013 07:37:48 +0000 (08:37 +0100)]
gem_reg_read: Only check errno after a definite error

As upon success, errno is invalid and may give spurious false results.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/lib: make sure the GPU is idle at test start and exit
Imre Deak [Tue, 28 May 2013 14:35:32 +0000 (17:35 +0300)]
tests/lib: make sure the GPU is idle at test start and exit

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

v2:
- Make sure also that the GPU is idle at start and error exit of any
  test using drm_open_any(). (Daniel)
v3:
- actually call gem_quiescent_gpu() at exit

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib: make sure all rings are idle in gpu_quiescent_gpu()
Imre Deak [Tue, 28 May 2013 14:22:57 +0000 (17:22 +0300)]
lib: make sure all rings are idle in gpu_quiescent_gpu()

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoquick_dump: fix text file
Ben Widawsky [Thu, 23 May 2013 18:16:52 +0000 (11:16 -0700)]
quick_dump: fix text file

I accidentally pushed
commit a08d62257dbdc8f4d3f5e655e0ba7bd192af37ff
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Thu May 23 11:03:25 2013 -0700

    quick_dump: Add CCID

before I was ready, in order to get the mmio fix in. This fixes a parse
error in quick_dump.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agolib/intel_mmio: Fix the fix
Ben Widawsky [Thu, 23 May 2013 18:09:55 +0000 (11:09 -0700)]
lib/intel_mmio: Fix the fix

commit 16e44f5499e1754dfb10fc62b22675f5aa6ac781
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Apr 3 00:22:41 2013 +0200

    lib: fixup register access on gen2/3

THis fix was incorrect for a few reasons:
1. It didn't reflect the state in mmio_data.safe
2. It skipped forcewake on gen6+ which is both incorrect and
unnecessary (for gen<6).
3. It had 2 goto done, the second of which was impossible to hit.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agoquick_dump: Add CCID
Ben Widawsky [Thu, 23 May 2013 18:03:25 +0000 (11:03 -0700)]
quick_dump: Add CCID

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agolist-workarounds: Don't prepend kernel_path to the driver directory
Damien Lespiau [Thu, 23 May 2013 11:11:26 +0000 (12:11 +0100)]
list-workarounds: Don't prepend kernel_path to the driver directory

We are changing the cwd, so we just need the relative patch from the
root for the kernel git repo. This allows the script to work from
anywhere.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoquick_dump: Add basic haswell support
Ben Widawsky [Wed, 22 May 2013 23:15:04 +0000 (16:15 -0700)]
quick_dump: Add basic haswell support

Mostly using the IVB registers + a few I grabbed from i915_reg.h

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agoquick_dump: Add more ring registers
Ben Widawsky [Wed, 22 May 2013 22:54:53 +0000 (15:54 -0700)]
quick_dump: Add more ring registers

START + CTL (and reorder them in the file)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agoassembler: Add support for the SENDC instruction.
Matt Turner [Mon, 29 Apr 2013 17:58:26 +0000 (10:58 -0700)]
assembler: Add support for the SENDC instruction.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agokms_flip: add subtests for the DPMS OFF->modeset->flip sequence
Imre Deak [Wed, 22 May 2013 14:40:48 +0000 (17:40 +0300)]
kms_flip: add subtests for the DPMS OFF->modeset->flip sequence

Add a double buffer and a single buffer version of the above sequence,
to check if the modeset does a DPMS ON.

Tested on IVB, with and without the relevant kernel fix, got the
expected results.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agokms_flip: do a DPMS ON when exiting with error
Imre Deak [Wed, 22 May 2013 14:40:47 +0000 (17:40 +0300)]
kms_flip: do a DPMS ON when exiting with error

Currently when exiting with error, we'll get stuck in a DPMS OFF state
if the error happens while we have DPMS OFF set in the test sequence.
This happens even though we switch back to text mode at exit. This might
be a bug in itself to be fixed later, but in any case we want a working
console, so do an explicit DPMS ON.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib: export the exit handler interface
Imre Deak [Wed, 22 May 2013 14:40:46 +0000 (17:40 +0300)]
lib: export the exit handler interface

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib: fix exit handler when multiple handlers are registered
Imre Deak [Wed, 22 May 2013 14:40:45 +0000 (17:40 +0300)]
lib: fix exit handler when multiple handlers are registered

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolist-workarounds: Convert to python3
Ben Widawsky [Fri, 10 May 2013 22:25:49 +0000 (15:25 -0700)]
list-workarounds: Convert to python3

The rest of the tool suite that uses python already uses python3.
The tool configure requires python >= 3 (which is confusing because of
the no backward compat problem).

The world is slowly moving to python3.

Converted with 2to3.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agolist-workarounds: Don't add an already present platform
Damien Lespiau [Fri, 10 May 2013 13:37:10 +0000 (14:37 +0100)]
list-workarounds: Don't add an already present platform

Currently if we come across several sites that say that a specific
workaround is implemented for a platform, we just add the platform
several times to the list. eg.

WaFbcDisableDpfcClockGating: ivb, hsw, ivb, hsw

This patch prevent that by only adding the plaform if it's not already
there.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoddi_compute_wrpll: Do not use a double constant
Damien Lespiau [Fri, 10 May 2013 12:41:32 +0000 (13:41 +0100)]
ddi_compute_wrpll: Do not use a double constant

Otherwise the expression will be promoted to a floating point
multiplication

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoddi_compute_wrpll: Factor out a common expression
Damien Lespiau [Thu, 2 May 2013 15:38:30 +0000 (16:38 +0100)]
ddi_compute_wrpll: Factor out a common expression

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoddi_compute_wrpll: Rework the logic around r2 and n2 a bit
Damien Lespiau [Thu, 2 May 2013 15:33:56 +0000 (16:33 +0100)]
ddi_compute_wrpll: Rework the logic around r2 and n2 a bit

Let's not use the 2K variants of the frequencies it does not help
in anything here and the explanations are hopefuly more understandable
this way.

On top of that, I noticed that we can just compute the desired min/max
boundaries for r2 and n2, so use that instead of the two tests to
discard out of range values.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoddi_compute_wrpll: Fix the reference for 222525Khz and 296703Khz
Damien Lespiau [Thu, 2 May 2013 14:21:51 +0000 (15:21 +0100)]
ddi_compute_wrpll: Fix the reference for 222525Khz and 296703Khz

Assume that the budget for those frequencies were tuned after the
reference table was created.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoddi_compute_wrpll: Fix the reference table for 37762500Hz
Damien Lespiau [Thu, 2 May 2013 14:11:49 +0000 (15:11 +0100)]
ddi_compute_wrpll: Fix the reference table for 37762500Hz

The 5 was lost when stored in KHz.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoddi_compute_wrpll: Code the reference frequencies in Hz
Damien Lespiau [Thu, 2 May 2013 13:51:41 +0000 (14:51 +0100)]
ddi_compute_wrpll: Code the reference frequencies in Hz

Because the reference frequencies were stored in KHz, we've lost
precision for 37762500Hz and the test is failing. Let's express the
reference frequencies in Hz then.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agotools: Add a standalone tool to test the computation of r,n,p for WRPLLs
Damien Lespiau [Tue, 30 Apr 2013 16:42:15 +0000 (17:42 +0100)]
tools: Add a standalone tool to test the computation of r,n,p for WRPLLs

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agotests: fix script testlist
Daniel Vetter [Thu, 9 May 2013 15:17:04 +0000 (17:17 +0200)]
tests: fix script testlist

Oops. This has been broken since:

commit d798ab9c2a092a08e14c6f2dfb1777376ba407a8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 18 22:55:58 2012 +0100

    tests: add testcase to check igt runtime enviroment

11 years agotestdisplay: set VT graphics mode
Imre Deak [Wed, 8 May 2013 16:06:44 +0000 (19:06 +0300)]
testdisplay: set VT graphics mode

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agokms_flip: set VT graphics mode
Imre Deak [Wed, 8 May 2013 16:06:43 +0000 (19:06 +0300)]
kms_flip: set VT graphics mode

This is one reason for some of the sporadic kms_flip failures.
One such is https://bugs.freedesktop.org/show_bug.cgi?id=59834.

v2:
- use unsigned long for KDSETMODE/KDGETMODE
- fix passing the parameter to KDGETMODE as it should be by value
- actually testing that it works..

v3:
- don't do an explicit DPMS_ON, only switch to graphics mode.

v4:
- use the newly added drmtest_set_vt_graphics_mode(), which will also
  take care of restoring the original mode. (Daniel)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib: add helper to set VT graphics mode
Imre Deak [Wed, 8 May 2013 16:06:42 +0000 (19:06 +0300)]
lib: add helper to set VT graphics mode

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agokms_flip: suppress uninitialized var warning
Imre Deak [Wed, 8 May 2013 16:06:41 +0000 (19:06 +0300)]
kms_flip: suppress uninitialized var warning

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoreg_dumper: Shut a warning down
Damien Lespiau [Mon, 29 Apr 2013 18:05:27 +0000 (19:05 +0100)]
reg_dumper: Shut a warning down

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agolib: Add the declaration of intel_register_access_needs_fakewake()
Damien Lespiau [Mon, 29 Apr 2013 17:57:47 +0000 (18:57 +0100)]
lib: Add the declaration of intel_register_access_needs_fakewake()

Otherwise gcc complains that the function hasn't been declared.