• Home
  • Raw
  • Download

Lines Matching refs:vma

201 			struct i915_vma *vma)  in fence_update()  argument
210 if (vma) { in fence_update()
211 GEM_BUG_ON(!i915_gem_object_get_stride(vma->obj) || in fence_update()
212 !i915_gem_object_get_tiling(vma->obj)); in fence_update()
214 if (!i915_vma_is_map_and_fenceable(vma)) in fence_update()
219 ret = i915_vma_sync(vma); in fence_update()
224 GEM_BUG_ON(vma->fence_size > i915_vma_size(vma)); in fence_update()
225 fence->start = i915_ggtt_offset(vma); in fence_update()
226 fence->size = vma->fence_size; in fence_update()
227 fence->stride = i915_gem_object_get_stride(vma->obj); in fence_update()
228 fence->tiling = i915_gem_object_get_tiling(vma->obj); in fence_update()
232 old = xchg(&fence->vma, NULL); in fence_update()
237 fence->vma = old; in fence_update()
247 if (old != vma) { in fence_update()
268 GEM_BUG_ON(vma); in fence_update()
272 WRITE_ONCE(fence->vma, vma); in fence_update()
275 if (vma) { in fence_update()
276 vma->fence = fence; in fence_update()
291 void i915_vma_revoke_fence(struct i915_vma *vma) in i915_vma_revoke_fence() argument
293 struct i915_fence_reg *fence = vma->fence; in i915_vma_revoke_fence()
296 lockdep_assert_held(&vma->vm->mutex); in i915_vma_revoke_fence()
300 GEM_BUG_ON(fence->vma != vma); in i915_vma_revoke_fence()
306 WRITE_ONCE(fence->vma, NULL); in i915_vma_revoke_fence()
307 vma->fence = NULL; in i915_vma_revoke_fence()
326 return fence->vma && i915_vma_is_active(fence->vma); in fence_is_active()
335 GEM_BUG_ON(fence->vma && fence->vma->fence != fence); in fence_find()
362 int __i915_vma_pin_fence(struct i915_vma *vma) in __i915_vma_pin_fence() argument
364 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vma->vm); in __i915_vma_pin_fence()
366 struct i915_vma *set = i915_gem_object_is_tiled(vma->obj) ? vma : NULL; in __i915_vma_pin_fence()
369 lockdep_assert_held(&vma->vm->mutex); in __i915_vma_pin_fence()
372 if (vma->fence) { in __i915_vma_pin_fence()
373 fence = vma->fence; in __i915_vma_pin_fence()
374 GEM_BUG_ON(fence->vma != vma); in __i915_vma_pin_fence()
395 GEM_BUG_ON(fence->vma != set); in __i915_vma_pin_fence()
396 GEM_BUG_ON(vma->fence != (set ? fence : NULL)); in __i915_vma_pin_fence()
424 int i915_vma_pin_fence(struct i915_vma *vma) in i915_vma_pin_fence() argument
428 if (!vma->fence && !i915_gem_object_is_tiled(vma->obj)) in i915_vma_pin_fence()
435 assert_rpm_wakelock_held(vma->vm->gt->uncore->rpm); in i915_vma_pin_fence()
436 GEM_BUG_ON(!i915_vma_is_ggtt(vma)); in i915_vma_pin_fence()
438 err = mutex_lock_interruptible(&vma->vm->mutex); in i915_vma_pin_fence()
442 err = __i915_vma_pin_fence(vma); in i915_vma_pin_fence()
443 mutex_unlock(&vma->vm->mutex); in i915_vma_pin_fence()
474 if (fence->vma) { in i915_reserve_fence()