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>
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>
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>
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>
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 :/ ]
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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.
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>
Damien Lespiau [Mon, 29 Apr 2013 13:53:07 +0000 (14:53 +0100)]
lib: Remove the execution bit of intel_chipset.h
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
Jesse Barnes [Thu, 25 Apr 2013 22:18:19 +0000 (15:18 -0700)]
fix breakage from newly used functions vs rebase
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.
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>
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>
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>
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>
Xiang, Haihao [Tue, 23 Apr 2013 07:06:41 +0000 (15:06 +0800)]
gem_ring_sync_loop: check the rings supported by the kernel
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>
Ben Widawsky [Mon, 22 Apr 2013 18:36:03 +0000 (11:36 -0700)]
intel_error_decode: HEAD stuff
Show the decoded HEAD value, as well as print the calculated head offset
per ringbuffer.
This will be superceded in the next commit, but that patch is way more
complicated than this one (read: error prone), so I want this here.
Example:
ringbuffer (blitter ring) at 0x00044000; HEAD points to: 0x00044950
v2: Actually make it work for all rings.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Ben Widawsky [Mon, 22 Apr 2013 18:07:35 +0000 (11:07 -0700)]
intel_error_decode: Whitespacing fix
The rest of igt has moved to kernel coding style. People had already
been not conforming with the existing formatting in error decode, so we
may as well fix it.
This addresses two primary issues, tabbing (remove spaces), and space
after function in function call. I may have missed some of the latter
since that was done by hand.
I have upcoming work in this file, and it was annoying me.
v2: Fix case alignment (Chris)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Imre Deak [Wed, 17 Apr 2013 20:18:02 +0000 (23:18 +0300)]
tests/prime_self_import: add subtest to export/import a second gem buffer
Also add a subtest for the fd=handle_to_fd(), fd2=dup(fd), close(fd)
case (idea from Kristian Høgsberg).
Signed-off-by: Imre Deak <imre.deak@intel.com>
v2:
- add a new subtest instead of modifying the original test (Daniel)
- add a new subtest for testing dup (Kristian)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ben Widawsky [Wed, 17 Apr 2013 06:09:25 +0000 (23:09 -0700)]
quick_dump: Add dpio read
The sample usage is in reg_access.dpio_read(). We should add some
semantics to the text files to detect DPIO registers, and do the right
thing.
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ben Widawsky [Fri, 22 Feb 2013 06:05:36 +0000 (22:05 -0800)]
reg_access: Forcewake as necessary
Don't try to be smart. Just poke all forcewake bits if it seems we need
it.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Ben Widawsky [Fri, 22 Feb 2013 06:05:35 +0000 (22:05 -0800)]
quick_dump: add register write
Since there is no command line support, just do a pure integer version
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Ben Widawsky [Fri, 22 Feb 2013 06:05:34 +0000 (22:05 -0800)]
intel_mmio: a query for forcewake requirement
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Ben Widawsky [Fri, 22 Feb 2013 06:05:33 +0000 (22:05 -0800)]
intel_mmio: Allow mmio without debugfs
With the introduction of the forcewake dance:
commit
cac8f8b52621f246a7cff412f340a7db28cb1b99
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Thu Jul 28 13:40:19 2011 -0700
forcewake: Add mmio code to do proper forcewake stuff for gen6
We lost the ability to do register access when either debugfs isn't
mounted, or when the driver isn't loaded. The latter can be beneficial
in debugging situations.
This patch will allow the driver to still do mmio (leaving forcewake
management up to the callers) provided that the i915 driver appears to
not be loaded (according to sysfs)
Requested by Jesse.
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Ben Widawsky [Fri, 22 Feb 2013 06:05:32 +0000 (22:05 -0800)]
quick_dump: say something when reg init fails
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Jesse Barnes [Tue, 16 Apr 2013 20:16:31 +0000 (13:16 -0700)]
fixup VLV reg offsets, add a few more
Jesse Barnes [Tue, 16 Apr 2013 20:14:58 +0000 (13:14 -0700)]
add VLV punit & north cluster read tools
Ville Syrjälä [Thu, 11 Apr 2013 17:43:40 +0000 (20:43 +0300)]
tests/gem_fenced_exec_thrash: Test with > max fences
Make sure the kernel returns EDEADLK when the number of fences is
exceeded for gen2-3. For gen4+ the test makes sure the kernel ignores
the EXEC_OBJECT_NEEDS_FENCE flag.
Note that I changed the code not to round the num_fences to an even
number. Not sure why that was there, and if there's a reason for it,
we need to add it back.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Mika Kuoppala [Thu, 11 Apr 2013 13:11:28 +0000 (16:11 +0300)]
tests/gem_seqno_wrap: verify debugfs write with readback
Make sure that debugfs entry works as expected by reading
back the sequence number that was written.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ville Syrjälä [Tue, 9 Apr 2013 14:45:37 +0000 (17:45 +0300)]
tests/gem_tiling_max_stride: Add a test for max fence stride
gem_tiling_max_stride writes a data pattern to an X-tiled buffer using
the maximum supported stride, reads the data back as linear, and
verifies that the data didn't get scrambled on the way.
The test also checks that some invalid stride values are rejected
properly.
v2: Check invalid strides
v3: Check invalid stride with Y-tiling
Include a few more invalid stride values
Fix gen3 X-tile size
v4: A few more invalid strides :)
Drop the useless memset()
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ville Syrjälä [Tue, 9 Apr 2013 12:25:38 +0000 (15:25 +0300)]
tests: Use gem_available_fences()
lib/drmtest.c provides gem_available_fences(). Use it where
appropriate.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ville Syrjälä [Tue, 9 Apr 2013 12:25:37 +0000 (15:25 +0300)]
tests/gem_fenced_exec_thrash: Increase MAX_FENCES to 32
IVB+ supports 32 fence registers, bump the maximum in the test.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Paulo Zanoni [Thu, 4 Apr 2013 17:33:59 +0000 (14:33 -0300)]
intel_reg_dumper: improve the dumping of backlight registers
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Ben Widawsky [Mon, 8 Apr 2013 17:50:57 +0000 (10:50 -0700)]
m4: Updates to ax_python_devel.m4
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Daniel Vetter [Mon, 8 Apr 2013 07:19:05 +0000 (09:19 +0200)]
tests/gem_fence_trash: make threaded tests more through-rough
With this at least the y-tiled test reliably fails on my machines, but
x-tiled still passes on some. More ideas to tune this highly welcome.
v2: Fill cpu caches with data for each newly allocated bo. This seems
to do the trick on my snb here _really_ reliably. So apparently the
backsnoop for llc gtt writes is the crucial ingredient here to make
the test fail.
While at it, also stop leaking mmap space.
v3: Fixup commit message.
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sun, 7 Apr 2013 22:31:06 +0000 (00:31 +0200)]
lib/drmtest: tune down signal handler stats
Avoids tests with a spurious WARN result in piglit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Sat, 6 Apr 2013 16:29:37 +0000 (18:29 +0200)]
tests/kms_flip: don't leak gpu hang state
We need to clear out the error_state. While at it also make sure that
the hang was indeed detected.
Whoever writes the next test to race against gpu hangs should probably
extract these two functions into the drmtest library. Which just one
user that's not really worth it right now.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 4 Apr 2013 09:36:27 +0000 (11:36 +0200)]
tests/prime_udl: skip harder
I fail.
Daniel Vetter [Thu, 4 Apr 2013 09:06:37 +0000 (11:06 +0200)]
tests/prime_udl: proper return values
... especially skip properly if there's no udl device.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 2 Apr 2013 22:22:41 +0000 (00:22 +0200)]
lib: fixup register access on gen2/3
This wreaked havoc with intel_reg_dumper since it's been broken in
commit
c6fe31bc473a7ae44bc42bad7da5faca3c924821
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date: Thu Jun 21 14:31:34 2012 -0300
intel_reg_dumper: use intel_register_access_init/fini
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Chris Wilson [Wed, 27 Mar 2013 11:32:47 +0000 (11:32 +0000)]
gem_fence_thrash: Fix array allocation size for LP64 systems
Kenneth Graunke [Wed, 27 Mar 2013 05:06:39 +0000 (22:06 -0700)]
intel_perf_counters: Add support for Sandybridge.
While the Sandybridge PRM doesn't have any documentation on the GPU's
performance counters, a lot of information can be gleaned from the older
Ironlake PRM. Oddly, none of the information documented there actually
appears to apply to Ironlake. However, it apparently works just great
on Sandybridge.
Since this information has all been publicly available on the internet
for around three years, we can use it.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Kenneth Graunke [Wed, 27 Mar 2013 05:06:38 +0000 (22:06 -0700)]
intel_perf_counters: Abstract out Ironlake-specific code.
We want to support this tool on more platforms. This lays the
groundwork for making that possible.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Eric Anholt [Wed, 27 Mar 2013 05:06:37 +0000 (22:06 -0700)]
intel_perf_counters: a little tool for dumping performance counters.
This reads the GPU's performance counters via MI_REPORT_PERF_COUNT and
prints them in a top-style interface. While it can be useful in and of
itself, it also documents the performance counters and lets us verify
that they're working.
Currently, it only supports Ironlake.
v2 [Ken]: Rebase on master and fix compilation failures; make it abort
on non-Ironlake platforms to avoid GPU hangs; rename from 'chaps' to
intel_perf_counters since that acronym isn't used any longer; write the
above commit message.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 27 Mar 2013 11:26:46 +0000 (12:26 +0100)]
tests/Makefile.am: gem_fence_trash has grown subtests
Need to move it to the right make target now!
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Mika Kuoppala [Wed, 27 Mar 2013 10:48:07 +0000 (12:48 +0200)]
tests: add write-verify test to gem_fence_thrash
Add write-verify test to gem_fence_thrash. Test will create
multiple threads per fence then verify the write into fenced region.
v2: non-threaded, non-tiled tests added. suggested by Chris Wilson.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Paulo Zanoni [Fri, 22 Mar 2013 17:28:24 +0000 (14:28 -0300)]
intel_reg_dumper: debug SDEISR on Haswell
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Fri, 1 Mar 2013 20:32:34 +0000 (17:32 -0300)]
lib: fix HAS_PCH_SPLIT check
So HAS_PCH_SPLIT on't be true on VLV.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Fri, 1 Mar 2013 20:12:29 +0000 (17:12 -0300)]
intel_reg_dumper: dump HSW watermark registers
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Fri, 1 Mar 2013 19:55:22 +0000 (16:55 -0300)]
intel_reg_dumper: decode some useful Haswell registers
I've checked the value of these registers many many many times during
development.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Fri, 1 Mar 2013 18:46:25 +0000 (15:46 -0300)]
intel_reg_dumper: make Haswell dump useful
It was previously printing ironlake_debug_regs and haswell_debug_regs.
Since ironlake_debug_regs contains a lot of registers that don't exist
on Haswell, running intel_reg_dumper on Haswell caused "unclaimed
register" messages. Now I've copied the existing registers from
ironlake_debug_regs to haswell_debug_regs, so we won't print the
registers that don't exist anymore.
Also removed DP_TP_STATUS_A since it doesn't exist.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Fri, 1 Mar 2013 16:53:40 +0000 (13:53 -0300)]
intel_reg_dumper: recognize LPT
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Paulo Zanoni [Fri, 1 Mar 2013 16:30:46 +0000 (13:30 -0300)]
lib: detect PCH_LPT and PCH_NONE
So we don't assign PCH_IBX to anything that's not PCH_CPT nor PCH_LPT.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Kees Cook [Fri, 15 Mar 2013 18:09:07 +0000 (11:09 -0700)]
tests: add gem_reloc_overflow to check wrapping
This adds a test to make sure that the execbuffer validation routine is
checking for invalid addresses, single entry overflow, and multi-entry
wrapping overflow.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ville Syrjälä [Mon, 4 Mar 2013 13:34:07 +0000 (15:34 +0200)]
kms_flip: Don't access freed data
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ville Syrjälä [Mon, 4 Mar 2013 13:34:06 +0000 (15:34 +0200)]
kms_flip: Add flip-vs-bad-tiling test
flip-vs-bad-tiling tests that page flipping to a Y-tiled buffer returns
an error correctly, rather than triggering kernel BUG for instance.
Create a third fb for this purpose. After the fb has been created,
change its tiling mode to Y. When performing a flip, target this
Y-tiled fb and make sure we get the expected error value.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ville Syrjälä [Fri, 15 Feb 2013 15:10:47 +0000 (17:10 +0200)]
kms_flip: Add a flip-vs-panning-vs-hang test
The flip-vs-panning-vs-hang is just like the regular flip-vs-panning
test, except it also hangs the GPU. This will test whether panning
works after a pending page flip has been cancelled by a GPU reset,
and also whether page flip events get delivered correctly.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>