From: Chris Wilson Date: Tue, 12 Aug 2014 19:05:50 +0000 (+0100) Subject: drm/i915: Suppress a WARN on reading an object back for a GPU hang X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=87a01e822db6e8b6a2898ddc7f116698247c7a4d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Suppress a WARN on reading an object back for a GPU hang Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 726e6b171505..1e05414c6406 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -577,7 +577,10 @@ i915_error_object_create(struct drm_i915_private *dev_priv, if (dst == NULL) return NULL; - dst->gtt_offset = i915_gem_obj_offset(src, vm); + if (i915_gem_obj_bound(src, vm)) + dst->gtt_offset = i915_gem_obj_offset(src, vm); + else + dst->gtt_offset = -1; reloc_offset = dst->gtt_offset; use_ggtt = (src->cache_level == I915_CACHE_NONE &&