summaryrefslogtreecommitdiff
path: root/tests/gem_exec_faulting_reloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gem_exec_faulting_reloc.c')
-rw-r--r--tests/gem_exec_faulting_reloc.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/gem_exec_faulting_reloc.c b/tests/gem_exec_faulting_reloc.c
index 40438f06..303f2d80 100644
--- a/tests/gem_exec_faulting_reloc.c
+++ b/tests/gem_exec_faulting_reloc.c
@@ -60,18 +60,9 @@
static void *
mmap_bo(int fd, uint32_t handle)
{
- struct drm_i915_gem_mmap_gtt arg;
void *ptr;
- int ret;
-
- memset(&arg, 0, sizeof(arg));
-
- arg.handle = handle;
- ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &arg);
- assert(ret == 0);
- ptr = mmap(0, 4096, PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, arg.offset);
+ ptr = gem_mmap(fd, handle, 4096, PROT_READ | PROT_WRITE);
assert(ptr != MAP_FAILED);
return ptr;