Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ca4a250 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/i915: reject GTT domain in relocations



This confuses our domain tracking and can (for gtt write domains) lead
to a subsequent oops.

Tested by tests/gem_exec_bad_domains from i-g-t.

Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent ff865f79
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -303,8 +303,9 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj,
			  reloc->write_domain);
			  reloc->write_domain);
		return ret;
		return ret;
	}
	}
	if (unlikely((reloc->write_domain | reloc->read_domains) & I915_GEM_DOMAIN_CPU)) {
	if (unlikely((reloc->write_domain | reloc->read_domains)
		DRM_ERROR("reloc with read/write CPU domains: "
		     & ~I915_GEM_GPU_DOMAINS)) {
		DRM_ERROR("reloc with read/write non-GPU domains: "
			  "obj %p target %d offset %d "
			  "obj %p target %d offset %d "
			  "read %08x write %08x",
			  "read %08x write %08x",
			  obj, reloc->target_handle,
			  obj, reloc->target_handle,