summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-04-17lib: Make igt_set_timeout fail with a timeout statusHEADmasterPetri Latvala1-4/+4
A timeout failure seems exactly what IGT_EXIT_TIMEOUT is for. Also make the failure error message be printed with critical log level to match what's done for __igt_fail_assert's message. Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2018-04-17tests/kms_frontbuffer_tracking: Ignore FBC errors due mode is too largeSouza, Jose1-0/+9
Depending on the default mode size, some tests will fail because it will exceed the maximum size that hardware tracking can handle, mostly because hardware tracking do not take in care the X and Y offsets, so the plane size + offsets needs be smaller or equal to hardware tracking limmits. Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105680 Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-04-17scripts: Use https URL to download piglitSouza, Jose1-1/+1
This makes life easier for users behind network proxies. A simple 'export https_proxy=<proxy url>' will make this works, today user needs to do a more complicated setup in ssh/git with proxy information. Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-04-14tests/kms_color: Enable color tests for AMDGPULeo (Sunpeng) Li1-2/+3
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-14tests/kms_color: Do not mask LUT for non i915 drivers.Leo (Sunpeng) Li1-1/+6
Masking assumes a direct relationship between the software LUT structure, and hardware LUT. This is not always the case. On AMD hardware for example, the hardware LUT is composed of piecewise-linear segments, with end-point spaced exponentially along the X axis, while software LUT is spaced linearly. Masking the LUT for the purpose of truncating the resulting colors won't work here. v2: Add commit message and sign off. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-14tests/kms_color: Fill entire frame when painting rectanglesLeo (Sunpeng) Li1-0/+16
Fill entire frame to avoid garbage data from being included in CRC calculations. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-12lib: Adjust refactored gpu_fill library to our coding styleKatarzyna Dec6-38/+39
While I am making changes in gpgpu and media fill area let's adjust code to our coding style. v2: rebased on series new version (patch is now last from series so change seems larger) v3: rebased Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
2018-04-12lib/gpgpu_fill: Add missing configuration parameters for gpgpu_fillKatarzyna Dec2-1/+4
There are missing parameters for Gen8 configuration of gpgpu_fill that are causing GPU hangs on newer hardware. We need to set the number of threads in TG in gen8_fill_interface_descriptor. This field was omitted (apparently without any side effects), but according to bspec from BDW this field cannot be set to 0. We also need to use pipeline selection mask to gen9_gpgpu_fillfunc, which is necessary from SKL. v2: rebased on refactored library v3: Removed replacing gen7_emit_interface_descriptor_load with gen8 version in gen9_gpgpgu_fillfunc, because during refactoring gen8 function was removed. v4: rebase on series new version Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
2018-04-12lib: Remove duplications in gpu_fill libraryKatarzyna Dec10-293/+39
After moving all functions needed for gpgpu and media fill testing there is a lot of duplications which can be removed: Library media_fill_gen8 and media_fill_gen8lp for CHT was removed, media state flush for !CHT was added to gen7_emit_media_objects. Many gen8 functions were replaced with gen7 version with devid parameter (gen7_fill_curbe_load, gen7_emit_interface_descriptor, gen7_fill_binding_table, gen7_emit_media_objects). Unified fill kernel function so it is applicable to all gens and both media and gpgpu (merged gen7_fill_media_kernel and gen8_fill_media_kernel). Duplicated constants like GEN8_MEDIA_VFE_STATE, GEN8_MEDIA_CURBE_LOAD, GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD, GEN8_MEDIA_OBJECT were replaced by GEN7 version. However this constants were not removed from gen8_media.h library, because they are used by other tests for Gen8+. More refactoring in this gen*_media.h libraries is needed. It seems that further unification of *_fillfunc functions will introduce more confusion in understanding what the tests are doing and what were changes between Gens. v2: Moved some reduntant changes from Move gpgpu/media fill to gpu_fill... to this patch. Applied comments from review. v3: rebase Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
2018-04-12lib: Move common gpgpu/media fill functions to gpu_fill libraryKatarzyna Dec9-1705/+961
Gpgpu_fill and media_fill libraries are very similar and many functions can be shared. I have created library gpu_fill with all functions needed for implementing gpgpu_fill and media_fill tests for all Gens. For reviewing and debugging purposes this patch should be only moving functions from few libraries to one removing functions identical for both media and gpgpu. Places in the code that required more changes: Removing gen7_fill_gpgpu_kernel function that is identical to gen7_fill_media_kernel and introduces conflict with moving genX_fill_interface_descriptor, which are the same for media and gpgpu. Function gen8_fill_media_kernel is not removed in this patch (although it is identical with gen7 version), because this patch should be as much as possible functions movement. gen8_fill_interface_descriptor was unified for media and gpgpu by adding kernel and its size as a parameter (this parameters were missing in media gen8, gen8lp and gen9 functions) gen8_emit_state_base_address was unified, the one for gpgpu was configured like it would be using indirect state (while we are using CURBE). I have checked that media fill version (OUT_BATCH(0 | BASE_ADDRESS_MODIFY)) works fine on gpgpu gen8 and newer. v2: Changed code layout. GenX_fill_media_kernel was identical to genX_fill_gpgpu_kernel so this function was unified to gen7_fill_kernel. There were 2 very similar functions gen8_emit_state_base_address for media and gpgpu, where the one for gpgpu was configured like it would be using indirect state (while we are using CURBE). I have checked if media fill version works fine in gpgpu test on Gen8 and unified them. v3: Made patch easier for reviewing moving changes unifying code for various gens (that were included v1) to other patch, leaving only the most critical code changes. v5: Added copyrights and #ifndef to gpu_fill.h v5: Added copyrights to gpu_fill.c Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
2018-04-12igt/kms_plane_scaling: Open DRM_MASTERChris Wilson1-1/+1
Modesetting requires DRM_MASTER privileges, so use drm_open_driver_master() to assert that we do acquire them. References: https://bugs.freedesktop.org/show_bug.cgi?id=105997 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-04-12tests/gem_close_race: Wait for work to complete before terminating testAntonio Argenziano1-0/+4
When running a single subtest, outstanding work might hang after the test ends therefore escaping detection by the hang_detector. v2: - Update commit message. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-04-11tests/perf_pmu: Avoid RT thread for accuracy testTvrtko Ursulin1-55/+52
Realtime scheduling interferes with execlists submission (tasklet) so try to simplify the PWM loop in a few ways: * Drop RT. * Longer batches for smaller systematic error. * More truthful test duration calculation. * Less clock queries. * No self-adjust - instead just report the achieved cycle and let the parent check against it. * Report absolute cycle error. v2: * Bring back self-adjust. (Chris Wilson) (But slightly fixed version with no overflow.) v3: * Log average and mean calibration for each pass. v4: * Eliminate development leftovers. * Fix variance logging. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-04-11tests/kms_frontbuffer_tracking: Save runtime by removing sleep.Lofstedt, Marta1-4/+0
The kms_frontbuffer_tracking@*suspend subtests spend 20 seconds sleeping around igt_system_suspend_autoresume. I find no other igt test that require sleeping in relation to suspend-resume, so it should be removed. Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-04-11tools/aubdump: Fix ISO C90 forbids mixed declarations and code warningTvrtko Ursulin1-3/+4
Back to a clean build with no warnings, at least for me. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2018-04-11lib/igt_debugfs: Add timeouts to opening pipe CRC fd.Maarten Lankhorst1-0/+3
This will fix the PSR tests to fail slightly faster, since they wait indefinitely for a CRC that never comes during open. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Increase timeout to 10 seconds for HSW CRC w/a.] Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-04-11lib/igt_kms: Reset FIFO underruns on first commit after init()/reset().Maarten Lankhorst1-0/+7
When we set the test to its first state, we will clear FIFO underrun status through the debugfs, so that any underruns caused by the tests will not affect other tests. In particular this also resets the FBC FIFO underrun status, so previous failures won't affect other tests that depend on FBC. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105681 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-04-11lib/igt_kms: Handle outputs with no modes betterMaarten Lankhorst2-6/+10
Pretend that outputs without modes are disabled, and try reprobing if no modes are initially detected, just in case that the reprobe will find modes. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105798 Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-04-10lib: Dump meminfo and slabinfo if we complain about insufficient memoryChris Wilson1-2/+26
All too frequently, we fail our memory checks to a leak in the driver. While we give every opportunity for the driver to release the memory before we fail, if we do dump the meminfo and slabinfo, if available, so we can assign blame^W^W resolve the problem quickly. References: https://bugs.freedesktop.org/show_bug.cgi?id=105967 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Martin Peres <martin.peres@linux.intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-04-09tests/perf: fix gen8 small cores whitelist expectationLionel Landwerlin1-1/+1
We don't expect to access those registers on Braswell. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105593 Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2018-04-09kms_frontbuffer_tracking: Remove unnecessary modeset from get_sink_crc.Maarten Lankhorst1-8/+0
get_sink_crc() wants the eDP panel enabled to collect a CRC, but this is already required for opening the pipe CRC. This was broken in the conversion to igt_display, because the call to setup_sink_crc was moved. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105503 Reported-by: Marta Löfstedt <marta.lofstedt@intel.com>
2018-04-06igt/gem_eio: Drop DRM_MASTER so we can reacquire it in the subtestsChris Wilson1-0/+2
As we reopen the fd for each subtest, and we need a DRM_MASTER, we need to drop master on the original before we are allowed to claim DRM_MASTER on the second. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105922 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-04-06lib: Acquire master for pollable spinbatch on gen4/5Chris Wilson1-1/+4
gen4/5 require a DRM_MASTER to use MI_STORE_DW, make it so. 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-04-06igt/gem_eio: Require context support before creationChris Wilson1-4/+10
gem_context_create() nowadays assumes you have already checked for context support and asserts for any error. So check first. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105924 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-04-06tests/kms_psr_sink_crc: Save runtime by not waiting in crc functionMarta Lofstedt1-6/+0
The get_sink_crc function usleep(300000) with motivation: "Now give a time for human eyes". However, the function has already exited early on igt_interactive_debug, so no human is waiting. Also, waiting for keypress is obsolete when not in igt_interactive_debug mode. Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-04-05blacklist: Don't run tests on pipe-d, pipe-e or pipe-fLofstedt, Marta1-0/+6
There is currently no hardware in our labs that supports pipe-d, pipe-e nor pipe-f. Skipping takes time, so all tests on these pipes should be blacklisted. Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-05blacklist: Don't run DRRS test on Intel CI systemLofstedt, Marta1-0/+4
Skipping takes time, specifically for the big amount of drrs related kms_frontbuffer_tracking tests. Since we currently don't have any system set up with DRRS panels, blacklisting all those test will save time, and we can avoid the need to increase the Jenkins timeout in order to solve the Bugzilla below. V2: Changed typo and added comment. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105617 Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-04tests/kms_getfb: Use fixtures and subtest groupsDaniel Stone1-3/+8
Make sure we gently skip when required features (CCS, getfb2) are not supported on the running kernel, and clean up properly after ourselves. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-04-04Test that register types are accepted in all valid forms.Adam Sampson4-0/+8
The assembler should accept ub, :ub, UB and :UB. Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-04Use flex -i when building with meson.Adam Sampson1-1/+1
When built with automake, the assembler's tokeniser is built with -i, making it case-insensitive. This wasn't being done with meson. (The symptom was build failures in intel-vaapi-driver, which uses register types like ":ub". In lex.l, they're written as ":UB", so the lexer was rejecting them without -i.) Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-04-03tests/gem_eio: Add reset and unwedge stress testingTvrtko Ursulin1-0/+74
Reset and unwedge stress testing is supposed to trigger wedging or resets at incovenient times and then re-use the context so either the context or driver tracking might get confused and break. v2: * Renamed for more sensible naming. * Added some comments to explain what the test is doing. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-04-03tests/gem_eio: Never re-use contexts which were in the middle of GPU resetTvrtko Ursulin3-26/+64
Contexts executing when reset triggers are potentialy corrupt so trying to use them from a subsequent test (like the default context) can hang the GPU or even the driver. Workaround that by always creating a dedicated context which will be running when GPU reset happens. v2: * Export and use gem_reopen_device so the test works on old gens as well. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-04-03tests/kms_plane_scaling: fb height to be min 16 for NV12Vidya Srinivas1-1/+1
Per Bspec, fb height needs to be min 16 for NV12 (YUV planar formats). We also need the src height and width to be multiple of 4. Reviewed-By: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-03-30tests/kms_getfb: Split property-ID get into helperDaniel Stone1-17/+19
We'll want to reuse this, so split it out into a (smaller!) helper. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-03-30tests/kms_getfb: Test we reject CCS buffersDaniel Stone1-0/+47
The getfb ioctl only supports returning a single buffer handle (mirroring addfb), which means it should refuse to return us back CCS buffers. This is enforced by the kernel as of b24791fe00f8. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-03-29tests/perf_pmu: Fix usage of for_each_engine_class_instanceTvrtko Ursulin2-25/+17
Wrong file descriptor was passed to the iterator. This had currently no effect, since it wasn't used in the macro, but needs to be fixed. At the same time make the macro consistent by checking for engine presence like the other iterators do. Added __for_each_engine_class_instance which does not check for engine presence and so is useful for enumerating all possible engines - like for instance for subtest enumeration. And another 'wrong fd used' fixlet in the render node subtests. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reported-by: Michel Thierry <michel.thierry@intel.com> Cc: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
2018-03-28lib/igt_kms: Improve connector probing in igt_display_init(), v2.Maarten Lankhorst1-1/+7
Only do a full probe when the initial connector status is unknown, and otherwise skip it. This should speed up kms tests ever so slightly. Also set pipe to PIPE_NONE for igt_output_refresh(), to make the connector info slightly more accurate. Changes since v1: - Instead of a force_reprobe tristate, only force reprobe from igt_display_init() when an unknown connection is found. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-03-28tests/kms_frontbuffer_tracking: Fix Y alignment in the scaledprimary ↵Maarten Lankhorst1-2/+16
subtest, v3. This is hidden behind the other kms_frontbuffer_tracking failures, but is its own fail. On gen9/gen10 we fail the scaledprimary tests because FBC refuses to be enabled with "plane Y offset is misaligned". Looking at the kernel, this is a workaround for FIFO underruns which can be tested as well. Test that with the right alignment, FBC is enabled and with misalignment FBC is disabled on <= gen10. Changes since v1: - Always check both alignments. Changes since v2: - Fix gen assignment. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105678 Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-03-27igt/gem_ctx_isolation: Reset a scratch contextChris Wilson1-1/+27
If we inject a reset into the target context, there is a risk that the register state is never saved back to memory. The exact interaction between reset, the context image and the precise timing of our execution are not well defined. Since we cannot ensure that the context image remains valid, force a context switch prior to the reset. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105270 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105457 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105545 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-03-27igt/perf_pmu: Most-busy requires at least one busy engineChris Wilson1-0/+1
The test is whether with all but one engine busy we record the correct load on each engine. If we only have one engine, this test degenerates into all-idle/all-busy, so we can skip to avoid crashing on the assumption that we have a busy spinner. 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-27overlay: Call setlocale around strtodChris Wilson1-2/+9
strtod() is locale-dependent. The decimal conversion depends on the radix character ('.' for some of us like myself) varies by locale. As the kernel reports its values using the "C" locale, we need to switch to that when parsing; and switch back before reporting to the user. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105712 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-26tests/perf_pmu: Improve accuracy by waiting on spinner to startTvrtko Ursulin1-48/+103
More than one test assumes that the spinner is running pretty much immediately after we have create or submitted it. In actuality there is a variable delay, especially on execlists platforms, between submission and spin batch starting to run on the hardware. To enable tests which care about this level of timing to account for this, we add a new spin batch constructor which provides an output field which can be polled to determine when the batch actually started running. This is implemented via MI_STOREDW_IMM from the spin batch, writing into memory mapped page shared with userspace. Using this facility from perf_pmu, where applicable, should improve very occasional test fails across the set and platforms. v2: Chris Wilson: * Use caching mapping if available. * Handle old gens better. * Use gem_can_store_dword. * Cache exec obj array in spin_batch_t for easier resubmit. v3: * Forgot I915_EXEC_NO_RELOC. (Chris Wilson) v4: * Mask out all non-engine flags in gem_can_store_dword. * Added some debug logging. v5: * Fix relocs and batch munmap. (Chris) * Added assert idle spinner batch looks as expected. v6: * Skip accuracy tests when !gem_can_store_dword. v7: * Fix batch recursion reloc address. v8: Chris Wilson: * Pull up gem_can_store_dword check before we start submitting. * Build spinner batch in a way we can skip store dword when not needed so we can run on SandyBridge. v9: * Fix wait on spinner. * More tweaks to accuracy test. v10: * Dropped accuracy subtest changes due problems with RT thread and tasklet submission. v11: * Use READ_ONCE. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # IRC
2018-03-26tests/gem_eio: Speed up test executionTvrtko Ursulin3-55/+189
If we stop relying on regular GPU hangs to be detected, but trigger them manually as soon as we know our batch of interest is actually executing on the GPU, we can dramatically speed up various subtests. This is enabled by the pollable spin batch added in the previous patch. v2: * Test gem_wait after reset/wedge and with reset/wedge after a few predefined intervals since gem_wait invocation. (Chris Wilson) v3: Chris Wilson: * Decrease short test to 1us. * Use POSIX timers instead of signals to avoid interrupting gem_wait. * Improve comment. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-26lib/dummyload: Add pollable spin batchTvrtko Ursulin7-43/+175
Pollable spin batch exports a spin->running pointer which can be checked by dereferencing it to see if the spinner is actually executing on the GPU. This is useful for tests which want to make sure they do not proceed with their next step whilst the spinner is potentially only being processed by the driver and not actually executing. Pollable spinner can be created with igt_spin_batch_new_poll or __igt_spin_batch_new_poll, after which igt_spin_busywait_until_running can be used to busy wait until it is executing. v2: * Move READ_ONCE to igt_core. * Add igt_spin_busywait_until_running. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-03-23meson: Chamelium depends on GSLDaniel Stone1-1/+1
Chamelium support requires igt_frame to be built, which requires both GSL and Pixman. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-03-23igt/gem_ctx_switch: Measure qlen for timing loopsChris Wilson1-3/+40
Some platforms may execute the heavy workload very slowly, such that using a batch of 1024 takes tens of seconds and immediately overrunning the 5s timeout on a pass. Added up over a few dozen passes, this turns a 120 second test into 10 minutes. Counter this by doing a warmup loop to estimate the appropriate queue len for timing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2018-03-23intel-ci: Add full-suite test round blacklistPetri Latvala2-0/+82
The list of regular expressions for tests that are not to be run in sharded full test suite rounds, copied from https://intel-gfx-ci.01.org/blacklist.txt Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-03-23intel-ci: Document purpose of fast-feedback.testlistPetri Latvala1-14/+8
Original text was written before shard runs existed. Removed the criteria for testlist contents; The list is still strictly controlled, but additions/removals will be considered case-by-case. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-03-23intel-ci: Document meta.testlistPetri Latvala1-0/+8
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
2018-03-22igt/gem_measure_ring_size_inflight: Measure smallest inflight ring sizeAntonio Argenziano6-21/+42
Some tests measure the render's ring size but are actually meant to measure the smallest across all engines. This patch adds measuring the smallest size in gem_measure_ring_size_inflight() given the appropriate parameter. v2: - Only expose high level API. (Chris) v3: - Use ALL_ENGINES macro. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>