Lines Matching full:stride
50 * @stride: tiling stride
56 u32 size, unsigned int tiling, unsigned int stride) in i915_gem_fence_size() argument
65 GEM_BUG_ON(!stride); in i915_gem_fence_size()
68 stride *= i915_gem_tile_height(tiling); in i915_gem_fence_size()
69 GEM_BUG_ON(!IS_ALIGNED(stride, I965_FENCE_PAGE)); in i915_gem_fence_size()
70 return roundup(size, stride); in i915_gem_fence_size()
90 * @stride: tiling stride
96 unsigned int tiling, unsigned int stride) in i915_gem_fence_alignment() argument
114 return i915_gem_fence_size(i915, size, tiling, stride); in i915_gem_fence_alignment()
120 unsigned int tiling, unsigned int stride) in i915_tiling_ok() argument
132 /* check maximum stride & object size */ in i915_tiling_ok()
136 if (stride / 128 > GEN7_FENCE_MAX_PITCH_VAL) in i915_tiling_ok()
139 if (stride / 128 > I965_FENCE_MAX_PITCH_VAL) in i915_tiling_ok()
142 if (stride > 8192) in i915_tiling_ok()
145 if (!is_power_of_2(stride)) in i915_tiling_ok()
155 if (!stride || !IS_ALIGNED(stride, tile_width)) in i915_tiling_ok()
162 int tiling_mode, unsigned int stride) in i915_vma_fence_prepare() argument
170 size = i915_gem_fence_size(i915, vma->size, tiling_mode, stride); in i915_vma_fence_prepare()
174 alignment = i915_gem_fence_alignment(i915, vma->size, tiling_mode, stride); in i915_vma_fence_prepare()
184 int tiling_mode, unsigned int stride) in i915_gem_object_fence_prepare() argument
201 if (i915_vma_fence_prepare(vma, tiling_mode, stride)) in i915_gem_object_fence_prepare()
232 unsigned int tiling, unsigned int stride) in i915_gem_object_set_tiling() argument
241 GEM_BUG_ON(!i915_tiling_ok(obj, tiling, stride)); in i915_gem_object_set_tiling()
242 GEM_BUG_ON(!stride ^ (tiling == I915_TILING_NONE)); in i915_gem_object_set_tiling()
244 if ((tiling | stride) == obj->tiling_and_stride) in i915_gem_object_set_tiling()
269 err = i915_gem_object_fence_prepare(obj, tiling, stride); in i915_gem_object_set_tiling()
297 i915_gem_fence_size(i915, vma->size, tiling, stride); in i915_gem_object_set_tiling()
300 vma->size, tiling, stride); in i915_gem_object_set_tiling()
307 obj->tiling_and_stride = tiling | stride; in i915_gem_object_set_tiling()
366 if (!i915_tiling_ok(obj, args->tiling_mode, args->stride)) { in i915_gem_set_tiling_ioctl()
373 args->stride = 0; in i915_gem_set_tiling_ioctl()
396 args->stride = 0; in i915_gem_set_tiling_ioctl()
400 err = i915_gem_object_set_tiling(obj, args->tiling_mode, args->stride); in i915_gem_set_tiling_ioctl()
403 args->stride = i915_gem_object_get_stride(obj); in i915_gem_set_tiling_ioctl()