2434 Commits

Author SHA1 Message Date
Oscar Mateo
25be105d7f lib/igt_display: workaround a name conflict in Android
PLANE_A/PLANE_B are used by libdrm's i915_drm.h in Android.

v2: Changes suggested by Daniel Vetter and Damien Lespiau:
- Pimp up comment with a FIXME.
- Reword commit message.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:16:23 +01:00
Oscar Mateo
235ff9cf34 lib/drmtest: Get the correct basename() under Android
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:16:03 +01:00
Oscar Mateo
5032e7bbdd build: Fix assorted compilation warnings
As these files are compiled for every test, the warnings cluttered
the Android build completely.

v2: As suggested by Daniel Vetter, drop some of the fixes and fix
the compilation flags instead.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:05:55 +01:00
Oscar Mateo
dce0d99a91 tests/gem_vmap_blits: Finish extracting gem_read
It seems something escaped this commit:

commit bd5cf9a07d17ce91dfaa3aa12d3f2c93815f0489
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Jan 10 15:37:53 2012 +0100

    lib/drmtest: extract gem_read

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:05:27 +01:00
Oscar Mateo
7076ea1bd6 tests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid)
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:05:15 +01:00
Oscar Mateo
1cd6913608 rendercopy: Remove rendercopy.c
Move scratch_buf_write_to_png() to its only user, gem_render_copy.c.
This makes the cairo dependencies easier to handle from the Android
perspective, but if there is a good reason why this file exists I can
try to handle it differently.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:04:45 +01:00
Oscar Mateo
37f26d17b1 lib: Move kms stuff from drmtest.c over to igt_kms.c
This makes cairo dependencies easier to handle. Otherwise, we
would have to litter drmtest all over with "#ifndef ANDROID"

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
[danvet: Add missing _GNU_SOURCE to igt_kms.c and missing include to
intel_sprite_on.c]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:04:12 +01:00
Oscar Mateo
4c7d5a52a7 build: Move logic to tests/Makefile.am and away from Makefile.sources
Makefile.sources is just a listing with all the sources, and the logic
to use these sources goes into either Makefile.am (automake) or
Android.mk (make).

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:01:09 +01:00
Oscar Mateo
d80c6bdedb build: Fix missing "\" in tests/Makefile.sources
Noticed by Damien Lespiau.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:00:52 +01:00
Oscar Mateo
ea11d103e0 build: list all test/tool/lib source files in their own Makefile.sources
In this way, all source files are listed in Makefile.sources and included
from Makefile.am, thus enabling the reuse from Android makefiles.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:00:36 +01:00
Damien Lespiau
c50dd7c149 gitignore: Ignore the newly introduced pm_psr
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-11 22:38:36 +00:00
Ben Widawsky
97e48cd619 gem_storedw_batches_loop: Fix for real this time
Last patch to fix the breakage when adding gen8 had bugs in the reloc
offset, and size field.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-11 13:33:04 -08:00
Oscar Mateo
4cc506f5ea tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
Some shells do not understand "&>". For instance, my Ubuntu 12.04
machine has /bin/sh pointing to dash, which makes a mess out of
"&>" (to the point that the helper processes cannot be killed).

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-11 18:25:37 +00:00
Ben Widawsky
b76a411c86 gem_linear_blits: Fix blit command length
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-11 09:44:13 -08:00
Paulo Zanoni
0d902cad5f tests/pm_pc8: reorganize main function
Split the tests into categories. There are too many tests, it's
getting harder to locate the ones we need.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 19:38:03 -02:00
Paulo Zanoni
c527a29325 tests/pm_pc8: add some GEM tests
These are more complete tests than the previous test_batch() one. We
test CPU/GTT mmaps, pread/pwrite and batch buffers.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 19:38:03 -02:00
Paulo Zanoni
79670c54eb tests/pm_pc8: remove "batch" and "stress-test" subtests
They use a bad BLT command and don't check its result. The next patch
will add proper GEM tests that contain commands that work and code
that checks if the command is really working.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 19:38:03 -02:00
Paulo Zanoni
3775eae051 tests/pm_pc8: add debugfs/sysfs tests
They don't really exercise any particular special code path for PC8,
but the runtime D3 code will touch these code paths, so we'll need the
tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
0fbb834646 tests/pm_pc8: add modeset-lpsp-stress
It's the only one we were missing form the possible combinations.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
1bcae02e5c tests/pm_pc8: extract i2c_subtest_check_environment
Just to make it more organized and consistent with the other tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
2fd0eb53aa tests/pm_pc8: return void on test_i2c
And do the assertion in the code line that actually verifies the
condition we need. Makes it easier to debug failed tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
514efb507d tests/pm_pc8: move teardown_environment next to setup_environment
So I can add/remove/verify code more easily.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Ben Widawsky
ffc43fcbc0 gem_cpu_reloc: Fixed botched BLIT conversion
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Ben Widawsky
2c0fc4a2e4 gem_evict_alignment: Skip on GEN8 for now
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Ben Widawsky
7c41331364 gem_evict_everything: Fix broken blit generalization
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Daniel Vetter
1d9512f6ce Revert "tests/gem_ctx_bad_exec: Check the errno, too"
This reverts commit 4a6a59f314f61e1e4156bb13a65efabee31a76fc.
2013-11-08 07:37:57 +01:00
Ben Widawsky
26d237cdc2 gem_storedw_batches_loop: Update for gen8
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 21:00:55 -08:00
Daniel Vetter
5dbc263036 tests/gem_overflow_reloc: Rework subtest enumeration
Subtest names must be stable across all platforms for easier tracking.
Hence move the gen8+ check into the subtests, using igt_require. This
will auto-skip the tests on platforms where a given test doesn't apply.

