summaryrefslogtreecommitdiff
path: root/tests/gem_streaming_writes.c
AgeCommit message (Collapse)Author
2016-02-04igt/gem_streaming_writes: Set bb start alignment to 64b for IronlakeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27lib: Share common __gem_execbuf()Chris Wilson
An oft-repeated function to check EXECBUFFER2 for a particular fail condition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-16igt/gem_streaming_writes: Set the initial CPU write domainChris Wilson
Remove one assumption from the test and amek the domain management explict - when we write through the CPU to construction the batch, mark it as having been written. 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-07-28igt/gem_streaming_writes: Reorder setting EXEC_OBJECT_WRITEChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90944 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-28igt/gem_streaming_writes: Bind into the GTT earlyChris Wilson
If we are using a streaming GGTT write into the source, we need to trigger an early fault in order to obtain a mappable offset. This is required when later we start reserving execbuf object top-down to try and avoid mappable space! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-03igt/gem_streaming_writes: Reorder src/dst to avoid executing on snoopedChris Wilson
During the streaming setup, we execute a dummy batch in order to bind the objects into the GTT and query their offsets. For this, we should not use a snooped buffer for the dummy batch, or else we may anger the GPU. Given that we have a choice, use the other buffer for the dummy batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-02igt/gem_streaming_writes: Map the whole batch for CPU accessesChris Wilson
The llc cpu path only partially mapped the batch buffer so confused the CS when attempting to execute an empty batch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90809 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-20igt/gem_streaming_write: Add a variant to exercise CSChris Wilson
Another issue in streaming writes is into the batch buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-19igt/gem_streaming_writes: Remember to markup the write target!Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-19igt/gem_streaming_writes: Add more validation stepsChris Wilson
Inalcude a pre-pass to check that the non-streaming, partial writes work. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-12igt/gem_stream_writes: Use execbuf LUT to shave a few cycles off dispatchChris Wilson
Since our goal is to have concurrent read/writes of GPU buffers, we want to spend as little time in between as possible. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-12igt/gem_streaming_writes: Build in a self-testChris Wilson
Use the first pass to write all values prior to the initial execbuf to verify that the copy itself is true. Subsequent passes then focus on verifying that writing values whilst the GPU is reading from neighbouring values is then correct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-11igt/gem_streaming_writes: Trim number of batch buffers allocatedChris Wilson
Reduce memory usage for batches by a factor of 64 - which we immediately spend some of in increasing the stress. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-11igt: Add gem_streaming_writesChris Wilson
This tries to replicate the missing barrier observed when using asynchronous mmap(wc) on byt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>