summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-03-07tools/aubdump: For gen10+ support addresses up to 4GBaubdumpJordan Justen1-2/+18
For gen10, we now add mappings for buffers as they are needed. Instead of doing this dynamically, we could always map the entire 4GB. With 4KB pages, the tables would take up 8MB in every AUB. AUBs are often quite huge compared to 8MB, but they can also be just a few hundred KB. This should allow the AUB to create up to about 4GB of allocated buffers, whereas before we were limited to about 64MB. While it is unlikely that we'll try to capture AUBs that generate buffers up to 4GB in size, this change also should allow pinned buffers to be used anywhere in the first 4GB. (I tested a pinned buffer at 0xf0000000.) Cc: Scott D Phillips <scott.d.phillips@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2018-03-07tools/aubdump: Add bitmap to track gtt pages that have been mappedJordan Justen1-1/+95
This will allow us to map ranges as they are used, but prevents remapping already mapped regions. By mapping ranges as they are used, we can support pinned pages without having to map all pages of the first 32-bits. v2: * Make bitmap manipulation functions independent from 4k page size. Maybe will be usable also for 1GB pages with PPGTT. Cc: Scott D Phillips <scott.d.phillips@intel.com> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2018-03-07tools/aubdump: Add gen8_map_rangeJordan Justen1-11/+29
This function should allow us to only write the page table entries that get used. v2: * Use align; deobfuscate start addr calc. (Scott) Cc: Scott D Phillips <scott.d.phillips@intel.com> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2018-03-06igt: Remove gen7_forcewake_mtChris Wilson4-258/+0
Having demonstrated that FORCEWAKE_MT is suspect to the same old concurrent mmio access bug that stalks gen7, we have shown that it is not viable for userspace to poke around inside FORCEWAKE_MT directly. As it can not work correctly, remove the test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-03-06igt/gen7_forcewake_mt: Mark the mmio register as volatileChris Wilson1-29/+79
Prevent the compiler from caching reads/writes to the hw register as we do want to perform mmio. Whilst fixing up the mmio access, also ensure that we do not leave the test with any other bits still set in the forcewake register to prevent affecting other tests, as spotted by Tvrtko. v2: Use intel_mmio_use_pci_bar() rather open code the ioremap v3: Flip igt_wait() checking as it returns true on success, not errno. v4: Hohum, the mmio bug affects FORCEWAKE_MT as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-03-05lib/sysfs: s/kick_fbcon/bind_fbcon/Ville Syrjälä4-7/+7
Rename kick_fbcon() into bind_fbcon() so that it's not so confusing. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-05lib/sysfs: Fix fbcon unbind, againVille Syrjälä1-11/+23
Looks like unbinding the dummy con doesn't work on all machines. Instead we have to bind fbcon (which is what we used to do before commit d18fca7f6cf3 ("lib/sysfs: Fix fbcon rebind")). Since some machines need the bind and others need the unbind let's do both. The most obvious difference I observed between two machines that behave differently was the order in which the console drivers were listed in sysfs. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-05lib/igt_pm: Restore runtime pm state on test exitTvrtko Ursulin1-5/+117
Some tests (the ones which call igt_setup_runtime_pm and igt_pm_enable_audio_runtime_pm) change default system configuration and never restore it. The configured runtime suspend is aggressive and may influence behaviour of subsequent tests, so it is better to restore to previous values on test exit. This way system behaviour, with regards to a random sequence of executed tests, will be more consistent from one run to another. v2: Read failure means no runtime pm support so don't assert on it. v3: Install exit handler before the write to close the Ctrl^C race. (Imre) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v2 Acked-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
2018-03-05igt/gem_spin_batch: Avoid waiting when running concurrentlyChris Wilson1-7/+9
If we do a global wait while trying to execute spinners in parallel, it ends badly with a GPU hang. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104352 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-05tests/perf_pmu: Handle CPU hotplug failures betterChris Wilson7-7/+115
CPU hotplug, especially CPU0, can be flaky on commodity hardware. To improve test reliability and reponse times when testing larger runs we need to handle those cases better. Handle failures to off-line a CPU by immediately skipping the test, and failures to on-line a CPU by immediately rebooting the machine. This patch includes igt_sysrq_reboot implementation from Chris Wilson. v2: Halt by default, reboot if env variable IGT_REBOOT_ON_FATAL_ERROR is set. (Petri Latvala) v3: Add missign docs and update stale comment. (Petri Latvala) v4: Use pause instead of sleep. (Chris Wilson) v5: Newlines! (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-03-05tests/perf_pmu: Test busyness reporting in face of GPU hangsTvrtko Ursulin1-2/+30
Verify that the reported busyness is in line with what would we expect from a batch which causes a hang and gets kicked out from the engine. v2: Change to explicit igt_force_gpu_reset instead of guessing when a spin batch will hang. (Chris Wilson) v3: Assert and comment test expectations. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-03lib: Fix MI_BATCH_BUFFER_START for hang injectionChris Wilson1-7/+21
A couple of bugs inside the hang injector, the worst being that the presumed_offset of the reloc didn't match the batch; so if the reloc was skipped (as the presumed_offset matched the reloc offset), the batch wasn't updated and so we may not have generated a hanging batch at all! Secondly, the MI_BATCH_BUFFER_START was not correct for all gen. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-03-02igt/gem_ctx_switch: Exercise all engines at onceChris Wilson1-0/+79
Just a small variant to apply a continuous context-switch load to all engines. v2: Adapt to for_each_physical_engine() and sane gem_context_create() Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-03-01tools/intel_dp_compliance: Add missing GLIB_CFLAGSThierry Reding1-1/+1
intel_dp_compliance.h includes the glib.h header file but the Makefile does not explicitly pass a -I option with the path containing that header, hence causing the build to fail. Note that this doesn't seem to happen with a recent enough version of cairo, which implicitly provides the correct -I option. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-03-01tests/testdisplay: Explicitly use GLIB_CFLAGSThierry Reding1-0/+2
testdisplay.h includes the glib.h header file but the Makefile does not explicitly pass a -I option with the path containing that header, hence causing the build to fail. Note that this doesn't seem to happen with a recent enough version of cairo, which implicitly provides the correct -I option. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-03-01tools/intel_guc_logger: Send GuC log level in new i915 expected formatSagar Arun Kamble1-4/+37
i915 expects GuC log level to be specified as: 0: disabled 1: enabled (verbosity level 0 = min) 2: enabled (verbosity level 1) 3: enabled (verbosity level 2) 4: enabled (verbosity level 3 = max) Remove the earlier internal layout based logging control from guc_log_control and send new expected values. v2: log_level assert in guc_log_control, cleaner level setup (Michal) added missing copyright header. (Sagar) Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michal Winiarski <michal.winiarski@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
2018-03-01igt/gem_exec_capture: Exercise readback of userptrChris Wilson1-3/+32
EXEC_OBJECT_CAPTURE extends the type of buffers we may read during error capture. Previously we knew that we would only see batch buffers (which limited the objects to being from gem_create()), but now we need to check that any buffer the user can create can be read. The first alternate buffer type is a userptr. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
2018-03-01tests/perf: simplify buffer-fill subtestLionel Landwerlin1-45/+3
Much like the enable-disable subtest, we're printing a bunch of values that were meant to try to figure out the issue of the OA unit not producing reports. After fixing the i915 driver with : https://patchwork.freedesktop.org/series/39112/ We don't need those values anymore. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2018-03-01tests/perf: simplify enable-disable subtestLionel Landwerlin1-30/+17
We're printing a bunch of values that were meant to try to figure out the issue of the OA unit not producing reports. After fixing the i915 driver with : https://patchwork.freedesktop.org/series/39112/ We don't need those values anymore. It turns out the issue was simply a race condition in the driver. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2018-03-01lib: Provide an accelerated routine for readback from WCChris Wilson6-134/+124
Reading from WC is awfully slow as each access is uncached and so performed synchronously, stalling for the memory load. x86 did introduce some new instructions in SSE 4.1 to provide a small internal buffer to accelerate reading back a cacheline at a time from uncached memory, for this purpose. v2: Don't be lazy and handle misalignment. v3: Switch out of sse41 before emitting the generic memcpy routine v4: Replace opencoded memcpy_from_wc v5: Always flush the internal buffer before use (Eric) v6: Assume bulk moves, so check for dst alignment. v7: Use _mm_fence for _buitlin_ia32_mfence for consistency, remove superfluous defines (Ville) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-03-01lib/dummyload: Avoid assertions in lowlevel spin constructorChris Wilson2-4/+17
__igt_spin_batch_new() may be used inside a background helper which is competing against the GPU being reset. As such, we cannot even assert that the spin->handle is busy immediately after submission as it may have already been reset by another client writing to i915_wedged. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2018-02-28tests/perf: Fix build warningTvrtko Ursulin1-1/+1
Move variable declaration to top of scope to avoid C90 build warning. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2018-02-28tests/kms_frontbuffer_tracking: Fix build warningTvrtko Ursulin1-1/+1
Mark drrs_set as static to avoid a build warning. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-28lib/igt_draw: Fix bo leak in gpu draw routinesMaarten Lankhorst1-0/+3
gem_handle_to_libdrm_bo creates a new handle through the use of flink, which makes kms_frontbuffer_tracking through a single run not complete when it starts leaking 50MB objects. Add the missing bo_unref to kill the duplicated handle and fix the leaks! Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-27meson: Get rid of lib_headersArkadiusz Hiler1-59/+0
Unused since commit 1f53e0dcec7a ("meson: Don't install headers"). Suggested-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-27igt: Make libudev mandatoryAntonio Argenziano10-62/+4
Since more essential components use libudev, make its dependency mandatory. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-27lib/igt_kms: Remove remaining docbook warnings mentioning igt_kms files.Maarten Lankhorst1-11/+18
Some warnings still exist, but they are about missing descriptions for structs enums and their members. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-27lib/igt_kms: Fix docbook warningsMaarten Lankhorst2-9/+13
This gets rid of the following warnings: lib/igt_kms.c:2688: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2738: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2788: warning: Symbol name not found at the start of the comment block. lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe is not used from source code comment block. lib/igt_kms.c:2812: warning: Parameter description for igt_pipe_obj_replace_prop_blob::pipe_obj is missing in source code comment block. lib/igt_kms.c:3794: warning: Parameter description for igt_cleanup_hotplug::mon is missing in source code comment block. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-27igt/debugfs_tests: Record which file is being opened in kmsgChris Wilson1-1/+2
When tracking down the cause of a particular kernel warning, knowing which file it is associated with can be a big clue. So write the filename into the kernel message log prior to opening it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-27lib: Export kmsg()Chris Wilson2-14/+23
Export the kmsg() function for use by tests to write into the kernel message log, useful for tests to inline their progress with kernel error messages. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-02-26igt/gem_softpin: Only expect EINVAL for color-overlaps for user objectsChris Wilson1-2/+2
If the specified object can not fit into the GTT due to overlap with a neighbouring pinned object (not part of the execobjects[]), we expect to fail with ENOSPC (as we cannot evict, rather than EINVAL for the user error in a badly constructed execobjects[]). To prevent the tests causing overlap with other external objects expand the test hole by a page on either side. (Setting up the system to deliberately hit ENOSPC is trickier as for example it requires pinned an object into the scanout with enough free space on either side to test.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-02-26igt/kms_force_connector_basic: Clear any previous connector overrideChris Wilson1-7/+17
When searching for a VGA connector to use to test overriding the connector status, we require the system to have a disconnected VGA connector, but if a previous test left an override inplace, that may not exist. Before we check whether the connector is attached to real HW, first reset the connector status override so that we always get the actual HW result. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-02-26tests/kms_plane_lowres: Drain pipe before reading CRCMika Kahola1-24/+11
In CI runs we every now and then fail to read correct CRC yielding an error when comparing reference and grabbed CRC's. Let's first fix the test so that we drain the pipe first and then read the correct CRC. References: https://bugs.freedesktop.org/show_bug.cgi?id=103166 Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
2018-02-26meson: Don't build docs when cross-compilingPetri Latvala1-1/+4
Building documentation requires executing all test binaries to produce their respective description texts. This can be a very time-consuming process, if viable at all, when the target arch differs from the host. Don't process the doc directory at all when an exe wrapper is setup. This avoids the runtime penalty when the target binaries are executed through qemu, but leaves everything as-is when the target binaries can be directly executed, like when cross-compiling to x86 from x86_64 host. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-02-26igt/gem_busy: Fix extended-bsd aliasing checksChris Wilson1-3/+4
Although we want to specify exactly which physical engine to run on, the busy ioctl can only return the I915_EXEC_RING identifier, i.e. the aliased I915_EXEC_BSD for vcs0/vcs1. Horrors. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105248 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-02-23Iterate over physical enginesChris Wilson25-382/+124
We current have a single for_each_engine() iterator which we use to generate both a set of uABI engines and a set of physical engines. Determining what uABI ring-id corresponds to an actual HW engine is tricky, so pull that out to a library function and introduce for_each_physical_engine() for cases where we want to issue requests once on each HW ring (avoiding aliasing issues). v2: Remember can_store_dword for gem_sync v3: Find more open-coded for_each_physical Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-02-23meson: Make cairo mandatoryArkadiusz Hiler1-1/+1
We use cairo all around the codebase unconditionally, yet for some reason it was an optional dependency. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-23meson: Use bufmgr stubs headers if libdrm_intel is not foundArkadiusz Hiler1-0/+1
Just adding the .h file to lib_headers is not enough. With this change we are passing 'stubs/drm' as a part of include_directories when building, so a proper -I will be issued to the compiler. This can be done by turning 'inc' into a list of include_directories()-generated objects. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com>
2018-02-23igt: Use lib gem_execbuf where possibleAntonio Argenziano16-95/+32
Replace custom execbuf ioctl wrapper with the ones in lib. v2: - Lib execbuf wrapper is not signal handling friendly. (Chris) v3: - EXECBUFFER2_WR != EXECBUFFER2. (Chris) v4: Drop gem_exec_fence.c changes Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_busy: Use intel_measure_ring_sizeAntonio Argenziano1-96/+2
With intel_measure_ring_size added as common function we can use it instead of the local copy Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_ringfill: use intel_measure_ring_sizeDaniele Ceraolo Spurio1-95/+2
With intel_measure_ring_size added as common function we can use it instead of the local copy Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_exec_await: use intel_measure_ring_sizeDaniele Ceraolo Spurio1-89/+2
With intel_measure_ring_size added as common function we can use it instead of the local copy Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_eio: use igt_corkAntonio Argenziano1-6/+4
With igt_cork added as common utility we can use it instead of the local copy Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_wait: use igt_corkDaniele Ceraolo Spurio1-44/+14
With igt_cork added as common utility we can use it instead of the local copy Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_exec_latency: use new common functionsDaniele Ceraolo Spurio1-86/+13
With intel_measure_ring_size and igt_cork added as common utilities we can use them instead of the local copy of those utilities Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_exec_fence: use new common functionsDaniele Ceraolo Spurio1-95/+12
With intel_measure_ring_size and igt_cork added as common utilities we can use them instead of the local copy of those utilities Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23tests/gem_exec_schedule: use new common functionsDaniele Ceraolo Spurio1-121/+41
With intel_measure_ring_size and igt_cork added as common utilities we can use them instead of the local copy of those utilities Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23lib/igt_gt: add intel_measure_ring_sizeDaniele Ceraolo Spurio4-0/+157
The logic to measure the ring size is replicated almost identically in several tests. Adding it as a common function will make the code cleaner. The tests are updated in follow up patches. v2: - Move into a new file: 'gem_ring'. (Chris) v3: - Rename ring measure function. (Chris) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23lib/igt_dummyload: add igt_corkDaniele Ceraolo Spurio2-0/+151
The "cork" bo (imported bo with attached fence) and fence is used in several tests to stall execution. Moving it to a common place makes the codebase cleaner. Note that the actual test updates is done in follow up patches as it is simpler to do in one go after one more common function is added in the next patch. v2: don't use new/free naming, don't use dynamic alloc (Chris) v3: add sw_sync common functions. (Chris) v4: squash sw_sync and vgem cork structs into one. (Chris) v5: use anonymous enum in cork struct. (Chris) v6: reset cork after unplugging. (Chris) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-22igt: Add VC4 purgeable BO testsBoris Brezillon3-0/+266
v3: Make sure we receive a SIGBUS signal when accessing memory of a purged BO Add <signal.h> include after rebase (by anholt) Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>