Also move the assignment of the relocation_type var outside of the
fixture block. Fixtures aren't run when enumerating subtests (so that
subtests can be enumerated on any platform, even without an intel gpu).

So gcc has indeed been right with it's "potentially uninitialized" var
warning after all ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-07 13:54:01 +01:00
Daniel Vetter
4cf1d089eb tests/gem_reloc_overflow: Polish after Rafael's patch
- use void* for generic pointer.
- Fix const usage.
- Shut up gcc about uninitizialized var.
- Be paranoid about the moved tests and make double-sure that the
  batch would indeed work safe for the condition being tested.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-07 13:43:43 +01:00
Rafael Barbalho
c537c23efc tests/gem_reloc_overflow: Add gen8+ specifc tests
Broadwell introduces 64-bit relocation addresses which add extra
corner cases. The test was refactored slightly with some tests that
were in the source offset tests were moved to the more generic reloc
test area. The source offset tests are now gen aware and called twice to
test both cpu & gtt relocation paths. In addition 2 new gen8+ test
were added to the test:

* Relocation straddling page a page
* Insufficient space for a relocation at the end of the buffer.

Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>

Conflicts:
	tests/gem_reloc_overflow.c
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-07 13:41:38 +01:00
Daniel Vetter
5fab0b8aa7 NEWS: Remove spurious -
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-06 18:55:20 +01:00
Ben Widawsky
65cdba94bc NEWS: Restore the 1.4 release info
I suck...

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:49:32 -08:00
Ben Widawsky
a88cf4cbf1 NEWS: Broadwell will be in 1.6, not 1.5
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:48:17 -08:00
Ben Widawsky
02ee890068 NEWS: Broadwell
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Damien Lespiau
1c5e1d230b list-workarounds/bdw: Add Broadwell to the list of valid platorms
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
d566972336 quick_dump/bdw: support Broadwell in device auto-detection
This patch exposes is_broadwell() to python, to be used by device
auto-detection.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Mengdong Lin
ee4318931f quick_dump/bdw: dump audio debug registers for Haswell and Broadwell
A new file "audio_debug_haswell_plus.txt" is created to define audio
debug registers for Haswell and its successors like Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
0facfb2eb0 quick_dump/bdw: dump audio configuration registers for Haswell and Broadwell
A new file "audio_config_haswell_plus.txt" is created to define audio
configuration registers for Haswell and its successors like Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Ben Widawsky
4f1410d978 quick_dump/bdw: Just basic stuff for now
Just the interrupt registers for now.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Mengdong Lin
e35126d30c intel_audio_dump/bdw: dump audio M CTS readback register
This debug register provides test feedback of the audio M values (DP)
or CTS values (HDMI)

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
97e5cf6006 intel_audio_dump/bdw: dump audio DP and DIP FIFO debug status
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
f075c3c068 intel_audio_dump/bdw: dump audio chicken bit register
This patch dumps this debug register and parse the data for Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
8535720b4c intel_audio_dump/bdw: dump debug registers for audio immediate commands
This patch dumps debug registers to check audio immediate command, response
and status.

