1343 Commits

Author SHA1 Message Date
Rodrigo Vivi
18bf2e6b34 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>
2013-06-05 15:37:40 -07:00
Rodrigo Vivi
0476c646fa 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>
2013-06-05 15:37:31 -07:00
Chris Wilson
f1e9e300fa 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>
2013-06-05 11:14:25 +01:00
Chris Wilson
2e1c11546a 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>
2013-05-30 08:40:43 +01:00
Imre Deak
1cb4f90946 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>
2013-05-28 18:32:32 +02:00
Imre Deak
a3b47dbe69 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>
2013-05-28 18:32:29 +02:00
Ben Widawsky
55876338fa 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>
2013-05-23 11:17:31 -07:00
Ben Widawsky
57bc7631e1 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>
2013-05-23 11:12:32 -07:00
Ben Widawsky
a08d62257d quick_dump: Add CCID
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-23 11:03:25 -07:00
Damien Lespiau
81ba005381 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>
2013-05-23 12:12:54 +01:00
Ben Widawsky
1109c5acfd 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>
2013-05-22 16:15:04 -07:00
Ben Widawsky
099a92ea28 quick_dump: Add more ring registers
START + CTL (and reorder them in the file)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-22 15:54:53 -07:00
Matt Turner
160feafa2d assembler: Add support for the SENDC instruction.
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-22 13:58:36 -07:00
Imre Deak
7fcd94b286 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>
2013-05-22 18:18:28 +02:00
Imre Deak
404f353394 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>
2013-05-22 18:18:28 +02:00
Imre Deak
bce7d8a061 lib: export the exit handler interface
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-22 18:18:28 +02:00
Imre Deak
4dec89aef7 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>
2013-05-22 18:18:28 +02:00
Ben Widawsky
0e8931925d 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>
2013-05-11 16:00:08 -07:00
Damien Lespiau
397dcb745e 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>
2013-05-10 15:35:26 +01:00
Damien Lespiau
eab0823e0e 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>
2013-05-10 15:26:42 +01:00
Damien Lespiau
3b79360642 ddi_compute_wrpll: Factor out a common expression
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:42 +01:00
Damien Lespiau
4897ac41da 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>
2013-05-10 15:26:42 +01:00
Damien Lespiau
bb1dfd5613 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>
2013-05-10 15:26:41 +01:00
Damien Lespiau
a59b0cd01d 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>
2013-05-10 15:26:41 +01:00
Damien Lespiau
8cf09e5ed4 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>
2013-05-10 15:26:41 +01:00
Damien Lespiau
0be2723c30 tools: Add a standalone tool to test the computation of r,n,p for WRPLLs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Daniel Vetter
3d9beff623 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
2013-05-09 17:17:56 +02:00
Imre Deak
01b408e43a testdisplay: set VT graphics mode
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08 21:00:52 +02:00
Imre Deak
0009a4af3d 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>
2013-05-08 21:00:45 +02:00
Imre Deak
cf26435be8 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>
2013-05-08 21:00:42 +02:00
Imre Deak
d2f7a66fee kms_flip: suppress uninitialized var warning
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08 20:56:57 +02:00
Damien Lespiau
cc6c254ae9 reg_dumper: Shut a warning down
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-08 13:34:39 +01:00
Damien Lespiau
6587f66ff3 lib: Add the declaration of intel_register_access_needs_fakewake()
Otherwise gcc complains that the function hasn't been declared.
2013-05-08 13:34:35 +01:00
Damien Lespiau
ec3e7a66f0 Update .gitignore files with the new tests and tools
Also sort them.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-08 13:34:31 +01:00
Damien Lespiau
f5f6036bbe lib: Remove the execution bit of intel_chipset.h 2013-05-08 13:34:26 +01:00
Damien Lespiau
6a82b68e36 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>
2013-05-08 13:34:21 +01:00
Damien Lespiau
7e9fd56873 README: Reword a few sentences
To be a bit more correct (they were understandable though).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-08 13:34:17 +01:00
Damien Lespiau
b9765af636 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>
2013-05-08 13:27:24 +01:00
Zhong Li
a417ef7cc8 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>
2013-05-03 17:53:57 -07:00
Zhong Li
8ddf84d129 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>
2013-05-03 17:39:14 -07:00
Daniel Vetter
53d251ac23 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>
2013-05-02 08:10:15 +02:00
Zhong Li
bafbbf1cc8 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>
2013-04-27 11:57:37 -07:00
Zhong Li
21e7e342c1 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>
2013-04-27 11:57:30 -07:00
Zhong Li
b6fa628db0 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>
2013-04-27 11:50:55 -07:00
Ben Widawsky
8be812b86c 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>
2013-04-26 14:34:48 -07:00
Chris Wilson
2facc1368d Check for vebox support before testing
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63941
2013-04-26 08:30:52 +01:00
Jesse Barnes
cae610a2e5 fix breakage from newly used functions vs rebase 2013-04-25 15:18:19 -07:00
Jesse Barnes
d6917cf72d add punit and nc read/write tools for vlv
Good for testing/debugging.
2013-04-25 14:43:23 -07:00
Ben Widawsky
c7b6ec5000 clean warnings: Silence unused (or private) functions
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-24 19:11:03 -07:00
Ben Widawsky
cf73a1f241 gem_storedw_loop_vebox: Modernize test to look like blitter
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-24 18:56:10 -07:00