platform/upstream/intel-gpu-tools.git
10 years agointel_dump_decode: Actually parse the -d option
Damien Lespiau [Fri, 22 Nov 2013 17:24:52 +0000 (17:24 +0000)]
intel_dump_decode: Actually parse the -d option

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_fbc_crc: Add a CRC based FBC test
Ville Syrjälä [Sat, 9 Nov 2013 18:58:27 +0000 (20:58 +0200)]
kms_fbc_crc: Add a CRC based FBC test

kms_fbc_crc will perform various write operations to the scanout buffer
whilc FBC is enabled. CRC checks will be used to make sure the
modifcations to scanout buffer are detected.

The operations include:
 - page flip
 - GTT mmap
 - CPU mmap
 - blit
 - rendercopy
 - context switch + rendercopy
 - combination of a page flip and each operation listed above

v2: Use gem_sw_finish instead of drmModeDirtyFB after CPU access
v3: Drop pwrite tests, call gem_bo_busy() after rendering, drop
    set_domain() calls after mmap access, wait for 2 vblanks

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib: Add gem_bo_busy
Ville Syrjälä [Mon, 25 Nov 2013 15:31:13 +0000 (17:31 +0200)]
lib: Add gem_bo_busy

Move gem_bo_busy() from gem_wait_render_timeout.c to lib.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib: Add gem_sw_finish()
Ville Syrjälä [Fri, 22 Nov 2013 20:33:21 +0000 (22:33 +0200)]
lib: Add gem_sw_finish()

Wrap DRM_IOCTL_I915_GEM_SW_FINISH into gem_sw_finish()

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agorendercopy: Pass context to rendercopy functions
Ville Syrjälä [Thu, 21 Nov 2013 17:05:17 +0000 (19:05 +0200)]
rendercopy: Pass context to rendercopy functions

rendercopy does the batch buffer flush internally, so if we want
to use it with multiple contexts, we need to pass the context
in from caller.

v2: Modify rendercopy_gen8 as well

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Fix crc readout after a subtest failure
Ville Syrjälä [Fri, 22 Nov 2013 21:46:32 +0000 (23:46 +0200)]
kms_cursor_crc: Fix crc readout after a subtest failure

If a subtest fails, it'll leave the pipe CRC file open, which will
prevent subsequent subtests from opening the file. Make sure the file
is cloesed before trying to open it again.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib: Fix pipe_crc->ctl_fd assert
Ville Syrjälä [Thu, 21 Nov 2013 17:48:51 +0000 (19:48 +0200)]
lib: Fix pipe_crc->ctl_fd assert

Use the correct fd in the assert().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests: Document exec naming convention for execbuf related tests
Daniel Vetter [Wed, 27 Nov 2013 10:31:12 +0000 (11:31 +0100)]
tests: Document exec naming convention for execbuf related tests

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Document per-ring naming conventions
Daniel Vetter [Wed, 27 Nov 2013 10:14:19 +0000 (11:14 +0100)]
tests: Document per-ring naming conventions

Inspired by the recent pile of tests for the CS, which doesn't split
up the tests into per-ring subtests.

Cc: bradley.d.volkin@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: add "resuming" state
Paulo Zanoni [Tue, 26 Nov 2013 13:32:33 +0000 (11:32 -0200)]
tests/pm_pc8: add "resuming" state

This one was missing. For some reason we never really detected it on
our test suite. I checked the Kernel source and now we should be fine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: try to reuse FBs when possible
Paulo Zanoni [Thu, 21 Nov 2013 20:19:07 +0000 (18:19 -0200)]
tests/pm_pc8: try to reuse FBs when possible

Instead of creating a new FB every time we need one, create a cache of
FBs and reuse whenever possible. That means we'll create at most two
FBs, and reuse them hundreds and hundreds of times.

The kmstest_paint_test_pattern function takes about 1-2 seconds to
run, and we'll avoid it whenever we reuse the FB.

This makes the time taken to run the modeset-lpsp-stress subtest go
from 2:29 to 1:29.

A full "time ./pm_pc8 --quick" goes from 8:14 to 6:27.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: try harder to reach PC8+ residencies
Paulo Zanoni [Thu, 21 Nov 2013 19:32:42 +0000 (17:32 -0200)]
tests/pm_pc8: try harder to reach PC8+ residencies

