Lines Matching refs:vma
30 struct i915_vma *vma; in intel_pin_fb_obj_dpt() local
73 vma = i915_vma_instance(obj, vm, view); in intel_pin_fb_obj_dpt()
74 if (IS_ERR(vma)) { in intel_pin_fb_obj_dpt()
75 ret = PTR_ERR(vma); in intel_pin_fb_obj_dpt()
79 if (i915_vma_misplaced(vma, 0, alignment, 0)) { in intel_pin_fb_obj_dpt()
80 ret = i915_vma_unbind(vma); in intel_pin_fb_obj_dpt()
85 ret = i915_vma_pin_ww(vma, &ww, 0, alignment, PIN_GLOBAL); in intel_pin_fb_obj_dpt()
90 vma = ERR_PTR(ret); in intel_pin_fb_obj_dpt()
94 vma->display_alignment = max(vma->display_alignment, alignment); in intel_pin_fb_obj_dpt()
98 i915_vma_get(vma); in intel_pin_fb_obj_dpt()
102 return vma; in intel_pin_fb_obj_dpt()
117 struct i915_vma *vma; in intel_pin_and_fence_fb_obj() local
175 vma = i915_gem_object_pin_to_display_plane(obj, &ww, alignment, in intel_pin_and_fence_fb_obj()
177 if (IS_ERR(vma)) { in intel_pin_and_fence_fb_obj()
178 ret = PTR_ERR(vma); in intel_pin_and_fence_fb_obj()
182 if (uses_fence && i915_vma_is_map_and_fenceable(vma)) { in intel_pin_and_fence_fb_obj()
200 ret = i915_vma_pin_fence(vma); in intel_pin_and_fence_fb_obj()
202 i915_vma_unpin(vma); in intel_pin_and_fence_fb_obj()
207 if (vma->fence) in intel_pin_and_fence_fb_obj()
211 i915_vma_get(vma); in intel_pin_and_fence_fb_obj()
223 vma = ERR_PTR(ret); in intel_pin_and_fence_fb_obj()
227 return vma; in intel_pin_and_fence_fb_obj()
230 void intel_unpin_fb_vma(struct i915_vma *vma, unsigned long flags) in intel_unpin_fb_vma() argument
233 i915_vma_unpin_fence(vma); in intel_unpin_fb_vma()
234 i915_vma_unpin(vma); in intel_unpin_fb_vma()
235 i915_vma_put(vma); in intel_unpin_fb_vma()
243 struct i915_vma *vma; in intel_plane_pin_fb() local
249 vma = intel_pin_and_fence_fb_obj(fb, phys_cursor, in intel_plane_pin_fb()
253 if (IS_ERR(vma)) in intel_plane_pin_fb()
254 return PTR_ERR(vma); in intel_plane_pin_fb()
256 plane_state->ggtt_vma = vma; in intel_plane_pin_fb()
270 vma = intel_dpt_pin(intel_fb->dpt_vm); in intel_plane_pin_fb()
271 if (IS_ERR(vma)) in intel_plane_pin_fb()
272 return PTR_ERR(vma); in intel_plane_pin_fb()
274 plane_state->ggtt_vma = vma; in intel_plane_pin_fb()
276 vma = intel_pin_fb_obj_dpt(fb, &plane_state->view.gtt, false, in intel_plane_pin_fb()
278 if (IS_ERR(vma)) { in intel_plane_pin_fb()
281 return PTR_ERR(vma); in intel_plane_pin_fb()
284 plane_state->dpt_vma = vma; in intel_plane_pin_fb()
295 struct i915_vma *vma; in intel_plane_unpin_fb() local
298 vma = fetch_and_zero(&old_plane_state->ggtt_vma); in intel_plane_unpin_fb()
299 if (vma) in intel_plane_unpin_fb()
300 intel_unpin_fb_vma(vma, old_plane_state->flags); in intel_plane_unpin_fb()
304 vma = fetch_and_zero(&old_plane_state->dpt_vma); in intel_plane_unpin_fb()
305 if (vma) in intel_plane_unpin_fb()
306 intel_unpin_fb_vma(vma, old_plane_state->flags); in intel_plane_unpin_fb()
308 vma = fetch_and_zero(&old_plane_state->ggtt_vma); in intel_plane_unpin_fb()
309 if (vma) in intel_plane_unpin_fb()