3208 Commits

Author SHA1 Message Date
Zhao Yakui
8e62f78999 rendercopy/skl: Emit 3DSTATE_WM_HZ_OP
This is from that on BDW. Without it, the pixel pipeline can't work well.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30 12:21:03 +01:00
Zhao Yakui
833e476624 rendercopy/skl: Fix the 3DSTATE_DS instruction length
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30 12:21:03 +01:00
Zhao Yakui
7628268952 rendercopy/skl: Fix the STATE_BASE_ADDRESS instruction length
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30 12:21:03 +01:00
Zhao Yakui
77a9ed7da2 rendercopy/skl: Set Instruction Buffer size Modify Enable to 1
This is ported from that on BDW.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30 12:21:03 +01:00
Zhao Yakui
e539e91cf5 rendercopy/skl: update instruction length
This is ported from that on BDW.

v2: Only bump the prefix when we need to program the instruction
differently with the previous generations.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30 12:21:03 +01:00
Zhao Yakui
f04bf00c0d rendercopy/skl: Pass the context to rendercopy function on SKL
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30 12:21:02 +01:00
Damien Lespiau
ecd659e000 rendercopy/skl: Update 3DSTATE_SBE
SBE has now to be explicitely told which channels of which components
are used by the pixel shader.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30 12:21:02 +01:00
Damien Lespiau
e5b850cb34 rendercopy/skl: Set the 3DSTATE_VF state
This is to ensure the "Component Packing Enable" bit is set to 0.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30 12:21:02 +01:00
Damien Lespiau
aa7f9cf881 rendercopy/skl: Start the gen9 rendercopy from the gen8 version
v2 (Ben): Rebased on:
 commit ea11d103e0617e33bce6f11328521d15b13422b0
Author: Oscar Mateo <oscar.mateo@intel.com>
Date:   Tue Nov 12 11:50:35 2013 +0000

    build: list all test/tool/lib source files in their own Makefile.sources

v3: (Ben): Rebased on the doc/API rework. Probably needs review

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30 12:21:02 +01:00
Damien Lespiau
334f657e98 list-workarounds/skl: Add Skylake to the list of valid platorms
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30 12:21:02 +01:00
Damien Lespiau
4d95a1551b skl: initialize instdone bits for gen9
gen9 uses the same bits as gen8.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-09-30 12:21:02 +01:00
Damien Lespiau
256831cd88 skl: Add gen9 to intel_gen()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-09-30 12:21:02 +01:00
Damien Lespiau
91ebcd0c54 skl: Add SKL PCI ids
v2: Update to the latest PCI ids

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30 12:21:02 +01:00
Daniel Vetter
0eaa18061b tests/gem_wait: argument validation tests
Shockingly we don't check for 0 flags!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 15:33:07 +02:00
Daniel Vetter
e4753d2d96 tests/gem_wait_render_timeout: Convert to subtests
I want to add a bunch of api tests besides the functional
"render-timeout" testcase.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 15:33:07 +02:00
Daniel Vetter
5da8b8db02 tests/gem_wait_render_timeout: Drop local structs
We're long past the point where libdrm has these.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 15:33:07 +02:00
Tim Gore
f33fa71481 lib/igt_core: make single/simple tests use igt_exit
Currently tests that use igt_simple_main will simply call
"exit()" if they pass, making it difficult to ensure that
any required cleanup is done. At present this is not an
issue, but it will be when I submit a patch to turn off the
lowmemorykiller for all tests.

