summaryrefslogtreecommitdiff
path: root/tests/gem_exec_nop.c
AgeCommit message (Collapse)Author
2018-02-07lib: Move __gem_context_create to common ioctl wrapper library.Antonio Argenziano
This patch adds a context creation ioctl wrapper that returns the error for the caller to consume. Multiple tests that implemented this already, have been changed to use the new library function. v2: - Add gem_require_contexts() to check for contexts support (Chris) v3: - Add gem_has_contexts to check for contexts support and change gem_require_contexts to skip if contests support is not available. (Chris) v4: - Cosmetic changes and use lib function in gem_ctx_create where possible. (Michal) v5: - Use gem_contexts_require() in tests and fixtures. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-11tests: Use igt_device_set_masterChris Wilson
A few tests only require DRM_MASTER privileges for a subset of gen or tests, and so open the device as normal and conditionally call drmSetMaster. Translate these over to using igt_device_set_master(), which includes a bit more debugging for when it fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-11-29igt: Remove Android supportArkadiusz Hiler
This patch gets rid of the Android support, deleting all the hacks and moving code around to the places it belongs. Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate. It's a good time to drop the illusion of providing any support. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Kalyan Kondapally <kalyan.kondapally@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-10-25igt/gem_exec_nop: Headless requires DRM_MASTER for modesettingChris Wilson
Since the headless subtest wants to compare execution latency of a headless mode vs a single head, it needs to be able to do a modeset and ergo it requires DRM_MASTER. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
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-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-06-07tests/gem_exec_nop: Rename signal() to fence_signal()Arkadiusz Hiler
Unfortunately <signal.h> is included through some obscure dependencies when using bionic, so we have a name clash on signal(). Changed the test function name to fence_signal() to avoid this, but left the test cases names unchanged. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07tests/gem_exec_nop: Disable headless subtest on cairoless AndroidArkadiusz Hiler
Currently whole igt_kms.c is disabled while compiling on Android without cairo, so this tests does not compile. There should be cleaner a way to disable only cairo dependant parts which should allow us to enable at least some of the KMS tests, but that's a bigger rework for another time. v2: simplified #ifs on CAIRO/ANDROID (P. Latvala) Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-05-31lib: Moving gem_execbuf_wr to ioctl_wrappersLukasz Fiedorowicz
gem_execbuf_wr was duplicated in multiple places. Moving everything to lib/ Signed-off-by: Lukasz Fiedorowicz <lukasz.fiedorowicz@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-05-13igt/gem_exec_nop: Restore check on available signal ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-12igt/gem_exec_nop: Include the impact of signaling a fenceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-19igt/gem_exec_nop: Add some output to headless subtestChris Wilson
Report the measurements as we make them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-19igt/gem_exec_nop/headless: Verify GT performance in headless modeTvrtko Ursulin
Check that no-op execution speed is the same in headless mode and with the display active. v2: * Set graphics mode for the test to disable blanking. (Imre) * Use igt stats framework as suggested by Chris. v3: * Rename variable names for clearer assert. * Simplify by using I915_EXEC_DEFAULT. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100572 Cc: Imre Deak <imre.deak@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-03-21igt/gem_exec_nop: Sync before measuring total elapsed timeChris Wilson
The systematic error should be lost in the millions of cycles, but better pedagogically correct. Signed-off-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-01-22igt/gem_exec_nop: Watch interprocess switchingChris Wilson
Like a lightweight unchecking gem_exec_whisper, but the simplicity helps looking for driver overhead and stressing the ordering. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-20igt/gem_exec_nop: Watch inter-ring synchronisation overheadChris Wilson
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-18igt: Trim timeouts for basic GEM testsChris Wilson
It's a compromise between detecting an unlikely timing error in one test and being able to run a broader selection of tests. I hope this is wise. 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-09-08igt/gem_exec_nop: Refine the target calculationChris Wilson
The ideal execution time cannot be faster than the fastest ring! If all other rings were infinitely fast, the seed would be max/nengine. Given each is finite, this puts a floor on the ideal execution time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-08igt/gem_exec_nop: Check submitting nops to each engine in parallelChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-08igt/gem_exec_nop: Relax assertion for parallel executionChris Wilson
In an ideal world, we should be able to execute on every engine in parallel and the single limiting factor would be how fast the GPU can execute. Due to the serialisation in execbuf, we would lockstep with execution to the slowest engine and so would execute the same number of cycles on each. However in CI, we are limited by how fast the driver is, particularly under invasive debugging. This makes asserting that the average time == max/nengine impossible, and reveals that the assertion is impossible to meet under general condition. It's an impractical regression test. Therefore we relax the assertion to only detect should something critically fail. Worst case behaviour is presumed that each ring runs sequentially, and so running N rings in parallel should take no longer than running N rings serially. (Pathologically it can be even slower if no batching on the rings occur). 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-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-04-22igt/gem_exec_nop: Apply missed interrupt detectionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-18igt/gem_exec_nop: Fix time units for assertion printfChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-15igt/gem_exec_nop: Correct %3.f typoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-14igt/gem_exec_nop: Explain the parallel execution assertionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-28igt/gem_exec_nop: Relax parallel assertion for short ringsChris Wilson
On bdw, the render ring becomes full and limits dispatch across all rings. Adjust the expected latency to take this into account. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-28igt/gem_exec_nop: Add expectancy of independent execution between enginesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-25igt/gem: Add GPU hang detection to basic testsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-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-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-08igt/gem_exec_nop: Add a basic testChris Wilson
Demonstrate how trivial it is to lockup Braswell, at least my N3050 nuc, by saturating the interrupt handler with a few requests. References: https://bugs.freedesktop.org/show_bug.cgi?id=93467 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_exec_nop: Use common array of ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-16igt/gem_exec_nop: Restore SLOW_QUICK loop terminatorChris Wilson
The upper bound for SLOW_QUICK was added for the benefit of the slow simulator, not because, as I wrongly thought, of the latency measurements. SLOW_QUICK was added in commit d1e862324b747a0ab5d985eaa6830076817231c5 Author: Damien Lespiau <damien.lespiau@intel.com> Date: Mon Mar 25 20:06:20 2013 +0000 tests: Instrument tests run in simulation to run quickly and dropped in commit 89bcdb9022fb7a1f66635b9f2546356ad0c0761a Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Dec 8 13:42:50 2015 +0000 igt/gem_exec_nop: Remove nop latency measurements Reported-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-08igt/gem_exec_nop: Remove nop latency measurementsChris Wilson
Since commit c8beadb811bdc2b9c21f95144852f3e55867b546 Author: Derek Morton <derek.j.morton@intel.com> Date: Wed Nov 11 14:46:58 2015 +0000 tests/gem_exec_nop: Improved test run time the stablity of the measurement regressed and it is once again no longer a reliable metric for detecting regressions. Give up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Derek Morton <derek.j.morton@intel.com>
2015-11-13tests/gem_exec_nop: Improved test run timeDerek Morton
Reduced the Sleep period to 200mS and reduced the repetition count to 7 to decrease the test run time significantly. v2: Changed uS to us v3: removed the output formatting change as the issue will be addressed in a seperate patch from Thomas Wood. v4: mS -> ms Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-01igt/gem_exec_nop: Control boost/idle frequenciesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-01igt/gem_exec_nop: Wait between runsChris Wilson
In order to keep the GPU in a consistent state between samples, we have to wait for it to fall asleep before proceeding. For fun hook up igt_stats. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26igt/gem_exec_(blt|nop): IGT magicChris Wilson
$ ./gem_exec_nop --list-subtests render bsd blt vebox gem_exec_nop: igt_core.c:946: igt_skip: Assertion `in_fixture' failed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26igt/gem_exec_(nop|blt): Repeat measurements at min/max GPU frequenciesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>