[Intel-gfx] [PATCH 09/22] drm/i915: Disallow direct CPU access to stolen pages for relocations
Chris Wilson
chris at chris-wilson.co.uk
Tue Aug 16 10:42:35 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 14963c9414ea..98f9945c5b1d 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