SYNOPSIS
- int gen8_ppgtt_alloc_page_directories(struct i915_address_space * vm, struct i915_page_directory_pointer * pdp, uint64_t start, uint64_t length, unsigned long * new_pds);
ARGUMENTS
vm
-
- Master vm structure.
pdp
- Page directory pointer for this address range.
start
- Starting virtual address to begin allocations.
length
- Size of the allocations.
new_pds
- Bitmap set by function with new allocations. Likely used by the caller to free on error.
DESCRIPTION
Allocate the required number of page directories starting at the pde index of start, and ending at the pde index start + length. This function will skip over already allocated page directories within the range, and only allocate new ones, setting the appropriate pointer within the pdp as well as the correct position in the bitmap new_pds.
The function will only allocate the pages within the range for a give page directory pointer. In other words, if start + length straddles a virtually addressed PDP boundary (512GB for 4k pages), there will be more allocations required by the caller, This is not currently possible, and the BUG in the code will prevent it.
RETURN
0 if success; negative error code otherwise.
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