summaryrefslogtreecommitdiff
path: root/tests/gem_exec_lut_handle.c
AgeCommit message (Collapse)Author
2018-02-23igt: Use lib gem_execbuf where possibleAntonio Argenziano
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>
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-02igt: Mass conversion to to_user_pointer()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-16gem_exec_lut_handle: Fix presumed_offset to force relocation on full-ppgttChris Wilson
If the object is at offset 0, quite likely using full-ppgtt, then the presumed_offset set also to 0 causes the relocation to be skipped. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-12Replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with gem_mmap__{cpu,gtt,wc}()Ville Syrjälä
gem_mmap__{cpu,gtt,wc}() already has the assert built in, so replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with it. Mostly done with coccinelle, with some manual help: @@ identifier I; expression E1, E2, E3, E4, E5, E6; @@ ( - I = __gem_mmap__gtt(E1, E2, E3, E4); + I = gem_mmap__gtt(E1, E2, E3, E4); ... - igt_assert(I); | - I = __gem_mmap__cpu(E1, E2, E3, E4, E5); + I = gem_mmap__cpu(E1, E2, E3, E4, E5); ... - igt_assert(I); | - I = __gem_mmap__wc(E1, E2, E3, E4, E5); + I = gem_mmap__wc(E1, E2, E3, E4, E5); ... - igt_assert(I); ) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-09Make gem_mmap__{cpu,gtt,wc}() assert on failureVille Syrjälä
Rename the current gem_mmap__{cpu,gtt,wc}() functions into __gem_mmap__{cpu,gtt,wc}(), and add back wrappers with the original name that assert that the pointer is valid. Most callers will expect a valid pointer and shouldn't have to bother with failures. To avoid changing anything (yet), sed 's/gem_mmap__/__gem_mmap__/g' over the entire codebase. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-09Sprinkle igt_assert(ptr) after gem_mmap__{cpu,gtt,wc}Ville Syrjälä
Do the following ptr = gem_mmap__{cpu,gtt,wc}() +igt_assert(ptr); whenever the code doesn't handle the NULL ptr in any kind of specific way. Makes it easier to move the assert into gem_mmap__{cpu,gtt,wc}() itself. Mostly done with coccinelle, with some manual cleanups: @@ identifier I; @@ <... when != igt_assert(I) when != igt_require(I) when != igt_require_f(I, ...) when != I != NULL when != I == NULL ( I = gem_mmap__gtt(...); + igt_assert(I); | I = gem_mmap__cpu(...); + igt_assert(I); | I = gem_mmap__wc(...); + igt_assert(I); ) ...> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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-05-03igt/gem_exec_lut_handle: Force slow relocation pathChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-14igt/gem_exec_lut_handle: Hide exec latencyChris Wilson
The first test tries to rewrite relocations in an active batch, which is a useful test and measurement. However, the overhead of the exec may dominate and so we want a measurement without that overhead as well. Using a pool of batches should allow for the oldest to idle whilst we setup the next (and so the wait should be non-existent). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-08igt/gem_exec_lut_handle: Put some operations back!Chris Wilson
In order to force relocations, we have to remember to clear the presumed offsets that get filled in by each pass. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-08igt/gem_exec_lut_handle: Trim a few operations from submissionChris Wilson
Move all the execbuffer construction upfront and do it once per round, rather than per relocation pass. It helps reduce runtime, but more importantly it removes the test overhead from out of the kernel measurement. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-30Revert "tests/gem_exec_lut_handle"Chris Wilson
This reverts commit a5934091b84e3f8804fb3fed35374c5a976dd07e. Unnerf igt/gem_exec_lut_handle. Sadly completely breaking the measurement is not a good excuse to hide regressions.
2015-03-23tests/gem_exec_lut_handleDaniel Vetter
Reduce default number of repeats a lot. High repeat count is only useful for microbenchmarking, not that much for regression testing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87131 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-12-04tests: add more test descriptionsThomas Wood
Add more test descriptions based on exiting comments. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-05-15gem_exec_lut_handle: Do a warm up pass before timingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14tests: sprinkle igt loggingDaniel Vetter
All the cases that simply dump some debug information and couldn't be converted to some of the fancier macros. Some information output removed when it's redundant with the subtest status. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10tests: fixup igt_simple_main falloutDaniel Vetter
Oops, I should look at compilier warnings a bit better. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10tests: roll out igt_simple_init/igt_simple_mainDaniel Vetter
Also use igt_skip a bit more to simplify some of the tests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14gem_exec_lut_handle: Use linear regression analysisChris Wilson
Simultaneously make the results more robust and compact by performing a linear regression to compute the amount of time required to perform the exec array walk and the relocations.
2013-08-13tests: s/assert/igt_assertDaniel Vetter
Just a wholesale rollout for now, we can refine later on. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12s/drmtest_/igt_/Daniel Vetter
Requested-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12tests: use drmtest_skip to check for ringsDaniel Vetter
To simplify things add a set of gem_check_<ring> functions which take care of this. Since I've opted for static inlines drmtest.h grew a few more header includes which was a neat opportunity to dump a few redundant #defines. This kills all the skipped_all hand-rolled logic we have. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-18tests: Black list tests we don't want to run on simulationDamien Lespiau
Let's start by a small set of tests, to eventually consider running more. The current list should then be: gem_mmap gem_pread_after_blit gem_ring_sync_loop gem_ctx_basic gem_pipe_control_store_loop gem_storedw_loop_render gem_storedw_loop_blt gem_storedw_loop_bsd gem_render_linear_blits gem_tiled_blits gem_cpu_reloc gem_exec_nop gem_mmap_gtt v2 add (Daniel Vetter) gem_exec_bad_domains gem_exec_faulting_reloc gem_flink gem_reg_read gem_reloc_overflow gem_tiling_max_stride prime_* Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-01-17tests/gem_lut_handle: Limit testing LUT interface to recent kernelsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17tests: Benchmark new API for using a LUT with the execbufferChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>