summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-19igt/gem_concurrent_blit: Enable quicker interruptible testingChris Wilson
Use the igt_sigiter interface to only repeat the -interruptible tests when we can make further progress with another change at injecting a signal. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19lib/igt_aux: Divert ioctls for signal injectionChris Wilson
To simplify and speed up running interruptible tests, use a custom ioctl() function that control the signaling and detect when we need no more iterations to trigger an interruption. We use a realtime timer to inject the signal after a certain delay, increasing the delay on every loop to try and exercise different code paths within the function. The first delay is very short such that we hopefully enter the kernel with a pending signal. Clients should use struct igt_sigiter iter = {}; while (igt_sigiter_repeat(&iter, enable_interrupts=true)) do_test() to automatically repeat the test until we can inject no more signals into the ioctls. This is condensed into a macro igt_interruptible(enable_interrupts=true) do_test(); for convenience. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19lib: Replace drmIoctl() with a layer of indirectionChris Wilson
Insted of calling drmIoctl() directly, call igt_ioctl() instead. In the normal scenario this is function pointer that calls drmIoctl() (so no penalty), but allows us to divert ioctls into our own routines for nefarious purposes. One such purpose will be to control interrupt generation into the ioctl, to be able to detect when we successfully interrupt the ioctl and when we no longer need more interrupts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19lib/tests: More igt_subtest_group checksDaniel Vetter
... for some cases discussed with Chris on irc. We seem to get them all right. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-03-19lib: Fix some doc warningsDaniel Vetter
Cc: Marius Vlad <marius.c.vlad@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-03-19tests/gem_concurrent_blt|all: Use igt_subtest_groupDaniel Vetter
Looks tidy again, and doesn't break igt assumptions. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-19lib: Add igt_subtest_groupDaniel Vetter
Useful for creating common setup code in igt_fixture which is only needed by a subset of tests. And since I'm a good citizen it comes with a library testcase/example included. v2: Make testcase nastier to ensure a subtest group SKIPS when it's parent is skipping already. I accidentally got this right, but let's make sure. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-03-18prime_mmap_coherency: Add return error tests for prime sync ioctlTiago Vignatti
This patch adds ioctl-errors subtest to be used for exercising prime sync ioctl errors. The subtest constantly interrupts via signals a function doing concurrent blit to stress out the right usage of prime_sync_*, making sure these ioctl errors are handled accordingly. Important to note that in case of failure (e.g. in a case where the ioctl wouldn't try again in a return error) this test does not reliably catch the problem with 100% of accuracy. v2: fix prime sync direction when reading mmap'ed file. v3: change the upper bound using time rather than loops Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com> [ickle: fix memleak, run for longer]
2016-03-18intel: Adding missing Broxton PCI IDs.Rodrigo Vivi
These IDs were already part of the kernel since: kernel commit 985dd4360fdf2533fe48a33a4a2094f2e4718dc0 Author: Imre Deak <imre.deak@intel.com> Date: Thu Jan 28 16:04:12 2016 +0200 drm/i915/bxt: update list of PCIIDs Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
2016-03-18igt/gem_concurent_blit: Exercise different object sizesChris Wilson
Searching for coherency problems that may arise with smaller-then-cache/large-then-cache objects. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-18lib/ioctl_wrappers: Explain a couple of igt_require(ret == 0)Chris Wilson
Use more verbose igt_require(), here assocaited with SET_CACHING, such that the requirements are explained in the debug/failure log. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-18lib/intel_os: Squelch dmesg spam when purging VM cachesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-18igt/gem_concurrent_all: struct buffers for allChris Wilson
Now that we started packaging all parameters in one handy struct, pass them everywhere. This allows us to pass along requirements so that we can perform the checks inside each indvidual subtest and so not anger the igt gods. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-18igt/gem_softpin: Repeat tests with signal interruptionsChris Wilson
For the long running tests probing error conditions, throwing in the signal interruptions is a good idea. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-17lib/igt_gt: Handle SIGINT whilst writing to i915_error_stateChris Wilson
Becareful in case we try and eat the error state whilst interrupts are being sent and repeat the write() until we finish uninterrupted. References: https://bugs.freedesktop.org/show_bug.cgi?id=94573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-17igt/gem_exec_whisper: Move testing of "default" engine to standaloneChris Wilson
Exclude the symbolic "default" engine from the interengine sync testing, and move it onto the standalone testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16tests/pm_rps: Fix assert for sysfs writesVille Syrjälä
fprintf() returns a negative value on error. Fix the assert to catch that. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-03-15igt/drv_module_reload_basic: Pass correct inject_load_failure module optionImre Deak
The latest version of the inject_load_failure module option expects the number of the checkpoint where the failure should be injected, so adjust the test accordingly. Signed-off-by: Imre Deak <imre.deak@intel.com>
2016-03-15tests/gem_evict_alignment: use uint64_t in eviction memory parametersMika Kuoppala
With large apertures we need to use uint64_t for counts and sizes. commit 0e2071411a4d4e1488a821daf522dffde2809e03 paved way for this but forgot to change the subtest parameters. v2: Pass correctly to the copy() also (Chris) References: https://bugs.freedesktop.org/show_bug.cgi?id=93849 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2016-03-15lib/igt_kms: Add COMMIT_ATOMIC to igt_display_commit2()Mayuresh Gharpure
Co-Author : Marius Vlad <marius.c.vlad@intel.com> Co-Author : Pratik Vishwakarma <pratik.vishwakarma@intel.com> So far we have had only two commit styles, COMMIT_LEGACY and COMMIT_UNIVERSAL. This patch adds another commit style COMMIT_ATOMIC which makes use of drmModeAtomicCommit() v2: (Marius) i)Set CRTC_ID to zero while disabling plane ii)Modified the log message in igt_atomic_prepare_plane_commit https://patchwork.freedesktop.org/patch/71945/ v3: (Marius)Set FB_ID to zero while disabling plane https://patchwork.freedesktop.org/patch/72179/ v4: (Maarten) Corrected the typo in commit message https://patchwork.freedesktop.org/patch/72598/ v5: Added check for DRM_CLIENT_CAP_ATOMIC in igt_display_init (Marius) i)Removed unused props from igt_display_init ii)Removed unused ret. Changed function to void iii)Declare the variable before checking if we have DRM_CLIENT_CAP_ATOMIC. https://patchwork.freedesktop.org/patch/73505/ v6: (Jani) Corrected typo in commit message v7: Added is_atomic check for DRM_CLIENT_CAP_ATOMIC in igt_display_init and igt_atomic_commit v8: (Matthew Auld) Replaced for loops by for_each_connected_output and for_each_plane_on_pipe (Lionel) Populate properties only if the value has changed Remove the resetting of values in disable case Note : I've used Maarten's diff patch v9: (Lionel) Added resetting of rotation property v10: (Marius) Modified the macro declaration to avoid shadow declaration warning, also removed one unused variable Signed-off-by: Mayuresh Gharpure <mayuresh.s.gharpure@intel.com> Signed-off-by: Pratik Vishwakarma <pratik.vishwakarma@intel.com> Signed-off-by: Mayuresh Gharpure <mayuresh.s.gharpure@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-03-15igt/gem_bad_reloc: Rename conflicting negative-reloc-bltChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-15igt/gem_exec_whisper: Beware PIN_HIGHChris Wilson
Certain kernels/gen like to move execbuf around for relocations, disrupting our prewritten batches. Be more careful and try and keep the relocation/execobjects accurate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14igt/gem_bad_reloc: Fix handling of 64bit relocationsChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94537 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14drv_module_reload_basic: skip alive check after load failure injectionImre Deak
After loading the module with load failure injection enabled don't try check the alive state. Also limit the number of failure points to existing ones, to reduce the run time of the test. v2: - make VT binding/snd module loading part of reload and VT bind fail silently (Chris) Signed-off-by: Imre Deak <imre.deak@intel.com>
2016-03-14igt/gem_exec_nop: Decrease BAT timingChris Wilson
For basic, since CI doesn't hit the same hard lockup on Braswell that is possible without hpet, stop running for so long! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14igt/gem_exec_whisper: Exercise rings individuallyChris Wilson
Not as stressful as testing inter-ring synchronisation, but it does allow inspecting the simpler testcases if need be. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14lib: Remove dead gem_get_num_rings()Chris Wilson
No users so time to die. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14igt/gem_exec_reloc: Exercise updating relocations of an active objectChris Wilson
Supersedes gem_dummy_reloc_loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14tests/gem_ring_sync_loop: Exercise all ringsChris Wilson
Fix the engine selection to exercise all possible rings and in doing so completely obsoletes gem_multi_bsd_sync_loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14lib: Remove unused gem_has_enable_ring()Chris Wilson
No one uses this nor should they as it just gem_get_param() in disguise and they are better feature queries for whether individual execution engines are functional. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-12igt/gem_exec_whisper: Persistent relocation supportChris Wilson
The goal is to test interengine synchronisation so remove any likelihood that we introduce synchronisation for performing relocations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/drv_module_reload_basic: Rinse and repeat with addition module parametersChris Wilson
An idea for testing failure paths along module load is to use a parameter to perform fault injection. This rudimentary framework should get us started. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/gem_exec_whisper: Test submission between fdsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/gem_exec_whisper: Stop passing NO_RELOCChris Wilson
We don't preserve the execobj.offset nor set the right values into the batches between iterations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11igt/gem_exec_whisper: Don't forget that 0 is a valid address on full-ppgttChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-11benchmarks/gem_syslatency: Add extra android guard to attr_setaffinity_npDerek Morton
Android defines __USE_GNU but does not provide pthread_attr_setaffinity_np() so added an extra guard arround pthread_attr_setaffinity_np(). Signed-off-by: Derek Morton <derek.j.morton@intel.com>
2016-03-11tests: Add gem_exec_whisperChris Wilson
A more complicated store variant to stress inter-engine dependencies (i.e. semaphores and sync). We write a control value from one batch into the next and then execute it. This is repeated a few times with each execution happening on a different engine (so the kernel has to serialise operations between engines) until we finally write the value out into our scratch buffer where we can check the result, just like a Chinese whisper. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/gem_exec_nop: Fix logical inversion for checking of valid execbufChris Wilson
Only if the trial __gem_execbuf reports an error do we want to remove the fancy LUT flags. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10benchmarks/gem_syslatency: Guard setaffinity_npChris Wilson
pthread_setaffinity_np is a GNU extensions, so add some __USE_GNU ifdeffry and hope for the best if unavailable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/gem_reloc_overflow: 32bit compilation warningChris Wilson
gem_reloc_overflow.c: In function ‘__real_main365’: gem_reloc_overflow.c:384:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘size_t’ [-Wformat=] igt_require_f(mlock(reloc, reloc_size) == 0, ^ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/gem_concurrent_blit: 32bit compilation warningChris Wilson
gem_concurrent_all.c: In function ‘__real_main1556’: gem_concurrent_all.c:1642:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint64_t’ [-Wformat=] igt_debug("Pinning %ld MiB\n", pin_sz); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10igt/drv_hangman: 32bit compilation warningChris Wilson
drv_hangman.c: In function ‘hangcheck_unterminated’: drv_hangman.c:290:27: warning: integer overflow in expression [-Woverflow] int64_t timeout_ns = 100 * NSEC_PER_SEC; /* 100 seconds */ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10benchmarks/gem_syslatency: Subtract the clock_gettime() overheadChris Wilson
Since clock_gettime() should be a fixed overhead that adds to the latency result, subtract it from the result. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10benchmarks/gem_syslatency: Prevent CPU sleeps (C-states)Chris Wilson
In order to keep the latency as low as possible for the idle load, we need to keep the CPU awake. Otherwise we end up with the busy workload having lower latency than the idle workload! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-10benchmarks/gem_syslatency: Measure unloaded latencyChris Wilson
Also useful to know how much worse than baseline the latency is when the gem load is applied. For slower systems, presenting in nanoseconds makes it hard to read, so switch to microseconds for output. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-09benchmarks: Add gem_syslatencyChris Wilson
Instead of measuring the wakeup latency of a GEM client, we turn the tables here and ask what is the wakeup latency of a normal process competing with GEM. In particular, a realtime process that expects deterministic latency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-09igt/gem_exec_nop: Only combine unique ringsChris Wilson
Ignore the default ring as that is purely symbolic. On BSD2 systems it is similarly useful to ignore the symbolic BSD ring. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-09tests/gem_reloc_overflow: Add missing igt_fixtureDaniel Vetter
Boom when running with --list on non-intel machines or as non-root. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-09lib: remove saved_sig_maskDaniel Vetter
Oversight from the exit handler cleanup, spotted by Chris Wilson. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-09igt/gem_exec_store: The simplest batch that does something!Chris Wilson
A very simple, the simplest!, batch that can execution on any known engine that just writes a value into memory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>