Skip to contentSkip to conversation

i915/gem_ctx_shared: handle mmap for discrete

PATCH Matthew Auld 1 participant 1 message Mar 31, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Matthew Auld

author Reviewed-by
#1 lore raw
Quoted 4 lines · Nirmoy Das

Make mmap play nice on discrete.

Issue: https://gitlab.freedesktop.org/drm/intel/-/issues/5451

Quoted 18 lines
---
  tests/i915/gem_ctx_shared.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
tests/i915/gem_ctx_shared.c +1 -2
index cc547b87b..eb3b024f8 100644
@@ -290,8 +290,7 @@ static void exec_shared_gtt(int i915, const intel_ctx_cfg_t *cfg,
  	execbuf.flags |= I915_EXEC_FENCE_IN;
 
  	scratch = gem_create(i915, 4096);
-	s = gem_mmap__wc(i915, scratch, 0, 4096, PROT_WRITE);
-
+	s =  gem_mmap__device_coherent(i915, scratch, 0, 4096, PROT_WRITE);
  	gem_set_domain(i915, scratch, I915_GEM_DOMAIN_WC, I915_GEM_DOMAIN_WC);
  	s[0] = bbe;
  	s[64] = bbe;