If we want to actually reach PC8+ states, we need to properly
configure all the devices on the system to allow this. This function
will try to setup the things we know we need, but won't scream in case
anything fails: we don't know which devices are present on your
machine, so we can't really expect anything, just try to help with the
more common problems.

Another reason for this commit is that I got tired of having to
readjust the runtime PM policies every time I reboot my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: rename some subtests
Paulo Zanoni [Thu, 21 Nov 2013 17:09:58 +0000 (15:09 -0200)]
tests/pm_pc8: rename some subtests

Due to copy/paste error, we had 3 subtests called gem-execbuf-stress.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/gem_reset_stats: check non root access to reset_stats
Mika Kuoppala [Wed, 20 Nov 2013 14:58:17 +0000 (16:58 +0200)]
tests/gem_reset_stats: check non root access to reset_stats

Getting global reset count needs to be tested with root and
non root access.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: stop rings after injecting hang
Mika Kuoppala [Wed, 20 Nov 2013 14:58:16 +0000 (16:58 +0200)]
tests/gem_reset_stats: stop rings after injecting hang

To make driver report a simulated hang in dmesg.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: add support for BDW+
Mika Kuoppala [Wed, 20 Nov 2013 14:58:15 +0000 (16:58 +0200)]
tests/gem_reset_stats: add support for BDW+

For BDW+, there BATCH_BUFFER_START is 3 * 32bits in length and
length needs to be encoded into the opcode.

Suggested-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: More macros!
Daniel Vetter [Wed, 20 Nov 2013 15:07:30 +0000 (16:07 +0100)]
tests/gem_reset_stats: More macros!

Instead of freaking out about negating the skip condition and punting
I could have remembered that I've solved this already ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotools/reg_dumper: Add FW_BLC regs
Daniel Vetter [Wed, 20 Nov 2013 09:58:55 +0000 (10:58 +0100)]
tools/reg_dumper: Add FW_BLC regs

Debugging watermark issues on gen2/3 without them is hard ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: Use macros a bit more
Daniel Vetter [Sun, 17 Nov 2013 16:29:10 +0000 (17:29 +0100)]
tests/gem_reset_stats: Use macros a bit more

Just demonstration really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agogitignore: Ignore gem_reset_stats
Damien Lespiau [Fri, 15 Nov 2013 07:03:33 +0000 (07:03 +0000)]
gitignore: Ignore gem_reset_stats

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agotests: More bdw fallout
Daniel Vetter [Thu, 14 Nov 2013 23:10:52 +0000 (00:10 +0100)]
tests: More bdw fallout

This time misplaced parens.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: More bdw fallout
Daniel Vetter [Thu, 14 Nov 2013 22:15:37 +0000 (23:15 +0100)]
tests: More bdw fallout

10 years agotests/pm_pc8: add --quick option
Paulo Zanoni [Thu, 14 Nov 2013 16:53:15 +0000 (14:53 -0200)]
tests/pm_pc8: add --quick option

Not meant to be used on the QA cycles, but by developers who just want
to quickly check things while doing development. Reduces the total
time from 27 minutes to 6 minutes on my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: add some more stress tests
Paulo Zanoni [Thu, 14 Nov 2013 15:59:49 +0000 (13:59 -0200)]
tests/pm_pc8: add some more stress tests

I was suspecting some problems just happen if we have a bigger wait
than the current ones we have, so add a new WAIT_EXTRA flag just to
see if the problems really happen. Also, add support for the wait
flags on the gem stress tests, and use them.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: remove compare_registers subtest
Paulo Zanoni [Thu, 14 Nov 2013 15:50:06 +0000 (13:50 -0200)]
tests/pm_pc8: remove compare_registers subtest

It's not executed by default, and it's completely relying on Haswell
registers and on internal knowledge of how the Kernel is supposed to
work. Since we plan to test generic runtime PM on all supported
platforms, maintaining this test so it works on all those platforms
will be a pain. We already have some ideas on how to verify registers
that must stay at specific values from inside the Kernel, so let's
kill this test and wait until the proper Kernel code gets merged.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: rename some variables
Paulo Zanoni [Thu, 14 Nov 2013 15:40:52 +0000 (13:40 -0200)]
tests/pm_pc8: rename some variables

