From: Chris Wilson Date: Fri, 27 Feb 2015 13:58:43 +0000 (+0000) Subject: drm/i915: Clarify obj->map_and_fenceable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e8dec1dde016258af7c8a2ce9ddfb7243176a344;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Clarify obj->map_and_fenceable For an object right on the boundary of mappable space, as the fenceable size is stricly greater than the actual size, its fence region may extend out of mappable space. Note that only pnv/g33 has fence_size > obj.size and an unmappable range in the gtt, and there alignment constraints prevent bad things from happening. Signed-off-by: Chris Wilson [danvet: Clarify why this shouldn't change anything as per the discussion on intel-gfx.] Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index be991789df2d..f8c12693f7cf 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4219,7 +4219,7 @@ i915_gem_object_pin_view(struct drm_i915_gem_object *obj, fenceable = (vma->node.size == fence_size && (vma->node.start & (fence_alignment - 1)) == 0); - mappable = (vma->node.start + obj->base.size <= + mappable = (vma->node.start + fence_size <= dev_priv->gtt.mappable_end); obj->map_and_fenceable = mappable && fenceable;