mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 14:02:43 -04:00
drm/i915: Move ggtt fence/alignment to i915_gem_tiling.c
Rename i915_gem_get_ggtt_size() and i915_gem_get_ggtt_alignment() to i915_gem_fence_size() and i915_gem_fence_alignment() respectively to better match usage. Similarly move the pair of functions into i915_gem_tiling.c next to the fence restrictions. Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170109161613.11881-6-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
This commit is contained in:
@@ -112,14 +112,14 @@ __i915_vma_create(struct drm_i915_gem_object *obj,
|
||||
|
||||
if (i915_is_ggtt(vm)) {
|
||||
GEM_BUG_ON(overflows_type(vma->size, u32));
|
||||
vma->fence_size = i915_gem_get_ggtt_size(vm->i915, vma->size,
|
||||
i915_gem_object_get_tiling(obj),
|
||||
i915_gem_object_get_stride(obj));
|
||||
vma->fence_size = i915_gem_fence_size(vm->i915, vma->size,
|
||||
i915_gem_object_get_tiling(obj),
|
||||
i915_gem_object_get_stride(obj));
|
||||
GEM_BUG_ON(vma->fence_size & 4095);
|
||||
|
||||
vma->fence_alignment = i915_gem_get_ggtt_alignment(vm->i915, vma->size,
|
||||
i915_gem_object_get_tiling(obj),
|
||||
i915_gem_object_get_stride(obj));
|
||||
vma->fence_alignment = i915_gem_fence_alignment(vm->i915, vma->size,
|
||||
i915_gem_object_get_tiling(obj),
|
||||
i915_gem_object_get_stride(obj));
|
||||
GEM_BUG_ON(!is_power_of_2(vma->fence_alignment));
|
||||
|
||||
vma->flags |= I915_VMA_GGTT;
|
||||
|
||||
Reference in New Issue
Block a user