Since we're not only testing PC8 anymore, we're resting "PM", rename
some variables from something_pc8 to something_suspend, just to make
it not-so-confusing.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: fix debugfs-forcewake-user for PC8-only cases
Paulo Zanoni [Thu, 14 Nov 2013 15:35:43 +0000 (13:35 -0200)]
tests/pm_pc8: fix debugfs-forcewake-user for PC8-only cases

We don't wake up from forcewake when we only have PC8, but not runtime
PM, so make the test pass.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: check for PC8 status, not residency in most cases
Paulo Zanoni [Tue, 12 Nov 2013 19:04:50 +0000 (17:04 -0200)]
tests/pm_pc8: check for PC8 status, not residency in most cases

If you really want to reach the PC8+ states and consequently get PC8+
residency, you need to properly configure all the devices on your
machine to allow PC8+, not just graphics. The current code for PC8
checks for PC8+ residency everywhere, so if you have a machine that's
not properly configured you'll fail every test. OTOH, even if your
machine can't reach the PC8+ states, it will still try to enable and
disable PC8, so we can try to test the feature even if we're never
really reaching the PC8+ states. Also, if your machine does allow PC8+
residencies, but some other driver/program decides to keep the machine
busy while you're running the test suite, you'll also get failures
which you shouldn't be getting.

Based on the arguments above, I'm changing most of the subtests to
only check for the PC8 status reported by sysfs (enabled/disabled),
not check real PC8+ residency. I also added two tests that should
check for PC8+ residency, so we will stil be able to diagnose badly
configured machines.

As a bonus, we won't sleep for full 5 seconds every time we expect PC8
to be disabled: we'll just read i915_pc8_status, which quickly gives
the result we're expecting. Considering how many modeset stress
subtests we have in the program, we'll save a *lot* of time with this
change.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: add support for runtime PM
Paulo Zanoni [Tue, 12 Nov 2013 15:24:38 +0000 (13:24 -0200)]
tests/pm_pc8: add support for runtime PM

We try to detect if we have runtime PM or if we just have PC8. In case
there's runtime PM, the functions that wait will wait for the runtime
PM status reported by the sysfs file instead of waiting for PC8
residencies to move.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/gem_cs_prefetch: Fix bdw damage
Daniel Vetter [Thu, 14 Nov 2013 14:50:07 +0000 (15:50 +0100)]
tests/gem_cs_prefetch: Fix bdw damage

v2: Fix more.

Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: adjust oom_score
Daniel Vetter [Mon, 11 Nov 2013 22:04:11 +0000 (23:04 +0100)]
lib: adjust oom_score

This way the igt test will always be killed first (hopefully),
preventing mayhem when one of the memory thrashing tests treatens to
take down the entire system.

To avoid any burden on test writers we adjust the oom score on
drm_open, any of the fork helpers and subtest init. That should cover
everything.

v2: Fix it up.

Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Make testing requirements official
Daniel Vetter [Thu, 14 Nov 2013 10:08:13 +0000 (11:08 +0100)]
NEWS: Make testing requirements official

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: Fix invalid pointer-to-integer casting
Chris Wilson [Thu, 14 Nov 2013 09:47:47 +0000 (09:47 +0000)]
tests/pm_pc8: Fix invalid pointer-to-integer casting

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71592
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agogem_cs_prefetch: more gen8 integration fallout
Ben Widawsky [Thu, 14 Nov 2013 02:23:06 +0000 (18:23 -0800)]
gem_cs_prefetch: more gen8 integration fallout

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_evict_*: Fix batch lengths, broken on gen8 integration
Ben Widawsky [Wed, 13 Nov 2013 21:28:17 +0000 (13:28 -0800)]
gem_evict_*: Fix batch lengths, broken on gen8 integration

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agotests: add gem_reset_stats
Mika Kuoppala [Tue, 12 Nov 2013 17:58:16 +0000 (19:58 +0200)]
tests: add gem_reset_stats

v2: check the ioctl pad and flag parameters

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Android.mk updates!
Daniel Vetter [Tue, 12 Nov 2013 11:18:33 +0000 (12:18 +0100)]
NEWS: Android.mk updates!

10 years agobuild: New Android makefiles
Oscar Mateo [Tue, 12 Nov 2013 11:50:45 +0000 (11:50 +0000)]
build: New Android makefiles

These form the basis of the new Android build system.