Signed-off-by: Tim Gore <tim.gore@intel.com>
[danvet: Also update api docs.]
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-29 16:57:49 +02:00
Damien Lespiau
32a0308e2d kms_cursor_crc: Remove two unused local variables
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-26 16:48:02 +01:00
Chris Wilson
f2775039b1 igt/gem_userptr_blits: Test interruptible create-destroy
In order to exercise https://bugs.freedesktop.org/show_bug.cgi?id=84207
we need to interrupt the mmu_notifier_register with a signal. This is
likely to be quite difficult, but let's just try running the
create-destroy test in an interruptible loop for 5s.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-26 10:29:22 +01:00
Chris Wilson
3e766b8255 igt/gem_concurrent_blit: Only read back a few GTT values
Due to the nature of the test, we can be reasonably sure that it is
either all copied or not. So we can sacrificing testing the entire
buffer for the expected value in order to speed up the test by only
testing along the diagonal.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84354
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-26 07:58:11 +01:00
Daniel Vetter
3205a9167f tests/kms_psr_sink_crc: Use options
Env variables are a bit more annoying since much harder to discover.
With options you can just see what they do with --help.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-24 14:36:57 +02:00
Chris Wilson
4b81e9ca7d igt/gem_reloc_vs_gpu: Fix reloc.presumed_offset value
Since the last patched value does not match the presumed relocation
value we submit to the kernel, it occasionally makes mistakes. Also note
that the libdrm interface makes the same presumptive mistake, and would
easily be broken by a threaded environment.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77793
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-19 16:44:13 +01:00
Daniel Vetter
c3eca6f7d3 tests/drm_import_export: Add subtest for prime
Cc: Rafal Sapala <rafal.a.sapala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-19 09:32:14 +02:00
Daniel Vetter
a018d60f63 tests: Add drm_import_export
Multithreaded test to validate the (lack of) locking in the flink/open
code in libdrm-intel. Based on a testcase from Rafel Sapala.

Cc: Rafal Sapala <rafal.a.sapala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-18 17:36:58 +02:00
Ville Syrjälä
25c55d3fc2 tests/kms_cursor_crc: Add basic non-square cursor testing
To minimally verify that non-square cursors work on the platforms where
they're supported perform the tests first with WxH cursor and then
repeat with WxH/3 cursor.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-09-18 12:56:56 +03:00
Ville Syrjälä
7b76754e0e lib: Add igt_plane_set_size()
Allow tests to specify the plane size instead of assuming that the
entire FB will be scanned out.

To keep the current tests working without having to sprinkle
igt_plane_set_size() calls all over the place, make
igt_plane_set_fb() reset the plane size to the FB size.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-09-18 12:56:56 +03:00
Ville Syrjälä
b4fe481d4f tools: Remove punit and nc reg read/write tools
intel_iosf_sb_{read,write} provide the same functionality.

intel_dpio_{read,write} are still left in place since they use a
ifferent opcode to do the register access. Need to verify if
both opcodes work.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-09-18 12:56:55 +03:00
Ville Syrjälä
b23329f086 toos/intel_iosf_sb: Add symbolic unit names
Add a bunc of symbolic sideband unit names so that you don't have to go
trawling through the sideband HAS every time you want to poke at
something with the tool. You can still specify the port manually though
if you know them by heart already.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-09-18 12:56:55 +03:00
Ville Syrjälä
b39eb28c25 tools: Allow iosf-sb utils to work on chv
Unlike the kernel IS_VALLEYVIEW() doesn't cover chv in igt. Add the
appropriate IS_CHERRYVIEW() checks to the various sideband poking tools.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-09-18 12:56:55 +03:00
Rodrigo Vivi
50534460dd tools/intel_reg_dumper: Shows fences and rp debug regs on BDW+.
v2: a more generic fix to cover current and future platforms (Damien).

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-17 14:23:10 -04:00
Chris Wilson
1244fc6b9b igt/pm_rps: Fix STORE_DWORD for pre-gen8
gen8 actually changed the command layout, not just extended the
relocation value. Oh well.

