[Intel-gfx] [PATCH 9/9] drm/i915: Disallow direct CPU access to stolen pages for relocations
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 10 11:54:33 UTC 2016
As we cannot access the backing pages behind stolen objects, we should
not attempt to do so for relocations.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index aef7408f7fbd..d12336dac0b0 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -283,6 +283,9 @@ static void eb_destroy(struct eb_vmas *eb)
static inline int use_cpu_reloc(struct drm_i915_gem_object *obj)
{
+ if (!i915_gem_object_has_struct_page(obj))
+ return false;
+
if (DBG_USE_CPU_RELOC)
return DBG_USE_CPU_RELOC > 0;
--
2.8.1
More information about the Intel-gfx
mailing list