提交 49987099 编写于 作者: D Daniel Vetter

drm/i915: use vma->node directly and rewrap map&fence in bind

Use () to make for neater alignment of the split lines, too. With this
we ditch another jump through the obj_gtt_size/offset indirection
maze.

Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 4bd561b3
......@@ -3205,12 +3205,11 @@ i915_gem_object_bind_to_vm(struct drm_i915_gem_object *obj,
if (i915_is_ggtt(vm)) {
bool mappable, fenceable;
fenceable =
i915_gem_obj_ggtt_size(obj) == fence_size &&
(i915_gem_obj_ggtt_offset(obj) & (fence_alignment - 1)) == 0;
fenceable = (vma->node.size == fence_size &&
(vma->node.start & (fence_alignment - 1)) == 0);
mappable =
vma->node.start + obj->base.size <= dev_priv->gtt.mappable_end;
mappable = (vma->node.start + obj->base.size <=
dev_priv->gtt.mappable_end);
obj->map_and_fenceable = mappable && fenceable;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册