v2: As suggested by Daniel Vetter, modify compilation flags to
not error on return-type and not warn on sign-compare.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib/igt_display: workaround a name conflict in Android
Oscar Mateo [Tue, 12 Nov 2013 11:50:44 +0000 (11:50 +0000)]
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>
10 years agolib/drmtest: Get the correct basename() under Android
Oscar Mateo [Tue, 12 Nov 2013 11:50:43 +0000 (11:50 +0000)]
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>
10 years agobuild: Fix assorted compilation warnings
Oscar Mateo [Tue, 12 Nov 2013 11:50:42 +0000 (11:50 +0000)]
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>
10 years agotests/gem_vmap_blits: Finish extracting gem_read
Oscar Mateo [Tue, 12 Nov 2013 11:50:41 +0000 (11:50 +0000)]
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>
10 years agotests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid)
Oscar Mateo [Tue, 12 Nov 2013 11:50:40 +0000 (11:50 +0000)]
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>
10 years agorendercopy: Remove rendercopy.c
Oscar Mateo [Tue, 12 Nov 2013 11:50:39 +0000 (11:50 +0000)]
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>
10 years agolib: Move kms stuff from drmtest.c over to igt_kms.c
Oscar Mateo [Tue, 12 Nov 2013 11:50:38 +0000 (11:50 +0000)]
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>
10 years agobuild: Move logic to tests/Makefile.am and away from Makefile.sources
Oscar Mateo [Tue, 12 Nov 2013 11:50:37 +0000 (11:50 +0000)]
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>
10 years agobuild: Fix missing "\" in tests/Makefile.sources
Oscar Mateo [Tue, 12 Nov 2013 11:50:36 +0000 (11:50 +0000)]
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>
10 years agobuild: list all test/tool/lib source files in their own Makefile.sources
Oscar Mateo [Tue, 12 Nov 2013 11:50:35 +0000 (11:50 +0000)]
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>
10 years agogitignore: Ignore the newly introduced pm_psr
Damien Lespiau [Mon, 11 Nov 2013 22:38:36 +0000 (22:38 +0000)]
gitignore: Ignore the newly introduced pm_psr

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agogem_storedw_batches_loop: Fix for real this time
Ben Widawsky [Mon, 11 Nov 2013 21:21:58 +0000 (13:21 -0800)]
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>
10 years agotests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
Oscar Mateo [Mon, 11 Nov 2013 15:36:55 +0000 (15:36 +0000)]
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>
10 years agogem_linear_blits: Fix blit command length
Ben Widawsky [Mon, 11 Nov 2013 17:44:13 +0000 (09:44 -0800)]
gem_linear_blits: Fix blit command length

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agotests/pm_pc8: reorganize main function
Paulo Zanoni [Fri, 8 Nov 2013 21:33:08 +0000 (19:33 -0200)]
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>
10 years agotests/pm_pc8: add some GEM tests
Paulo Zanoni [Fri, 8 Nov 2013 21:19:35 +0000 (19:19 -0200)]
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>
10 years agotests/pm_pc8: remove "batch" and "stress-test" subtests
Paulo Zanoni [Fri, 8 Nov 2013 21:03:24 +0000 (19:03 -0200)]
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>
10 years agotests/pm_pc8: add debugfs/sysfs tests
Paulo Zanoni [Fri, 8 Nov 2013 20:29:57 +0000 (18:29 -0200)]
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>
10 years agotests/pm_pc8: add modeset-lpsp-stress
Paulo Zanoni [Fri, 8 Nov 2013 19:09:43 +0000 (17:09 -0200)]
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>
10 years agotests/pm_pc8: extract i2c_subtest_check_environment
Paulo Zanoni [Fri, 8 Nov 2013 19:07:59 +0000 (17:07 -0200)]
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>
10 years agotests/pm_pc8: return void on test_i2c
Paulo Zanoni [Fri, 8 Nov 2013 19:05:00 +0000 (17:05 -0200)]
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>
10 years agotests/pm_pc8: move teardown_environment next to setup_environment
Paulo Zanoni [Fri, 8 Nov 2013 19:00:40 +0000 (17:00 -0200)]
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>
10 years agogem_cpu_reloc: Fixed botched BLIT conversion
Ben Widawsky [Fri, 8 Nov 2013 07:03:04 +0000 (23:03 -0800)]
gem_cpu_reloc: Fixed botched BLIT conversion

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_evict_alignment: Skip on GEN8 for now
Ben Widawsky [Fri, 8 Nov 2013 07:05:01 +0000 (23:05 -0800)]
gem_evict_alignment: Skip on GEN8 for now

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_evict_everything: Fix broken blit generalization
Ben Widawsky [Fri, 8 Nov 2013 06:59:25 +0000 (22:59 -0800)]
gem_evict_everything: Fix broken blit generalization

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoRevert "tests/gem_ctx_bad_exec: Check the errno, too"
Daniel Vetter [Fri, 8 Nov 2013 06:37:57 +0000 (07:37 +0100)]
Revert "tests/gem_ctx_bad_exec: Check the errno, too"

