Skip to content

Commit

Permalink
drm/i915: Clarify obj->map_and_fenceable
Browse files Browse the repository at this point in the history
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 <chris@chris-wilson.co.uk>
[danvet: Clarify why this shouldn't change anything as per the
discussion on intel-gfx.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Feb 27, 2015
1 parent 9a8f0a1 commit e8dec1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e8dec1d

Please sign in to comment.