diff options
author | Antonio Argenziano <antonio.argenziano@intel.com> | 2020-01-29 11:29:14 -0800 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-01-29 21:11:08 +0000 |
commit | add505d102f5d27e38cb4d926524664e161c2a1a (patch) | |
tree | 6722964f2408f569b3c66c50ee9018b258697815 /tests/i915/gem_exec_flush.c | |
parent | c4cc49f31077dc89e403abc3c45bc3c99b182a6a (diff) |
i915/gem_exec_flush: Require mapapble aperture when needed
The test goes through multiple mapping so require mappable aperture when
going through GTT. Also use any coherent mapping not just GTT.
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/gem_exec_flush.c')
-rw-r--r-- | tests/i915/gem_exec_flush.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/i915/gem_exec_flush.c b/tests/i915/gem_exec_flush.c index 28708460..778bc18c 100644 --- a/tests/i915/gem_exec_flush.c +++ b/tests/i915/gem_exec_flush.c @@ -152,9 +152,10 @@ static void run(int fd, unsigned ring, int nchild, int timeout, I915_GEM_DOMAIN_WC, I915_GEM_DOMAIN_WC); - /* Prepara a mappable binding to prevent pread mighrating */ + /* Prepare a mappable binding to prevent pread migrating */ if (!snoop) { - ptr = gem_mmap__gtt(fd, obj[0].handle, 4096, PROT_READ); + ptr = gem_mmap__device_coherent(fd, obj[0].handle, 0, + 4096, PROT_READ); igt_assert_eq_u32(ptr[0], 0xabcdabcd); munmap(ptr, 4096); } @@ -357,6 +358,9 @@ static void batch(int fd, unsigned ring, int nchild, int timeout, { const int gen = intel_gen(intel_get_drm_devid(fd)); + if (mode == BATCH_GTT) + gem_require_mappable_ggtt(fd); + if (flags & CMDPARSER) { int cmdparser = -1; drm_i915_getparam_t gp; |