diff options
author | Lukasz Kalamarz <lukasz.kalamarz@intel.com> | 2019-01-09 17:53:15 +0100 |
---|---|---|
committer | Lukasz Kalamarz <lukasz.kalamarz@intel.com> | 2019-01-16 13:46:35 +0100 |
commit | ef9665ceb9dd6385bd8971284f00ba4e5b6add73 (patch) | |
tree | 9409eaa2ba0fc691987463a91a86f8cde9e17d73 /lib/igt_dummyload.c | |
parent | 7caccf252df114151dbe493f961a74aa02a51e5c (diff) |
lib/igt_dummyload: use gem_mmap__cpu and gem_mmap__wc when applicable
We had some duplicates in code that are using direct call to
__gem_mmap__cpu or __gem_mmap__wc and then assert it result, which is what
gem_mmap__cpu and gem_mmap__wc is taking care for us.
v2: Rebased and reordered this patch in series
v4: Rebase
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Diffstat (limited to 'lib/igt_dummyload.c')
-rw-r--r-- | lib/igt_dummyload.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c index 2027a4b7..982906f2 100644 --- a/lib/igt_dummyload.c +++ b/lib/igt_dummyload.c @@ -148,14 +148,13 @@ emit_recursive_batch(igt_spin_t *spin, if (__gem_set_caching(fd, spin->poll_handle, I915_CACHING_CACHED) == 0) - spin->running = __gem_mmap__cpu(fd, spin->poll_handle, - 0, 4096, - PROT_READ | PROT_WRITE); + spin->running = gem_mmap__cpu(fd, spin->poll_handle, + 0, 4096, + PROT_READ | PROT_WRITE); else - spin->running = __gem_mmap__wc(fd, spin->poll_handle, - 0, 4096, - PROT_READ | PROT_WRITE); - igt_assert(spin->running); + spin->running = gem_mmap__wc(fd, spin->poll_handle, + 0, 4096, + PROT_READ | PROT_WRITE); igt_assert_eq(*spin->running, 0); *batch++ = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0); |