Lines Matching refs:vma

28 	struct i915_vma *vma;  in intel_pin_fb_obj_dpt()  local
41 vma = ERR_PTR(ret); in intel_pin_fb_obj_dpt()
45 vma = i915_vma_instance(obj, vm, view); in intel_pin_fb_obj_dpt()
46 if (IS_ERR(vma)) in intel_pin_fb_obj_dpt()
49 if (i915_vma_misplaced(vma, 0, alignment, 0)) { in intel_pin_fb_obj_dpt()
50 ret = i915_vma_unbind(vma); in intel_pin_fb_obj_dpt()
52 vma = ERR_PTR(ret); in intel_pin_fb_obj_dpt()
57 ret = i915_vma_pin(vma, 0, alignment, PIN_GLOBAL); in intel_pin_fb_obj_dpt()
59 vma = ERR_PTR(ret); in intel_pin_fb_obj_dpt()
63 vma->display_alignment = max_t(u64, vma->display_alignment, alignment); in intel_pin_fb_obj_dpt()
67 i915_vma_get(vma); in intel_pin_fb_obj_dpt()
71 return vma; in intel_pin_fb_obj_dpt()
86 struct i915_vma *vma; in intel_pin_and_fence_fb_obj() local
146 vma = i915_gem_object_pin_to_display_plane(obj, &ww, alignment, in intel_pin_and_fence_fb_obj()
148 if (IS_ERR(vma)) { in intel_pin_and_fence_fb_obj()
149 ret = PTR_ERR(vma); in intel_pin_and_fence_fb_obj()
154 if (uses_fence && i915_vma_is_map_and_fenceable(vma)) { in intel_pin_and_fence_fb_obj()
172 ret = i915_vma_pin_fence(vma); in intel_pin_and_fence_fb_obj()
174 i915_vma_unpin(vma); in intel_pin_and_fence_fb_obj()
179 if (vma->fence) in intel_pin_and_fence_fb_obj()
183 i915_vma_get(vma); in intel_pin_and_fence_fb_obj()
195 vma = ERR_PTR(ret); in intel_pin_and_fence_fb_obj()
199 return vma; in intel_pin_and_fence_fb_obj()
202 void intel_unpin_fb_vma(struct i915_vma *vma, unsigned long flags) in intel_unpin_fb_vma() argument
205 i915_vma_unpin_fence(vma); in intel_unpin_fb_vma()
206 i915_vma_unpin(vma); in intel_unpin_fb_vma()
207 i915_vma_put(vma); in intel_unpin_fb_vma()
215 struct i915_vma *vma; in intel_plane_pin_fb() local
221 vma = intel_pin_and_fence_fb_obj(fb, phys_cursor, in intel_plane_pin_fb()
225 if (IS_ERR(vma)) in intel_plane_pin_fb()
226 return PTR_ERR(vma); in intel_plane_pin_fb()
228 plane_state->ggtt_vma = vma; in intel_plane_pin_fb()
232 vma = intel_dpt_pin(intel_fb->dpt_vm); in intel_plane_pin_fb()
233 if (IS_ERR(vma)) in intel_plane_pin_fb()
234 return PTR_ERR(vma); in intel_plane_pin_fb()
236 plane_state->ggtt_vma = vma; in intel_plane_pin_fb()
238 vma = intel_pin_fb_obj_dpt(fb, &plane_state->view.gtt, false, in intel_plane_pin_fb()
240 if (IS_ERR(vma)) { in intel_plane_pin_fb()
243 return PTR_ERR(vma); in intel_plane_pin_fb()
246 plane_state->dpt_vma = vma; in intel_plane_pin_fb()
257 struct i915_vma *vma; in intel_plane_unpin_fb() local
260 vma = fetch_and_zero(&old_plane_state->ggtt_vma); in intel_plane_unpin_fb()
261 if (vma) in intel_plane_unpin_fb()
262 intel_unpin_fb_vma(vma, old_plane_state->flags); in intel_plane_unpin_fb()
266 vma = fetch_and_zero(&old_plane_state->dpt_vma); in intel_plane_unpin_fb()
267 if (vma) in intel_plane_unpin_fb()
268 intel_unpin_fb_vma(vma, old_plane_state->flags); in intel_plane_unpin_fb()
270 vma = fetch_and_zero(&old_plane_state->ggtt_vma); in intel_plane_unpin_fb()
271 if (vma) in intel_plane_unpin_fb()