From: Chris Wilson Date: Thu, 18 Aug 2016 16:16:54 +0000 (+0100) Subject: drm/i915: Disallow direct CPU access to stolen pages for relocations X-Git-Tag: MMI-PSA29.97-13-9~5363^2~37^2~1486 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e53d9be0d9e09f834d3bdfccafb8330f2597e6c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-15-chris@chris-wilson.co.uk --- 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;