3776 Commits

Author SHA1 Message Date
Ville Syrjälä
a8b85ea21b tools/intel_display_poller: Make pipe name alphabetic
Instead of raw numbers the user can now specify the pipe
as 'a',b'... or 'A','B'...

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:33:28 +03:00
Ville Syrjälä
01a2a4d85d tools/intel_display_poller: Try to fix pipe<->plane handling on gen2/3
Check the pipe assignment for each plane (excluding plane C since the
kernel doesn't use that one) and pick the first one that's assigned to
the target pipe.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:33:28 +03:00
Ville Syrjälä
ba139493a6 tools/intel_display_poller: Add CHV support
Add CHV support by adding a pipe_offset[] thingy (like we have in the
kernel) to deal with the wonky register offsets.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:33:28 +03:00
Ville Syrjälä
7d2f1d7d9e tools/intel_reg: Print the potential port names in the help text
v2: Repaint with Jani's favorite color

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:32:28 +03:00
Ville Syrjälä
fb8131545f tools/intel_reg: Set register stride to 1 for VGA registers
VGA registers are generally 8 bits long, so set the stride to 1 byte.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-09 22:41:45 +03:00
Mika Kuoppala
88fed9fbca tools/intel_reg: Use pci device from config on write
Use the pre configured pci device from config also
in write path.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Ander Conselvan de Oliveira
6eed1b5eb4 kms_addfb_basic: Require fb modifiers for unused field tests
The drm core doesn't check unused fields of ADDFB2 for pre-FB_MODIFIERS
userspace, so use igt_require_fb_modifiers(). Also, the size of the
ioctl changed with the addition of the modifiers, so it is necessary to
use the LOCAL_ version of it, otherwise some data may get truncated.

v2: Improve commit message. (Thomas)
    Remove one spurious change to use LOCAL_DRM_IOCTL_ADDFB2. (Thomas)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Daniele Ceraolo Spurio
2269997cff tests/gem_bad_reloc: use correct page table size
2 subparts of gem_bad_reloc check that the reloc address is below the
global gtt boundary. However, when executing from ppgtt the reloc
address can be greater than that and still be a valid address.

To be sure that we're using the right upper limit, select it based on
the ppgtt mode.

Cc: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
b04691b3e8 tests/gem_pwrite_snooped: disable const cast warning
Disable -Wcast-qual temporarily to allow memchr_inv to return non-const
data (similar to memchr), without causing a compiler warning.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
84cfa9e4d2 tests: remove gem_storedw_loop_* tests
These have been replaced by subtests in gem_storedw_loop.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-09-08 16:15:16 +01:00
Thomas Wood
1dcace3018 build: fix unused-result warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
f0381d1abe lib: various documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
de2470ea4f intel_reg: ensure "intel_reg help" always works
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
9ecb50e5c5 tools: install the register definition files
Install the register definition files and use them by default in
intel_reg.

v2: remove redundant path check

Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
af97918494 tools: remove quick_dump
Remove quick_dump as it has been replaced by the intel_reg tool and move
the register definition files to tools/registers.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
2142a15d49 tests/gem_storedw_loop: remove redundant ppgtt check
All tests require ppgtt, so checking for it later on has no effect.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
673aab8a0a tests/gem_storedw_loop: skip on gen6 bsd
MI_STORE_DATA is broken on gen6 bsd.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
b9d27f03c7 tools/null_state_gen: fix various compiler warnings
Add the debug and warning flags to cflags and fix the resulting issues.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
4ee6709e3b tests/tools: add --as-needed to linker flags
Add --as-needed to the linker flags to reduce the number of shared
library dependencies, since not all the tests and tools use all the
libraries required by the helper library (for example, many tests do not
use cairo). This helps portability of the binaries and also makes a
very small improvement to the execution speed and memory consumption.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
88cbb41ade lib/gpgpu_fill.c: fix file permissions
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-25 17:20:14 +01:00
Ander Conselvan de Oliveira
4c63f54de9 gem_storedw_loop: Skip test if device doesn't have requested ring
The VEBOX ring is not available in generations before Haswell, so make
tests that use it skip instead of fail in previous gens.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-25 17:20:14 +01:00
Tim Gore
d3d56bf2af tests/gem_ctx_exec.c: only hang the ring we are testing
In the reset-pin-leak test we were calling
igt_set_stop_rings(STOP_RING_DEFAULTS) which sets the
stop_rings bits for all gpu engines. But we only submit
work to the render engine. When TDR is enabled (as it is
in Android currently) only the render engine gets reset,
which clears the stop_rings bit for the render engine but
not for the other engines. This causes the test to fail on
the second iteration because stop_rings is not clear.

So just set the stop_rings bit for the engine we are going
to hang, namely the render engine.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-25 17:20:14 +01:00
Paulo Zanoni
71b85f9713 kms_frontbuffer_tracking: print the status when it's not what we expect
Printing the status on an unexpected failure is always the first thing
I do. So do this always.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:36:01 -03:00
Paulo Zanoni
a07d0a47be kms_frontbuffer_tracking: add slow_draw() subtest
It fails on my SKL machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:35:30 -03:00
Paulo Zanoni
229110442a kms_frontbuffer_tracking: wait for PSR to be HW Enabled & Active
Make sure PSR is fully there.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:34:56 -03:00
Paulo Zanoni
c1fe951b8a kms_frontbuffer_tracking: add options for setting the shared fb X/Y
I'm using this to debug some aspects of the GTT tracking.

While at it, do a small rename and fix the ASCII art.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:34:28 -03:00
Chris Wilson
5e68ad9f82 benchmarks/gem_exec_reloc: Allow profiling 0 relocs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-21 22:27:35 +01:00
Thomas Wood
05f5e16eaf lib: fix distcheck issues
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 14:13:16 +01:00
Thomas Wood
804e11f40d lib: add a single include header
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Thomas Wood
a11879a4ab assembler: remove built sources with make clean
Built sources are generated by "make all", so should be removed by "make
clean". This also ensures "distcleancheck" passes.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Mika Kuoppala
c37b235202 tests/drv_hangman: Adjust to 64bit bb offsets
commit e1f123257a1f7d3af36a31a0fb2d4c6f40039fed
Author: Michel Thierry <michel.thierry@intel.com>
Date:   Wed Jul 29 17:23:56 2015 +0100

    drm/i915: Expand error state's address width to 64b

changed the batch buffer address to be 64b. Fix the parsing
of gtt offset accordingly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91638
Cc: Akash Goel <akash.goel@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-08-19 12:12:28 +03:00
Jani Nikula
0e25e5d92d igt: remove deprecated reg access tools in favor of intel_reg
intel_iosf_sb_read, intel_iosf_sb_write, intel_reg_dumper,
intel_reg_read, intel_reg_snapshot, intel_reg_write, intel_vga_read, and
intel_vga_write have been deprecated in favor of intel_reg. Remove the
deprecated tools. intel_reg does everything they do, and more.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-17 10:47:56 +03:00
Chris Wilson
9b73ce43fe overlay: Fix min frequency detection on BYT/BSW
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-16 12:13:29 +01:00
Paulo Zanoni
64590c7b76 kms_frontbuffer_tracking: reduce the FBC wait timeout to 2s
Just like we did for PSR, let's do it for FBC. FBC gets reenabled in
just 50ms, so the 5000ms timeout is huge. On the other hand, we only
pay the 5000ms timeout full price 9 times when running
kms_frontbuffer_tracking --fbc-only, so this change shouldn't save too
much time.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 19:14:49 -03:00
Paulo Zanoni
f4db3b1884 kms_frontbuffer_tracking: reduce the PSR wait timeout to 2s
PSR only takes up to 100ms to be enabled, but we were using 5000ms
timeouts. The problem with PSR is that the MMAP_GTT tests have to
assert that PSR is disabled and stays disabled during the whole
timeout, so that 5s cost is a little to high when we consider that we
do the full 5s wait 74 times when running kms_frontbuffer_tracking
--psr-only.

By reducing to 2s we still make sure we're safe, since we're waiting
20x the time PSR needs to get reenabled, and we reduce the runtime of
running kms_frontbuffer_tracking --psr-only from 14m10s to 10m29s.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 19:14:26 -03:00
Chris Wilson
77b8af218c benchmark/gem_exec_trace: Inline everything
Avoid the globals and make the dispatch one huge function and hope GCC
works some magic.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-14 20:54:35 +01:00
Chris Wilson
a64e6c39b1 benchmark/gem_exec_tracer: Tweak to handle SNA
SNA starts by feeding in deliberately bad ioctls in order to detect the
kernel interface versions. A quick solution is to always feed it to the
ioctl and only record the trace if it is valid.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-14 20:34:21 +01:00
Paulo Zanoni
78120d8158 kms_frontbuffer_tracking: add subtests for rgb565 and rgb101010
Make sure valid formats work properly and invalid formats keep the
features disabled.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:33:50 -03:00
Paulo Zanoni
c3fb972ee9 kms_frontbuffer_tracking: fix psr-farfromfence assertions
We're using GTT draws and they disable PSR. This test is mostly for
FBC anyway.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:33:26 -03:00
Paulo Zanoni
d675cf3ed7 kms_frontbuffer_tracking: split prepare_subtest() in two functions
And remove duplicated code by calling prepare_subtest_data() on
rte_subtest().

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:32:59 -03:00
Paulo Zanoni
6de5b06112 kms_frontbuffer_tracking: remove duplicated pairs on multidraw
If we already tested the combination of m1+m2, don't test m2+m1 later:
the drawing pattern used already has 4 squares, so we're already
testing the "m2 followed by m1" case.

This should reduce the test time from about 60s to about 30s.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:32:36 -03:00
Paulo Zanoni
a2904ead74 kms_frontbuffer_tracking: SKIP if not enough stolen is available
This is not an FBC bug.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:32:12 -03:00
Paulo Zanoni
f62a683acd kms_frontbuffer_tracking: use all drawing methods on multidraw_subtest
Instead of having a single pair of methods per subtest. Having this in
pairs is not very useful since we end doing all the drawing methods
per subtest anyway.

This saves a few modesets, which makes eDP slightly faster - about 22s
on my local machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:31:44 -03:00
Paulo Zanoni
b53bcf789b kms_frontbuffer_tracking: improve support for multiple pixel formats
We now have per-pixel-format FBs and CRC values. Also t->format to
indicate the format we're using on the subtest. We still only use the
default RGB888 format (AKA FORMAT_DEFAULT) for all tests since
multiplying the current number of tests by the number of new pixel
formats doesn't sound like a great idea.

With this, it should be really easy to add new tests that use
different pixel formats.

Also, if you want a full IGT run on a specific pixel format, all you
need to do is to change FORMAT_DEFAULT.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:31:22 -03:00
Paulo Zanoni
3b17600789 kms_frontbuffer_tracking: add information about more formats
We're not using those formats yet, but a simple change to create_fb()
allows us to use these formats without problems now.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:30:56 -03:00
Paulo Zanoni
606f039dec kms_frontbuffer_tracking: introduce enum color
We want to add support for different pixel formats and the current
hardcoded pixel values won't work with that. So add enum color and
its auxiliary functions so we can decide the pixel values based on the
chosen color enum.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:30:28 -03:00
Paulo Zanoni
7009b10c42 kms_frontbuffer_tracking: don't pass the format to create_fb()
It is create_fb() who is going to decide the buffer format based on
the arguments provided by the caller. This is another step for the
non-XRGB8888 support.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:30:07 -03:00
Paulo Zanoni
e4b94900b5 kms_frontbuffer_tracking: add a wrapper for igt_create_fb()
The wrapper will do a few additional things when we add support for
formats different than XRGB8888.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:29:18 -03:00
Paulo Zanoni
445182f26b kms_frontbuffer_tracking: fix MMAP_WC assertions on PSR
Now that the MMAP_WC operations call the dirty ioctl, PSR gets
reenabled after some time. So we have to adjust op_disables_psr() to
take that into account.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:28:49 -03:00
Paulo Zanoni
9113c9aa9b lib/igt_draw: break if we already wrote every pixel
Due to the nature of accessing a tiled buffer in an untiled way, we
used to loop through the whole buffer all the time. Add a small
mechanism to just break in case we know we already wrote every pixel
we should have written.

On kms_frontbuffer_tracknig/fbc-2p-primscrn-pri-shrfb-draw-pwrite
(with a 3200x1800 primary screen and a 1920x1080 secondary screen), I
could reduce the runtime from ~7.53s to ~6.01s.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14 15:28:27 -03:00