summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-02igt/kms_rotation_crc: Fix flip tests for sprite planeMaarten Lankhorst
This test was flipping the primary plane instead of the sprite plane. Flip the correct plane to make the test pass properly. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102691 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Tested-by: Marta Lofstedt <marta.lofstedt@intel.com> Acked-by: Marta Lofstedt <marta.lofstedt@intel.com>
2017-10-02tests: Rename kms_pipe_color to kms_colorMaarten Lankhorst
Rename kms_pipe_color to kms_color, and rename the invalid tests to pipe-invalid. To prepare for adding support for plane color management. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-09-29igt/gem_sync: Sync before starting the clockChris Wilson
Hide the initial setup cost of a new batch by performing it before we start the clock for measuring the execute-wait latency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-29benchmarks: Actually build LIBDRM_INTEL_BENCHMARKSPetri Latvala
Adding LIBDRM_INTEL_BENCHMARKS into benchmarks_PROGRAMS had a tab before the assignment, making the line be inserted into the Makefile as is instead of being evaluated by automake. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-09-29lib: Fix igt_sysfs_set_u32 return valueTvrtko Ursulin
Printf family functions return a number of bytes, not tokens, printed so the existing check (== 1) was wrong. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-29igt/gem_exec_nop: Measure high-priority throughput over a bg loadChris Wilson
Measure how many high priority batches we can execute whilst running a bg spinner. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-29igt/gem_sync: Add a preemption testChris Wilson
Check and measure how well we can submit a second high priority task when the engine is already busy with a low priority task and see how long it takes to complete (and wake up the client). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-29igt/gem_exec_schedule: Detect too slow setup in deep-*Chris Wilson
Using vgem as our cork for building the request queue limits us to 10s of setup (or else the fence autoexpires and we start executing too early). Add timeouts to the setup loops and SKIP if we cannot establish the workload within 10s, the machine and driver is too slow to evaluate the expected results. To avoid the artificial limit of 10s requires lifting the dependency on vgem and switching to sw_sync and explicit fencing. Just a matter of plumbing! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-29meson: Also build kms_atomic_interruptiblePetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-29meson.sh: Invoke meson correctlyPetri Latvala
Either source or build directory is required as a command line parameter. Also use mkdir -p when creating the build directory to avoid errors when it already exists. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-29tests/gem_workarounds: Skip write only registersMika Kuoppala
We have no means to check write only registers as this would need access through context image. For now we know that cnl has a one such register, 0xe5f0 which is used to set WaForceContextSaveRestoreNonCoherent:cnl. By inspecting the context image without and with workaround applied: 0x0000a840: 0x0000e5f0 0xffff0800 0x0000a840: 0x0000e5f0 0xffff0820 we can conclude that the workaround setup is working right in this particular case. Add a write only list and add register 0xe5f0 into this list. This is a temporary solution until a more capable context image checker emerges. v2: add code comment about adhocness (Petri) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102943 Cc: Oscar Mateo <oscar.mateo@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Oscar Mateo <oscar.mateo@intel.com>
2017-09-28benchmarks/gem_exec_fault: Update for tryhard kernels.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2017-09-28benchmarks/gem_syslatency: Apply vmpressure, measure page allocationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-28igt/gem_exec_scheduler: HAS_SCHEDULER no longer means HAS_PREEMPTIONChris Wilson
Michal wants to limit machines that can do preemption, which means that we no longer can assume that if we have a scheduler for execbuf, that implies we have preemption. v2: Try a capability mask instead v3: Pretty print the caps. v4: Not so pretty print the caps. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-28lib: Capture the error state on an unexpected hangChris Wilson
Dump debugfs/i915_error_state to the debug channel if we detect an ERROR uevent. This poses a few problems, not least that it is the auxiliary process doing the dumping (so the output may be interleaved with the test, but considering a hang occurred it is likely the test is blocked) and the average error state is around 60k, which may prove unwieldy! On the other hand, it may prove invaluable in debugging those impossible to reproduce bugs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-26igt/gem_exec_schedule: Ignore set-priority failures on old kernelsChris Wilson
When plugging the device, we need to submit batches at highest priority so that they cannot be gazumped by the queued requests. On older kernels that do not support the user changing context priority, all contexts therefore have the same default priority and we can ignore the error. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-26igt_command_line.sh: Fix bashismPetri Latvala
[[ a != b ]] is a bashism. As it's just comparing $1 to an empty string, use -n with a normal [ ]. /bin/sh is dash in CI. v2: Also change the script to #!/bin/bash to avoid having to babysit bashism later. Fixes: f0243a761f1b ("tests/igt_command_line.sh: Allow testing individual tests") CC: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-26meson: Simple makefile integrationDaniel Vetter
Run ./meson.sh once, then you have $ make and $ make test available in the normal src root. v2: Add $ make reconfigure which is the meson equivalent to rerunning ./configure. Also takes some arguments if needed. Start out with --help, as usual. v3: Use ninja -C (Chris). v4: Catch more automake targets and point out what's happening (Petri). v5: Use EOF as heredoc marker (Arek) Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-25igt/gem_exec_whisper: Smoketest context prioritiesChris Wilson
No complex check of reordered writes, just throwing lots of random priority batches with long dependency chains at the scheduler. This should help to smoketest preemption. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-25igt/gem_exec_schedule: Fix up too deep reorder-wide()Chris Wilson
Like wide(), reorder-wide() didn't check the ring size before flooding and so would exhaust its available space and block (causing a GPU hang to recover), thus failing the test. Also, since we use a new context for each iteration of the test, the available ring space is reduced (due to the overhead in setting up that context via the ring), so make sure that when we measure the available ring space we also use a new context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-25igt/gem_exec_schedule: s/-MAX_PRIO/MIN_PRIO/Chris Wilson
Replace instances of -MAX_PRIO with MIN_PRIO for readability. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-25igt_core: Rework igt_system()Petri Latvala
Instead of redirecting output to pipes and forking, redirect after forking to avoid having to carefully unredirect before logging anything. igt@tools_test@sysfs_l3_parity had a racy condition where it prints the output of intel_l3_parity prepended by [cmd], but that ended up being printed again prepended by [cmd] because output was redirected, causing outputs to appear multiple times. This patch fixes that. CC: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2017-09-25tools_test: Clean up and fix sysfs_l3_parityPetri Latvala
Multiple misunderstandings of the expectations of the test and some missed parts of the shell-to-c conversion caused a couple of issues to remain. First, we need to actually disable a subbank before we check that a subbank is disabled (invoke the tool with -d). Second, the original pipe to wc -l was to check that the tool prints only one line, not that it prints "at least" a line. Modify the last check to verify that an "is disabled" text is _not_ printed. v2: Add a TODO comment Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101650 Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2017-09-22igt/kms_cursor_legacy: Use common spinbatchChris Wilson
Remove the local recursive spinner in favour of igt_spin_t. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-22tests/psr: Don't strcmp CRCs that are not NULL terminated.Dhinakaran Pandiyan
Switched to strncmp. Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@gmail.com> Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2017-09-22igt/kms_psr_sink_crc: Fix the bug in psr_drrs subtestRadhakrishna Sripada
The substring to be matched is "DRRS Supported: Yes" and not "DRRS Support: No". The kernel prints the DRRS status for all active CRTC's. Matching for No support gives a false positive when multiple CRTC's are active. Fixes: 33355210a43e (igt/kms_psr_sink_crc: Add psr_drrs subtest) Cc: C. Ramalingam <ramalingam.c@intel.com> Cc: Lohith BS <lohith.bs@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2017-09-22tests/kms_panel_fitting: Use igt_cairo_image_surface_create_from_png_file()Ville Syrjälä
Switch to using igt_cairo_image_surface_create_from_png_file() over the raw cairo version so that the test can actually find the image file no matter where we run it from. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-22lib/igt_fb: Add igt_cairo_image_surface_create_from_png()Ville Syrjälä
Raw usage of cairo_image_surface_create_from_png() doesn't work since it doesn't know about IGT_DATADIR and IGT_SRCDIR. Let's extract the helper from igt_paint_image() that uses igt_fopen_data() + cairo_image_surface_create_from_png_stream() and call it igt_cairo_image_surface_create_from_png(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-22tests/gem_flink_basic: Add documentation for subtestsVinay Belgaumkar
Added the missing IGT_TEST_DESCRIPTION and some subtest descriptions. v2: Removed duplication, addressed comments, cc'd test author v3: Only comment abstract code, change some igt_info to igt_debug. Changed description to reflect this is a patch, not an RFC. Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Eric Anholt <eric@anholt.net> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
2017-09-22intel-ci: Install testlist files to pkgdata dirPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Tested-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-09-22tests/Makefile.am: Install test-list*.txt to libexecdirPetri Latvala
Piglit expects test-list*.txt files to be in the same directory as the test binaries. Installing non-executable files to libexecdir requires going around some of autotools' sanity checks. This change should make 'make install':ed IGT runnable with piglit. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Tested-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-09-21i915_pciids: Change a KBL pci id to GT2 from GT1.5Rodrigo Vivi
In sync with 41693fd52373 ("drm/i915/kbl: Change a KBL pci id to GT2 from GT1.5") "See Mesa commit 9c588ff" v2: s/DT/Mobile Cc: Anuj Phogat <anuj.phogat@gmail.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2017-09-21intel_aubdump: Support I915_EXEC_BATCH_FIRST.Kenneth Graunke
The batch is now on the other end of the list. Fixes issues where modern Mesa and modern kernels together start putting the batch at the front of the list, and intel_aubdump looks for it at the end of the list, causing it to interpret some other buffer as the batch. Then AubLoad or aubinator see bogus data like 1.0 float as a GPU command and get grumpy.
2017-09-21igt/prime_vgem: Split out the fine-grain coherency checkChris Wilson
We don't expect every machine to be able to pass the WC/GTT coherency check, see kernel commit 3b5724d702ef24ee41ca008a1fab1cf94f3d31b5 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Aug 18 17:16:49 2016 +0100 drm/i915: Wait for writes through the GTT to land before reading back If we quickly switch from writing through the GTT to a read of the physical page directly with the CPU (e.g. performing relocations through the GTT and then running the command parser), we can observe that the writes are not visible to the CPU. It is not a coherency problem, as extensive investigations with clflush have demonstrated, but a mere timing issue - we have to wait for the GTT to complete it's write before we start our read from the CPU. The issue can be illustrated in userspace with: gtt = gem_mmap__gtt(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); cpu = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); for (i = 0; i < OBJECT_SIZE / 64; i++) { int x = 16*i + (i%16); gtt[x] = i; clflush(&cpu[x], sizeof(cpu[x])); assert(cpu[x] == i); } Experimenting with that shows that this behaviour is indeed limited to recent Atom-class hardware. so split out the interleave coherency check from the basic interopability check. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-20meson: share the configuration_data objectDaniel Vetter
Suggested by Jani. And rename from config_h to plain config, to make it's multi-use character a bit more obvious. Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-20meson: align test-list.txt generation with automakeDaniel Vetter
- I forgot the chamelium tests - Order tests the same way in both build systems. Since testdisplay is special, it's easier to put that at the end in meson, so adjusted automake to suit. With this you can diff the 2 test lists and end up with 0 differences, which will be useful to CI meson vs. automake. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-20tests/kms_cursor_legacy: Do not start collecting CRC after making FB busyMaarten Lankhorst
Collecting CRC may force a modeset, which is a bad idea after we just forced a hang. The hang is intended to make sure the page flip doesn't complete before the cursor, making sure that works. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102259 Cc: Marta Lofstedt <marta.lofstedt@intel.com> Tested-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [mlankhorst: Prevent overflow when collecting crcs, based on Villes feedback]
2017-09-19igt/gem_eio: Add another variant of in-flight to avoid request coalescingChris Wilson
Break up request coalescing by submitting a queue of requests from different contexts. This makes sure that we mark all ready but not yet submitted-to-hw requests as completed/EIO upon wedging. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-19igt/prime_busy: Declare the hang tests expect to cause GPU hangsChris Wilson
Pull the two subtests together into the same subtest group as the fixtures were repeated for both and so we can consolidate down to one. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2017-09-19igt/gem_eio: Check wedged with inflight on the same engineChris Wilson
Some overlap with gem_exec_fence, but confirm that light for waiting on a fence (both native and external), that a request queued is also flagged as EIO upon wedging. v2: check all ABI engines Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-19igt/gem_eio: Exercise wedged with native in-flight requestsChris Wilson
If we wedged one engine with unready requests to a second engine (blocked by waiting on requests from the first, using a dma-fence), check that we propagate the -EIO to those in-flight requests. v2: check all ABI engines Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-19igt/gem_eio: inflight wedged requires long pluggingChris Wilson
As our hangcheck may exceed 10s to declare the device wedged, we need to hold the plugging fence indefinitely. This makes using vgem as our input fence unusable, so resort to using sw_sync. At the same time, we can then check that the async result is also -EIO. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102616 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2017-09-18igt/kms_psr_sink_crc: Add psr_drrs subtestRadhakrishna Sripada
Platforms do not support psr and drrs simultaneously. Adding a subtest to make the check. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
2017-09-18meson: Fix IGT_GIT_SHA1 handlingVille Syrjälä
Tell meson about the dependency on version.h. Avoids the compiler falling over on account of IGT_GIT_SHA1 not being there. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-18meson: Install the (dis)assemblerVille Syrjälä
Install the assembler and disassemebler binaries, and the accompanying pkg-config file. Change libbrw into a static library since we don't want to install that. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Process intel_aubdump.in into intel_aubdumpJordan Justen
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15intel_aubdump.in: Set executable permissions (for meson build)Jordan Justen
Meson detects if an input file is executable, and copies that to the output file. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Install libigt.soJordan Justen
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Install intel_gpu_abrtVille Syrjälä
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Rename and install intel-gpu-overlayVille Syrjälä
Autotools called the binary 'intel-gpu-overlay', let's have meson use that name as well. Also install it. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>