platform/upstream/intel-gpu-tools.git
10 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>
10 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>
10 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>
10 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>
10 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.

11 years agoUpdate .gitignore files with the new tests and tools
Damien Lespiau [Mon, 29 Apr 2013 14:51:59 +0000 (15:51 +0100)]
Update .gitignore files with the new tests and tools

Also sort them.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agolib: Remove the execution bit of intel_chipset.h
Damien Lespiau [Mon, 29 Apr 2013 13:53:07 +0000 (14:53 +0100)]
lib: Remove the execution bit of intel_chipset.h

11 years agobuild: Make grep silent when running make test
Damien Lespiau [Tue, 26 Mar 2013 15:14:56 +0000 (15:14 +0000)]
build: Make grep silent when running make test

-q will prevent grep from writing to stdout and print "root" when make
test is running as root.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoREADME: Reword a few sentences
Damien Lespiau [Mon, 25 Mar 2013 17:15:50 +0000 (17:15 +0000)]
README: Reword a few sentences

To be a bit more correct (they were understandable though).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoscripts: Add a script to list implemented workarounds
Damien Lespiau [Fri, 3 May 2013 15:08:25 +0000 (16:08 +0100)]
scripts: Add a script to list implemented workarounds

We document the implemented workarounds with

  workaround_name:platforms

with platforms being a comma separated list of 3-letters platform names.

This scripts gather those tags and output a summary of implemented work
arounds. Example usages:

$ ./scripts/list-workarounds ~/gfx/sources/linux-2.6/
WaApplyL3ControlAndL3ChickenMode: hsw, ivb, vlv
WaCatErrorRejectionIssue: hsw, ivb, vlv
WaDisable4x2SubspanOptimization: hsw, ivb
WaDisableBackToBackFlipFix: ivb, vlv
WaDisableDopClockGating: vlv
....

$ ./scripts/list-workarounds ~/gfx/sources/linux-2.6/ -p ivb
WaApplyL3ControlAndL3ChickenMode
WaCatErrorRejectionIssue
WaDisable4x2SubspanOptimization
WaDisableBackToBackFlipFix
WaDisableEarlyCull
...

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoi-g-t: gem_dummy_reloc_loop.c: add vebox test case
Zhong Li [Fri, 3 May 2013 07:55:34 +0000 (15:55 +0800)]
i-g-t: gem_dummy_reloc_loop.c: add vebox test case

Aside from adding VEBOX support, this test allows allows the "mixed"
test case variant to work on platforms that have 2 rings which was
previously not the case. To the best of my memory, this might therefore
impact G45, and Ironlake.

Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: added commit message, remove num_rings = 1, s/LOCACL/LOCAL]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agoi-g-t: check kernel enable rings or not
Zhong Li [Fri, 3 May 2013 07:54:48 +0000 (15:54 +0800)]
i-g-t: check kernel enable rings or not

1. add functions check kernel enable a ring or not.
2. add function gem_get_num_rings() to check how many rings kernel has
enable.
3. gem_ring_sync_loop.c will call gem_get_num_rings() directly instead
of original static fucntion get_number_rings().

Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: Wrapped commit message + whitespace fixes]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agotests/prime_udl: don't put dirt into stderr when skipping
Daniel Vetter [Thu, 2 May 2013 06:10:15 +0000 (08:10 +0200)]
tests/prime_udl: don't put dirt into stderr when skipping

It upset's QA's test runner.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agogem_exec_nop.c: add vebox test case
Zhong Li [Tue, 23 Apr 2013 07:06:45 +0000 (15:06 +0800)]
gem_exec_nop.c: add vebox test case

v2 (Ben):
Fixed whitespace,
s/HAS_BLT_RING/gem_has_vebox/
s/I915_EXEC_VEBOX/LOCAL_I915_EXEC_VEBOX

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agogem_cs_tlb.c: add vebox test case
Zhong Li [Tue, 23 Apr 2013 07:06:44 +0000 (15:06 +0800)]
gem_cs_tlb.c: add vebox test case

v2 (Ben):
Fixed whitespace,
s/HAS_BLT_RING/gem_has_vebox/
s/I915_EXEC_VEBOX/LOCAL_I915_EXEC_VEBOX

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agogem_ring_sync_loop.c: fix an operator error
Zhong Li [Tue, 23 Apr 2013 07:06:48 +0000 (15:06 +0800)]
gem_ring_sync_loop.c: fix an operator error

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agointel_mmio: Add intel_register_access_needs_fakewake
Ben Widawsky [Fri, 26 Apr 2013 21:26:48 +0000 (14:26 -0700)]
intel_mmio: Add intel_register_access_needs_fakewake

I screwed this up in my recent patch:
commit c7b6ec50007e2e524a208572c34faf1380eeab1b
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Wed Apr 24 19:05:18 2013 -0700

    clean warnings: Silence unused (or private) functions

I've clarified the functions now, and added the proper call from the
python script.

Time to get a regression tester for our tools?

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agoCheck for vebox support before testing
Chris Wilson [Fri, 26 Apr 2013 07:30:04 +0000 (08:30 +0100)]
Check for vebox support before testing

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

11 years agofix breakage from newly used functions vs rebase
Jesse Barnes [Thu, 25 Apr 2013 22:18:19 +0000 (15:18 -0700)]
fix breakage from newly used functions vs rebase

11 years agoadd punit and nc read/write tools for vlv
Jesse Barnes [Thu, 25 Apr 2013 21:43:03 +0000 (14:43 -0700)]
add punit and nc read/write tools for vlv

Good for testing/debugging.

11 years agoclean warnings: Silence unused (or private) functions
Ben Widawsky [Thu, 25 Apr 2013 02:05:18 +0000 (19:05 -0700)]
clean warnings: Silence unused (or private) functions

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agogem_storedw_loop_vebox: Modernize test to look like blitter
Ben Widawsky [Thu, 25 Apr 2013 01:50:01 +0000 (18:50 -0700)]
gem_storedw_loop_vebox: Modernize test to look like blitter

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agotests: storedw on VEBOX
Xiang, Haihao [Tue, 23 Apr 2013 07:06:43 +0000 (15:06 +0800)]
tests: storedw on VEBOX

v2 (Ben): Define LOCAL_I915_EXEC_VEBOX
Small copyright fixes

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agogem_ring_sync_loop: test the new ring
Xiang, Haihao [Tue, 23 Apr 2013 07:06:42 +0000 (15:06 +0800)]
gem_ring_sync_loop: test the new ring

The code is surround by a #ifdef...#endif to avoid to break compiling against
the current libdrm release

v2 (Ben): Use VEBOX get param. Thankfully Daniel let us carve this out
way back when.
Spacing cleanups

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>