References: https://bugs.freedesktop.org/show_bug.cgi?id=83915
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-16 08:19:08 +01:00
Daniel Vetter
137877f16b NEWS: New heading for 1.9
Should be done post-release.

Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-12 15:29:34 +02:00
Chris Wilson
4779655c6f lib: Try harder to drop-caches
If at first we don't succeed, try again. (For as long as the errno says
to at least!)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12 11:12:21 +01:00
Chris Wilson
f81d8eba4f igt/kms_render: Iterate only through the formats
When testing each format, iterate through the formats and not randomly
through the modes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83788
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12 09:12:42 +01:00
Chris Wilson
855dc6284d igt/gem_userptr_blits: GTT mmaping a userptr requires llc
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83790
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12 09:10:01 +01:00
Chris Wilson
3a1751ef34 igt/pm_rps: Fix the batch count for emitting the flush
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81858#c2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12 06:47:20 +01:00
Rodrigo Vivi
62f4d56676 tests: Kill pm_psr
kms_psr_sink_crc check psr activity, residency and exit for screen updates.
So this test is useless.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:13 -04:00
Rodrigo Vivi
d190a1f966 tests/kms_psr_sink_crc: Wait 2 vblanks before grabing the new crc.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
1447d83e8e tests/kms_psr_sink_crc: Fix blt submission
Putting back a missing dword.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
25aa69d0a0 tests/kms_psr_sink_crc: Check color ref CRC
Black screen is forbidden on this test. So let's fail if sink crc shows
it is back.

Also there are many cases where we know for shure it should be all green,
so let's check for them.

Instead of checking colors we could print with sw using cairo and check if we
have identical crc like cursor testcases. However with PSR the chance of artifacts
is low and chance of getting blank screen or unchanged screen is high. So even drawing
on sw and comparing both CRCs we can have the same result. However the risk is that
screen never changed. So the safest way is to compare if screen changed and check
the green color when we know it should be green or not green.

v2: Hardcoded green was simply wrong because green CRC can change depending
    on display.Split R, G and B on CRC and bitewise them with mask to verify
    it is green.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
d4e6a51970 tests/kms_psr_sink_crc: Fix all testcases.
In order to get all test cases fixed and the matrix planes-operations working
it was needed to use the common new igt kms functions for all cases.
Previously only sprite testcase was using it.

Fixed the fb colors in a way to make tests more clear and be impossible to see
black screen during the tests.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
99efdc0cdb tests/kms_psr_sink_crc: Start splitting tests in test_planes and operations.
This will allow us to test input/write oprations on any kind of plane.

At this point PLANE_ONOF is just the new name of TEST_SPRITE and
PLANE_MOVE is the one for TEST_CURSOR_MOVE. They will be extended and fixed
on the following patche(s).

v2: fix conflict after changing previous patch

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
52b0e78a94 tests/kms_psr_sink_crc: Cleaning up tests a bit
This is needed to be able to split tests in a matrix that tests different
input/write methods and operations for different type of planes.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
fb004a6b02 tests/kms_psr_sink_crc: Removing context tests.
This tests are unecessary. Mainly now with the software tracking for PSR.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
1ab044518a tests/kms_psr_sink_crc: Adding test debug options
Just to make life easier and be eable to easily test with
PSR disabled to know exactly what to expect when running it
for real

v3: Use igt_debug helpers and add env option for running with psr disabled
on this test without have to recompile like v1 or changing igt infrastructure like v2.
I tried to add --disable-psr or local --dry-run but than it fails to print subtests
so this was the safest way.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
e90847f57a tests/kms_psr_sink_crc: Fix edp_psr debugfs interface
Tests were broken on platforms that doesn't have psr or on new kernel that contains new interface.
A lot more need to be done to get these tests really useful, but for now lets avoid it breaking
tests framework.

v2: Doesn't duplicate kernel's HAS_PSR. skip based on debugfs output.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:42:12 -04:00
Rodrigo Vivi
d92fbc2313 tests/kms_sink_crc_basic: Wait 2 vblanks before grabing the new crc.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:41:52 -04:00
Rodrigo Vivi
1d7b062621 tests/kms_sink_crc_basic: Simplify test by using igt_kms functions
v2: sink CRC R, G and B might change depending on display. So let's split the
colors and bitwise them.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-11 11:37:21 -04:00
Chris Wilson
107151ce9f igt/gem_ppgtt: Create secondary contexts and mm
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09 16:28:36 +01:00
Chris Wilson
961578f471 test: Exercise full ppgtt switching between multiple fd
Load up both rings with lots of fighting between multiple contexts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09 14:52:35 +01:00