Make gem_mmap__{cpu,gtt,wc}() assert on failure

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>
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c
index 6efb977..5b8c3f0 100644
--- a/tests/gem_concurrent_all.c
+++ b/tests/gem_concurrent_all.c
@@ -171,7 +171,7 @@
 	gem_require_mmap_wc(fd);
 
 	bo = unmapped_create_bo(bufmgr, width, height);
-	bo->virtual = gem_mmap__wc(fd, bo->handle, 0, bo->size, PROT_READ | PROT_WRITE);
+	bo->virtual = __gem_mmap__wc(fd, bo->handle, 0, bo->size, PROT_READ | PROT_WRITE);
 	return bo;
 }
 
@@ -471,9 +471,9 @@
 
 	gem_set_domain(fd, src->handle, I915_GEM_DOMAIN_CPU, 0);
 	gem_set_domain(fd, dst->handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
-	s = gem_mmap__cpu(fd, src->handle, 0, size, PROT_READ);
+	s = __gem_mmap__cpu(fd, src->handle, 0, size, PROT_READ);
 	igt_assert(s);
-	d = gem_mmap__cpu(fd, dst->handle, 0, size, PROT_WRITE);
+	d = __gem_mmap__cpu(fd, dst->handle, 0, size, PROT_WRITE);
 	igt_assert(d);
 
 	memcpy(d, s, size);
@@ -490,9 +490,9 @@
 	gem_set_domain(fd, src->handle, I915_GEM_DOMAIN_GTT, 0);
 	gem_set_domain(fd, dst->handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
 
-	s = gem_mmap__gtt(fd, src->handle, size, PROT_READ);
+	s = __gem_mmap__gtt(fd, src->handle, size, PROT_READ);
 	igt_assert(s);
-	d = gem_mmap__gtt(fd, dst->handle, size, PROT_WRITE);
+	d = __gem_mmap__gtt(fd, dst->handle, size, PROT_WRITE);
 	igt_assert(d);
 
 	memcpy(d, s, size);
@@ -509,9 +509,9 @@
 	gem_set_domain(fd, src->handle, I915_GEM_DOMAIN_GTT, 0);
 	gem_set_domain(fd, dst->handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
 
-	s = gem_mmap__wc(fd, src->handle, 0, size, PROT_READ);
+	s = __gem_mmap__wc(fd, src->handle, 0, size, PROT_READ);
 	igt_assert(s);
-	d = gem_mmap__wc(fd, dst->handle, 0, size, PROT_WRITE);
+	d = __gem_mmap__wc(fd, dst->handle, 0, size, PROT_WRITE);
 	igt_assert(d);
 
 	memcpy(d, s, size);