summaryrefslogtreecommitdiff
path: root/tests/drv_suspend.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-10-09 19:11:39 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2015-10-12 19:57:58 +0300
commitf52e7ec7876603b4edb0bff412255f8f1624ecc4 (patch)
treec8d668fd83f6f30c52c6ee0f89921299f0ad6eed /tests/drv_suspend.c
parentb8a77dd6c8e9f73493b2f86f293ff9c06fc08049 (diff)
Replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with gem_mmap__{cpu,gtt,wc}()
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>
Diffstat (limited to 'tests/drv_suspend.c')
-rw-r--r--tests/drv_suspend.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c
index b85dd2f2..601a32ea 100644
--- a/tests/drv_suspend.c
+++ b/tests/drv_suspend.c
@@ -56,20 +56,18 @@ test_fence_restore(int fd, bool tiled2untiled, bool hibernate)
handle_tiled = gem_create(fd, OBJECT_SIZE);
/* Access the buffer objects in the order we want to have the laid out. */
- ptr1 = __gem_mmap__gtt(fd, handle1, OBJECT_SIZE, PROT_READ | PROT_WRITE);
- igt_assert(ptr1);
+ ptr1 = gem_mmap__gtt(fd, handle1, OBJECT_SIZE, PROT_READ | PROT_WRITE);
for (i = 0; i < OBJECT_SIZE/sizeof(uint32_t); i++)
ptr1[i] = i;
- ptr_tiled = __gem_mmap__gtt(fd, handle_tiled, OBJECT_SIZE, PROT_READ | PROT_WRITE);
- igt_assert(ptr_tiled);
+ ptr_tiled = gem_mmap__gtt(fd, handle_tiled, OBJECT_SIZE,
+ PROT_READ | PROT_WRITE);
if (tiled2untiled)
gem_set_tiling(fd, handle_tiled, I915_TILING_X, 2048);
for (i = 0; i < OBJECT_SIZE/sizeof(uint32_t); i++)
ptr_tiled[i] = i;
- ptr2 = __gem_mmap__gtt(fd, handle2, OBJECT_SIZE, PROT_READ | PROT_WRITE);
- igt_assert(ptr2);
+ ptr2 = gem_mmap__gtt(fd, handle2, OBJECT_SIZE, PROT_READ | PROT_WRITE);
for (i = 0; i < OBJECT_SIZE/sizeof(uint32_t); i++)
ptr2[i] = i;