SYNOPSIS
- 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);
ARGUMENTS
dev
-
- drm_device
vm
- address space to evict from
min_size
- size of the desired free space
alignment
- alignment constraint of the desired free space
cache_level
- cache_level for the desired space
start
- start (inclusive) of the range from which to evict objects
end
- end (exclusive) of the range from which to evict objects
flags
- additional flags to control the eviction algorithm
DESCRIPTION
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.
TO CLARIFY
This is for freeing up virtual address space, not for freeing memory in e.g. the shrinker.
AUTHORS
Jesse Barnes <[email protected]>
Intel Corporation,
- Initial version
Laurent Pinchart <[email protected]>
Ideas on board SPRL,
- Driver internals
Daniel Vetter <[email protected]>
Intel Corporation,
- Contributions all over the place
Lukas Wunner <[email protected]>
- vga_switcheroo documentation
COPYRIGHT