aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2016-08-18 17:16:54 +0100
committerChris Wilson <[email protected]>2016-08-18 22:36:47 +0100
commit9e53d9be0d9e09f834d3bdfccafb8330f2597e6c (patch)
tree33589b0d316fb2c4146bfb43acddde37f790c51d
parente8cb909ac3abbcac5184825638903a2b9a225725 (diff)
drm/i915: Disallow direct CPU access to stolen pages for relocations
As we cannot access the backing pages behind stolen objects, we should not attempt to do so for relocations. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index c970aabfffa3..98d5aa5e0a34 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;