Lines Matching refs:ggtt
148 static void vgt_deballoon_space(struct i915_ggtt *ggtt, in vgt_deballoon_space() argument
151 struct drm_i915_private *dev_priv = ggtt->vm.i915; in vgt_deballoon_space()
161 ggtt->vm.reserved -= node->size; in vgt_deballoon_space()
172 void intel_vgt_deballoon(struct i915_ggtt *ggtt) in intel_vgt_deballoon() argument
174 struct drm_i915_private *dev_priv = ggtt->vm.i915; in intel_vgt_deballoon()
177 if (!intel_vgpu_active(ggtt->vm.i915)) in intel_vgt_deballoon()
183 vgt_deballoon_space(ggtt, &bl_info.space[i]); in intel_vgt_deballoon()
186 static int vgt_balloon_space(struct i915_ggtt *ggtt, in vgt_balloon_space() argument
190 struct drm_i915_private *dev_priv = ggtt->vm.i915; in vgt_balloon_space()
200 ret = i915_gem_gtt_reserve(&ggtt->vm, node, in vgt_balloon_space()
204 ggtt->vm.reserved += size; in vgt_balloon_space()
253 int intel_vgt_balloon(struct i915_ggtt *ggtt) in intel_vgt_balloon() argument
255 struct drm_i915_private *dev_priv = ggtt->vm.i915; in intel_vgt_balloon()
257 unsigned long ggtt_end = ggtt->vm.total; in intel_vgt_balloon()
263 if (!intel_vgpu_active(ggtt->vm.i915)) in intel_vgt_balloon()
286 if (mappable_end > ggtt->mappable_end || in intel_vgt_balloon()
287 unmappable_base < ggtt->mappable_end || in intel_vgt_balloon()
294 if (unmappable_base > ggtt->mappable_end) { in intel_vgt_balloon()
295 ret = vgt_balloon_space(ggtt, &bl_info.space[2], in intel_vgt_balloon()
296 ggtt->mappable_end, unmappable_base); in intel_vgt_balloon()
303 ret = vgt_balloon_space(ggtt, &bl_info.space[3], in intel_vgt_balloon()
311 ret = vgt_balloon_space(ggtt, &bl_info.space[0], in intel_vgt_balloon()
318 if (mappable_end < ggtt->mappable_end) { in intel_vgt_balloon()
319 ret = vgt_balloon_space(ggtt, &bl_info.space[1], in intel_vgt_balloon()
320 mappable_end, ggtt->mappable_end); in intel_vgt_balloon()
330 vgt_deballoon_space(ggtt, &bl_info.space[0]); in intel_vgt_balloon()
332 vgt_deballoon_space(ggtt, &bl_info.space[3]); in intel_vgt_balloon()
334 vgt_deballoon_space(ggtt, &bl_info.space[2]); in intel_vgt_balloon()