This reverts commit 4a6a59f314f61e1e4156bb13a65efabee31a76fc.

10 years agogem_storedw_batches_loop: Update for gen8
Ben Widawsky [Fri, 8 Nov 2013 05:00:55 +0000 (21:00 -0800)]
gem_storedw_batches_loop: Update for gen8

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agotests/gem_overflow_reloc: Rework subtest enumeration
Daniel Vetter [Thu, 7 Nov 2013 12:54:01 +0000 (13:54 +0100)]
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>
10 years agotests/gem_reloc_overflow: Polish after Rafael's patch
Daniel Vetter [Thu, 7 Nov 2013 12:43:43 +0000 (13:43 +0100)]
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>
10 years agotests/gem_reloc_overflow: Add gen8+ specifc tests
Rafael Barbalho [Wed, 6 Nov 2013 18:12:12 +0000 (18:12 +0000)]
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>
10 years agoNEWS: Remove spurious -
Daniel Vetter [Wed, 6 Nov 2013 17:55:20 +0000 (18:55 +0100)]
NEWS: Remove spurious -

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Restore the 1.4 release info
Ben Widawsky [Wed, 6 Nov 2013 17:49:32 +0000 (09:49 -0800)]
NEWS: Restore the 1.4 release info

I suck...

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoNEWS: Broadwell will be in 1.6, not 1.5
Ben Widawsky [Wed, 6 Nov 2013 17:48:17 +0000 (09:48 -0800)]
NEWS: Broadwell will be in 1.6, not 1.5

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoNEWS: Broadwell
Ben Widawsky [Wed, 6 Nov 2013 17:36:27 +0000 (09:36 -0800)]
NEWS: Broadwell

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agolist-workarounds/bdw: Add Broadwell to the list of valid platorms
Damien Lespiau [Fri, 31 May 2013 14:31:33 +0000 (15:31 +0100)]
list-workarounds/bdw: Add Broadwell to the list of valid platorms

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agoquick_dump/bdw: support Broadwell in device auto-detection
Mengdong Lin [Mon, 26 Aug 2013 03:07:22 +0000 (23:07 -0400)]
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>
10 years agoquick_dump/bdw: dump audio debug registers for Haswell and Broadwell
Mengdong Lin [Fri, 16 Aug 2013 03:58:21 +0000 (23:58 -0400)]
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>
10 years agoquick_dump/bdw: dump audio configuration registers for Haswell and Broadwell
Mengdong Lin [Fri, 16 Aug 2013 03:58:05 +0000 (23:58 -0400)]
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>
10 years agoquick_dump/bdw: Just basic stuff for now
Ben Widawsky [Tue, 19 Feb 2013 00:00:55 +0000 (16:00 -0800)]
quick_dump/bdw: Just basic stuff for now

