summaryrefslogtreecommitdiff
path: root/tests/gem_tiled_wc.c
AgeCommit message (Collapse)Author
2015-11-03tests: Run igt.cocciDaniel Stone
Signed-off-by: Daniel Stone <daniels@collabora.com>
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-02-13lib/ioctl: gem_ prefix for igt_require_mmap_wcDaniel Vetter
We stick to the overall prefix even for magic require functions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-27igt/gem_tiled_wc: Use correct offsetsChris Wilson
A last moment "tidification" in commit 5e9fac54918e424d928bc15b90e4c65d4cfdd356 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jan 22 07:52:09 2015 +0000 igt/gem_tiled_wc: Fix! Finish! wreaked havoc again. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88816 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-22igt/gem_tiled_wc: Fix! Finish!Chris Wilson
It helps when testing whether tiled data read back through a linear mmaping to first tile the data. And not repeatedly unmapping the linear map stops it from segfaulting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88686 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06igt/gem_tiled_wc: Exercise wc mmaps with swizzlingChris Wilson
This exercises both the wc mmappings and the extended get_tiling ioctl. Userspace cannot handle bit17 swizzling through wc mmaps (because bit17 requires swizzling based on the actual physical address of the page - which is unknown to userspace) and so we need an extended get_tiling ioctl to report the actual as well as the logical swizzling on an object. We then check that the contents of the object are tiled and swizzled correctly when viewed through a wc mmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>