The audio driver will fall back into immediate command mode if normal
communication between controller and codec is dead.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
[Ben: Small printf changes to remove compiler warning]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Mengdong Lin
69cc00b072 intel_audio_dump/bdw: add support for Broadwell
This patch renames Haswell audio dump function and reuses it for Broadwell.

Since Haswell, audio registers are moved from the south display engine to the
north display engine. And the audio register layout is same for Haswell and its
successors like Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Damien Lespiau
c82872b019 rendercopy/bdw: Add AUB annotations for states
This will hopefully help debugging things.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Damien Lespiau
91e5897246 rendercopy/bdw: Fix the original implementation
For posterity, I've squashed these commits against Damien's request.

rendercopy/gen8: Fix the include guards

rendercopy/gen8: Update the 3DSTATE_MULTISAMPLE opcode

The opcode has changed in BDW.

rendercopy/gen8: Add the VF_TOPOLOGY state

The primitive type has moved out of the 3DPRIMITIVE to its own state,
VF_TOPOLOGY.

rendercopy/gen8: Fixup 3STATE_PS

Update the state to the latest BSpec, in particular the thread count was
using a wrong shift and we were missing kernel2 offset.

rendercopy/gen8: Update 3DSTATE_BASE_ADDRESS

This state has seen its fields moved around a bit, follow the BSpec.

rendercopy/gen8: Allocate 64 VUEs

The simulator screams at us if we try to allocate less than that.

rendercopy/gen8: Surface states have to be 64 bytes a aligned

rendercopy/gen8: Vertical/horizontal align 2 does not exist any more

So set them to 4. This should not matter with rendercopy (which is not
using compressed textures), but it makes the simulator moan.

rendercopy/gen8: Make sure the vertex buffer is 8 bytes aligned

rendercopy/gen8: Adjust 3DSTATE_VERTEX_BUFFERS for gen8

The address of the buffer is now on 48 bits. Also the size was computed
as offset + size where the field is really the size of the buffer
itself, not the end address.

rendercopy/gen8: Update the SF/SBE states for gen8

gen8 has a few changes around those states and a new ones RASTER and
SBE_SWIZ.

rendercopy/gen8: Add the PS_EXTRA and PS_BLEND states

rendercopy/gen8: Fix building with DEBUG_RENDERCOPY defined

The forward declaration was missing the final ';'. Let's move the whole
function at the top instead.

rendercopy/gen8: Update the PS and CONSTANT_PS states

rendercopy/gen8: Fix the red channel selection

Make it output red.

rendercopy/gen8: Update the write -1 shader

With the latest assembler changes from Haihao.

rendercopy/gen8: Remove blit.g8a

There is no diff between this file and blig.g7a. Remove it.

rendercopy/gen8: Fix the surface relocation offset

The surface base address is now at dwords 8/9 so the relocation has to
mirror the change.

rendercopy/gen8: Add the VF_INSTANCING state

Should work without, but doesn't hurt to add it.

rendercopy/gen8: Set the Attribule enable field in PS_EXTRA

When the SF is set up to output some attributes, the pixel shader also
have to be told there's attributes to care about.

rendercopy/gen8: Set the force bits to read URB offset/length

If we want to override the URB offset/length in the SBE state itself, we
need to set the force bits on (new in gen8)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Damien Lespiau
3f0714a860 rendercopy/bdw: Add gen8_render.h to the file list
So it gets distributed with make dist.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Jesse Barnes
3edfff16cd rendercopy/bdw: Initial gen8 rendercopy
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Zhao Yakui
66783e4c4f assembler/bdw: Add the DATA_PORT_CACHE1 shared function for Gen8+
This is required to send some messages to data port in GPU shader.
For example: media_block_write message.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Zhao Yakui
88e5f1fdf8 assembler/bdw: Add the support of align1 register-indirect addressing mode on Gen8
Otherwise it can't compile the following GPU shader that uses the
register-indirect addressing mode.
  >add.sat (16) r[a0.5,0]<1>:uw     r[a0.5,0]<16;16,1>:uw  0x0080:uw
  >add.sat (16) r[a0.5,32]<1>:uw    r[a0.5,32]<16;16,1>:uw 0x0080:uw

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00