Just the interrupt registers for now.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agointel_audio_dump/bdw: dump audio M CTS readback register
Mengdong Lin [Tue, 13 Aug 2013 04:22:33 +0000 (00:22 -0400)]
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>
10 years agointel_audio_dump/bdw: dump audio DP and DIP FIFO debug status
Mengdong Lin [Tue, 13 Aug 2013 04:22:24 +0000 (00:22 -0400)]
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>
10 years agointel_audio_dump/bdw: dump audio chicken bit register
Mengdong Lin [Tue, 13 Aug 2013 04:22:14 +0000 (00:22 -0400)]
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>
10 years agointel_audio_dump/bdw: dump debug registers for audio immediate commands
Mengdong Lin [Tue, 13 Aug 2013 04:21:57 +0000 (00:21 -0400)]
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>
10 years agointel_audio_dump/bdw: add support for Broadwell
Mengdong Lin [Wed, 17 Jul 2013 17:29:17 +0000 (13:29 -0400)]
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>
10 years agorendercopy/bdw: Add AUB annotations for states
Damien Lespiau [Wed, 27 Feb 2013 14:51:48 +0000 (14:51 +0000)]
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>
10 years agorendercopy/bdw: Fix the original implementation
Damien Lespiau [Wed, 27 Feb 2013 14:51:34 +0000 (14:51 +0000)]
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>
10 years agorendercopy/bdw: Add gen8_render.h to the file list
Damien Lespiau [Wed, 27 Feb 2013 14:51:33 +0000 (14:51 +0000)]
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>
10 years agorendercopy/bdw: Initial gen8 rendercopy
Jesse Barnes [Wed, 27 Feb 2013 14:51:32 +0000 (14:51 +0000)]
rendercopy/bdw: Initial gen8 rendercopy

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
10 years agoassembler/bdw: Add the DATA_PORT_CACHE1 shared function for Gen8+
Zhao Yakui [Tue, 9 Apr 2013 01:59:16 +0000 (09:59 +0800)]
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>
10 years agoassembler/bdw: Add the support of align1 register-indirect addressing mode on Gen8
Zhao Yakui [Tue, 9 Apr 2013 01:59:15 +0000 (09:59 +0800)]
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>
10 years agoassembler/bdw: SEND instruction
Xiang, Haihao [Fri, 22 Feb 2013 03:14:13 +0000 (11:14 +0800)]
assembler/bdw: SEND instruction

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Small cleanup
Ben Widawsky [Fri, 16 Aug 2013 22:24:25 +0000 (15:24 -0700)]
assembler/bdw: Small cleanup

This was originally part of:

commit 62298329350b965e4bbfc558e5a4b1b3646742ea
Author: Xiang, Haihao <haihao.xiang@intel.com>
Date:   Wed Aug 14 14:21:16 2013 -0700

    assembler: error for the wrong syntax of SEND instruction on GEN6+

I merged that patch separately, but this tiny hunk was leftover. In
order to not muck in changing too much history, I am leaving this as a
discrete patch, but with the changed commit message

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Check & Refinement Engine message
Xiang, Haihao [Fri, 22 Feb 2013 03:14:11 +0000 (11:14 +0800)]
assembler/bdw: Check & Refinement Engine message

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Video Motion Estimation(VME) message
Xiang, Haihao [Fri, 22 Feb 2013 03:14:10 +0000 (11:14 +0800)]
assembler/bdw: Video Motion Estimation(VME) message

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Thread Spawn message
Xiang, Haihao [Fri, 22 Feb 2013 03:14:09 +0000 (11:14 +0800)]
assembler/bdw: Thread Spawn message

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Data port message
Xiang, Haihao [Fri, 22 Feb 2013 03:14:08 +0000 (11:14 +0800)]
assembler/bdw: Data port message

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Set thread switch for multiple branch instructions
Xiang, Haihao [Fri, 22 Feb 2013 03:14:07 +0000 (11:14 +0800)]
assembler/bdw: Set thread switch for multiple branch instructions

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Set jip/uip offsets used by flow control instructions
Xiang, Haihao [Fri, 22 Feb 2013 03:14:06 +0000 (11:14 +0800)]
assembler/bdw: Set jip/uip offsets used by flow control instructions

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Disable mask control for advanced mode
Xiang, Haihao [Fri, 22 Feb 2013 03:14:05 +0000 (11:14 +0800)]
assembler/bdw: Disable mask control for advanced mode

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Set math function
Xiang, Haihao [Fri, 22 Feb 2013 03:14:04 +0000 (11:14 +0800)]
assembler/bdw: Set math function

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Use gen8_set_exec_size() to set the execution size
Damien Lespiau [Tue, 5 Feb 2013 11:34:10 +0000 (11:34 +0000)]
assembler/bdw: Use gen8_set_exec_size() to set the execution size

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoassembler/bdw: Preliminary gen8 send & msgtarget support
Damien Lespiau [Thu, 31 Jan 2013 18:25:45 +0000 (18:25 +0000)]
assembler/bdw: Preliminary gen8 send & msgtarget support

Still some work needed there, but enough for rendercopy.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>