- int i915_gem_evict_something(struct drm_device * dev, struct i915_address_space * vm, int min_size, unsigned alignment, unsigned cache_level, unsigned long start, unsigned long end, unsigned flags);
- address space to evict from
- size of the desired free space
- alignment constraint of the desired free space
- cache_level for the desired space
- start (inclusive) of the range from which to evict objects
- end (exclusive) of the range from which to evict objects
- additional flags to control the eviction algorithm
This function will try to evict vmas until a free space satisfying the requirements is found. Callers must check first whether any such hole exists already before calling this function.
This function is used by the object/vma binding code.
Since this function is only used to free up virtual address space it only ignores pinned vmas, and not object where the backing storage itself is pinned. Hence obj->pages_pin_count does not protect against eviction.
This is for freeing up virtual address space, not for freeing memory in e.g. the shrinker.
Jesse Barnes <[email protected]>
- Initial version
Laurent Pinchart <[email protected]>
Ideas on board SPRL,
- Driver internals
Daniel Vetter <[email protected]>
- Contributions all over the place
Lukas Wunner <[email protected]>
- vga_switcheroo documentation