summaryrefslogtreecommitdiff
path: root/tests/gem_exec_whisper.c
AgeCommit message (Collapse)Author
2017-10-19lib/i915: Move submission related helpers to lib/i915/gem_submissionMichał Winiarski
Since I accidentally broke the build for some, by putting the pretty printer for submission inside ifdef HAVE_PROCPS, it's time to move the whole thing into lib/i915 while fixing this mistake. Let's also rename the pretty printer and add a doc to it as well as the section. Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-17lib/i915: Extract context priority setparam to a helperMichał Winiarski
Another example of something that is used across different tests, and should be moved to lib. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib/i915: Extract helpers for determining scheduler capabilitiesMichał Winiarski
Couple of tests are using either determining scheduler capabilities or pretty printing. Let's move those to helpers in lib. We can also keep the value obtained from getparam static. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib: Extract helpers for determining submission methodMichał Winiarski
Couple of tests are using either determining submission method, or pretty printing. Let's move those to helpers in lib. v2: s/igt_show/gem_show Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
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-05-18lib: Refactor testing for ability to use MI_STORE_DATA_IMMChris Wilson
Rather than have the code in multiple locations, put a copy in lib/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-08igt/gem_exec_whisper: Move the require(gen>5) out of the childChris Wilson
Don't perform igt_require() in children, it only angers igt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-05igt/gem_exec_whisper: Extend test patterns with a synchronous variantChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-24Improve utilisation of igt_debugfs_dir()Chris Wilson
As we can export igt_debugfs_dir() to cache the path to our debugfs directory, encourage a few more users to take advantage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-23igt/gem_exec_whisper: Do context requirement check in parentChris Wilson
Don't do igt_require() from child processes, igt doesn't like that. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22igt: Start marking up GEM tests that require an alive GPU to functionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-04igt: intel_gen(intel_gen()) eekChris Wilson
Painfully obvious afterwards. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-03igt: Skip MI_STORE_DWORD_IMM on gen2Chris Wilson
On gen2 MI_STORE_DWORD_IMM operates on a physical, not virtual, address i.e. we can't use it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-02igt: Mass conversion to to_user_pointer()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-05igt/gem_exec_whisper: Tweaking the global seqno is not multiuser safeChris Wilson
If we want to advance the seqno, we need to coordinate with all possible users. The kernel doesn't want to do that for a lowlevel debug feature, so it's up to userspace not to shoot itself in the foot. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-01igt/gem_exec_whisper: Hang injectionChris Wilson
Now will even more evilness. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-12igt/gem_exec_whisper: Add competing child processesChris Wilson
Execute the test in parallel in order to exercise a failure condition in reordering requests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-08igt/gem_exec_nop: Show more timing detailsChris Wilson
Min, average, exclude the post-exec sync time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-22lib/sysfs: Provide a convenience function for reading a boolChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-22igt/gem_exec_nop: Display submission mechanismChris Wilson
Useful for confirmation when testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-03igt/gem_exec_whisper: Preallocate locations in GTT for whisperChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-17tests: Push igt_fork/stop_hang_detector into fixturesDaniel Vetter
It access hardware, hence why the simple igt_only_list_subtests() check from igt_fork/stop_signal_helper() isn't enough. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-06-04igt/gem_exec_whisper: Another twist on engine interchangeChris Wilson
Slightly less extreme than switching engines between commands, switch engines between pixels. This helps contrast the request amalgamation in execlists. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-02Mark up a few more execbuf tests with automatic fail for missed-interruptsChris Wilson
Too many interrupts missed being ignored. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-20igt/gem_exec_whisper: Exclude from BATChris Wilson
At its heart gem_exec_whisper is a race detector between submission between multiple rings and the execution. It is made even more unreliable by debug kernels making it nigh impossible to submit batches faster than the GPU can execute. As such, it's relevance for BAT is dubious. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-12lib/igt_aux: Polish docs for igt_interruptibleDaniel Vetter
- Give __ prefix to internal funcstion and structs, only igt_interruptible is used by tests. - Move docs to igt_interruptible and adjust. - Explain more clearly how the timeout is getting doubled each iteration until no more interruptions happen. Also rename the argument to give it a more meaningful name in the docs. - Link from other functions to this one for cross-referencing. - Rename to igt_do_interruptible to make it clearer it's a loop, inspired by do {} while () loops. v2: Rename instead to igt_while_interruptible and fix typos (Chris). And add gtk-doc for igt_ioctl, too. Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-26igt/gem_exec_whisper: Add simple interruptible passChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-26igt/gem_exec_whisper: Check for inconsistent reloc offset vs object offsetChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-24lib: Add a GPU error detectorChris Wilson
If we listen to the uevents from the kernel, we can detect when the GPU hangs. This requires us to fork a helper process to do so and send a signal back to the parent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21igt/gem_exec_whisper: Tweak migration loggingChris Wilson
reloc.presumed_offset == -1 => implies we hit the fallback path and not that we strictly needed to patch the relocation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21igt/gem_exec_whisper: Prevent MI_STORE_DWORD on gen6/bsd againChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19igt/gem_exec_whisper: Add interruptibles testsChris Wilson
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-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_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-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/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-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>