Lines Matching full:stride
48 * @stride: tiling stride
54 u32 size, unsigned int tiling, unsigned int stride) in i915_gem_fence_size() argument
63 GEM_BUG_ON(!stride); in i915_gem_fence_size()
66 stride *= i915_gem_tile_height(tiling); in i915_gem_fence_size()
67 GEM_BUG_ON(!IS_ALIGNED(stride, I965_FENCE_PAGE)); in i915_gem_fence_size()
68 return roundup(size, stride); in i915_gem_fence_size()
88 * @stride: tiling stride
94 unsigned int tiling, unsigned int stride) in i915_gem_fence_alignment() argument
112 return i915_gem_fence_size(i915, size, tiling, stride); in i915_gem_fence_alignment()
118 unsigned int tiling, unsigned int stride) in i915_tiling_ok() argument
130 /* check maximum stride & object size */ in i915_tiling_ok()
134 if (stride / 128 > GEN7_FENCE_MAX_PITCH_VAL) in i915_tiling_ok()
137 if (stride / 128 > I965_FENCE_MAX_PITCH_VAL) in i915_tiling_ok()
140 if (stride > 8192) in i915_tiling_ok()
143 if (!is_power_of_2(stride)) in i915_tiling_ok()
153 if (!stride || !IS_ALIGNED(stride, tile_width)) in i915_tiling_ok()
160 int tiling_mode, unsigned int stride) in i915_vma_fence_prepare() argument
168 size = i915_gem_fence_size(i915, vma->size, tiling_mode, stride); in i915_vma_fence_prepare()
172 alignment = i915_gem_fence_alignment(i915, vma->size, tiling_mode, stride); in i915_vma_fence_prepare()
182 int tiling_mode, unsigned int stride) in i915_gem_object_fence_prepare() argument
198 if (i915_vma_fence_prepare(vma, tiling_mode, stride)) in i915_gem_object_fence_prepare()
221 unsigned int tiling, unsigned int stride) in i915_gem_object_set_tiling() argument
230 GEM_BUG_ON(!i915_tiling_ok(obj, tiling, stride)); in i915_gem_object_set_tiling()
231 GEM_BUG_ON(!stride ^ (tiling == I915_TILING_NONE)); in i915_gem_object_set_tiling()
233 if ((tiling | stride) == obj->tiling_and_stride) in i915_gem_object_set_tiling()
258 err = i915_gem_object_fence_prepare(obj, tiling, stride); in i915_gem_object_set_tiling()
288 i915_gem_fence_size(i915, vma->size, tiling, stride); in i915_gem_object_set_tiling()
291 vma->size, tiling, stride); in i915_gem_object_set_tiling()
298 obj->tiling_and_stride = tiling | stride; in i915_gem_object_set_tiling()
357 if (!i915_tiling_ok(obj, args->tiling_mode, args->stride)) { in i915_gem_set_tiling_ioctl()
364 args->stride = 0; in i915_gem_set_tiling_ioctl()
387 args->stride = 0; in i915_gem_set_tiling_ioctl()
391 err = i915_gem_object_set_tiling(obj, args->tiling_mode, args->stride); in i915_gem_set_tiling_ioctl()
394 args->stride = i915_gem_object_get_stride(obj); in i915_gem_set_tiling_ioctl()