Linux Kernel
3.7.1
|
Go to the source code of this file.
int radeon_gart_bind | ( | struct radeon_device * | rdev, |
unsigned | offset, | ||
int | pages, | ||
struct page ** | pagelist, | ||
dma_addr_t * | dma_addr | ||
) |
radeon_gart_bind - bind pages into the gart page table
: radeon_device pointer : offset into the GPU's gart aperture : number of pages to bind : pages to bind : DMA addresses of pages
Binds the requested pages to the gart page table (all asics). Returns 0 for success, -EINVAL for failure.
Definition at line 271 of file radeon_gart.c.
void radeon_gart_fini | ( | struct radeon_device * | rdev | ) |
int radeon_gart_init | ( | struct radeon_device * | rdev | ) |
void radeon_gart_restore | ( | struct radeon_device * | rdev | ) |
radeon_gart_restore - bind all pages in the gart page table
Binds all pages in the gart page table (all asics). Used to rebuild the gart table on device startup or resume.
Definition at line 310 of file radeon_gart.c.
int radeon_gart_table_ram_alloc | ( | struct radeon_device * | rdev | ) |
radeon_gart_table_ram_alloc - allocate system ram for gart page table
Allocate system memory for GART page table (r1xx-r3xx, non-pcie r4xx, rs400). These asics require the gart table to be in system memory. Returns 0 for success, -ENOMEM for failure.
Definition at line 66 of file radeon_gart.c.
void radeon_gart_table_ram_free | ( | struct radeon_device * | rdev | ) |
radeon_gart_table_ram_free - free system ram for gart page table
Free system memory for GART page table (r1xx-r3xx, non-pcie r4xx, rs400). These asics require the gart table to be in system memory.
Definition at line 96 of file radeon_gart.c.
int radeon_gart_table_vram_alloc | ( | struct radeon_device * | rdev | ) |
radeon_gart_table_vram_alloc - allocate vram for gart page table
Allocate video memory for GART page table (pcie r4xx, r5xx+). These asics require the gart table to be in video memory. Returns 0 for success, error for failure.
Definition at line 125 of file radeon_gart.c.
void radeon_gart_table_vram_free | ( | struct radeon_device * | rdev | ) |
radeon_gart_table_vram_free - free gart page table vram
Free the video memory used for the GART page table (pcie r4xx, r5xx+). These asics require the gart table to be in video memory.
Definition at line 205 of file radeon_gart.c.
int radeon_gart_table_vram_pin | ( | struct radeon_device * | rdev | ) |
radeon_gart_table_vram_pin - pin gart page table in vram
Pin the GART page table in vram so it will not be moved by the memory manager (pcie r4xx, r5xx+). These asics require the gart table to be in video memory. Returns 0 for success, error for failure.
Definition at line 150 of file radeon_gart.c.
void radeon_gart_table_vram_unpin | ( | struct radeon_device * | rdev | ) |
radeon_gart_table_vram_unpin - unpin gart page table in vram
Unpin the GART page table in vram (pcie r4xx, r5xx+). These asics require the gart table to be in video memory.
Definition at line 180 of file radeon_gart.c.
void radeon_gart_unbind | ( | struct radeon_device * | rdev, |
unsigned | offset, | ||
int | pages | ||
) |
radeon_gart_unbind - unbind pages from the gart page table
: radeon_device pointer : offset into the GPU's gart aperture : number of pages to unbind
Unbinds the requested pages from the gart page table and replaces them with the dummy page (all asics).
Definition at line 227 of file radeon_gart.c.
void radeon_vm_add_to_lru | ( | struct radeon_device * | rdev, |
struct radeon_vm * | vm | ||
) |
radeon_vm_add_to_lru - add VMs page table to LRU list
: radeon_device pointer : vm to add to LRU
Add the allocated page table to the LRU list (cayman+).
Global mutex must be locked!
Definition at line 665 of file radeon_gart.c.
int radeon_vm_alloc_pt | ( | struct radeon_device * | rdev, |
struct radeon_vm * | vm | ||
) |
radeon_vm_alloc_pt - allocates a page table for a VM
: radeon_device pointer : vm to bind
Allocate a page table for the requested vm (cayman+). Returns 0 for success, error for failure.
Global and local mutex must be locked!
Definition at line 608 of file radeon_gart.c.
|
read |
radeon_vm_bo_add - add a bo to a specific vm
: radeon_device pointer : requested vm : radeon buffer object
Add into the requested vm (cayman+). Add to the list of bos associated with the vm Returns newly added bo_va or NULL for failure
Object has to be reserved!
Definition at line 786 of file radeon_gart.c.
radeon_vm_bo_find - find the bo_va for a specific vm & bo
: requested vm : requested buffer object
Find inside the requested vm (cayman+). Search inside the vm list for the requested vm Returns the found bo_va or NULL if none is found
Object has to be reserved!
Definition at line 760 of file radeon_gart.c.
void radeon_vm_bo_invalidate | ( | struct radeon_device * | rdev, |
struct radeon_bo * | bo | ||
) |
radeon_vm_bo_invalidate - mark the bo as invalid
: radeon_device pointer : requested vm : radeon buffer object
Mark as invalid (cayman+).
Definition at line 1235 of file radeon_gart.c.
int radeon_vm_bo_rmv | ( | struct radeon_device * | rdev, |
struct radeon_bo_va * | bo_va | ||
) |
radeon_vm_bo_rmv - remove a bo to a specific vm
: radeon_device pointer : requested bo_va
Remove ->bo from the requested vm (cayman+). Remove ->bo from the list of bos associated with the bo_va->vm and remove the ptes for in the page table. Returns 0 for success.
Object have to be reserved!
Definition at line 1209 of file radeon_gart.c.
int radeon_vm_bo_set_addr | ( | struct radeon_device * | rdev, |
struct radeon_bo_va * | bo_va, | ||
uint64_t | soffset, | ||
uint32_t | flags | ||
) |
radeon_vm_bo_set_addr - set bos virtual address inside a vm
: radeon_device pointer : bo_va to store the address : requested offset of the buffer in the VM address space : attributes of pages (read/write/valid/etc.)
Set offset of (cayman+). Validate and set the offset requested within the vm address space. Returns 0 for success, error for failure.
Object has to be reserved!
Definition at line 828 of file radeon_gart.c.
int radeon_vm_bo_update_pte | ( | struct radeon_device * | rdev, |
struct radeon_vm * | vm, | ||
struct radeon_bo * | bo, | ||
struct ttm_mem_reg * | mem | ||
) |
radeon_vm_bo_update_pte - map a bo into the vm page table
: radeon_device pointer : requested vm : radeon buffer object : ttm mem
Fill in the page table entries for (cayman+). Returns 0 for success, -EINVAL for failure.
Object have to be reserved & global and local mutex must be locked!
Definition at line 1077 of file radeon_gart.c.
void radeon_vm_fence | ( | struct radeon_device * | rdev, |
struct radeon_vm * | vm, | ||
struct radeon_fence * | fence | ||
) |
radeon_vm_fence - remember fence for vm
: radeon_device pointer : vm we want to fence : fence to remember
Fence the vm (cayman+). Set the fence used to protect page table and id.
Global and local mutex must be locked!
Definition at line 737 of file radeon_gart.c.
void radeon_vm_fini | ( | struct radeon_device * | rdev, |
struct radeon_vm * | vm | ||
) |
radeon_vm_fini - tear down a vm instance
: radeon_device pointer : requested vm
Tear down (cayman+). Unbind the VM and remove all bos from the vm bo list
Definition at line 1272 of file radeon_gart.c.
|
read |
radeon_vm_grab_id - allocate the next free VMID
: radeon_device pointer : vm to allocate id for : ring we want to submit job to
Allocate an id for the vm (cayman+). Returns the fence we need to sync to (if any).
Global and local mutex must be locked!
Definition at line 683 of file radeon_gart.c.
void radeon_vm_init | ( | struct radeon_device * | rdev, |
struct radeon_vm * | vm | ||
) |
radeon_vm_init - initialize a vm instance
: radeon_device pointer : requested vm
Init fields (cayman+).
Definition at line 1254 of file radeon_gart.c.
void radeon_vm_manager_fini | ( | struct radeon_device * | rdev | ) |
radeon_vm_manager_fini - tear down the vm manager
Tear down the VM manager (cayman+).
Definition at line 542 of file radeon_gart.c.
int radeon_vm_manager_init | ( | struct radeon_device * | rdev | ) |
radeon_vm_manager_init - init the vm manager
Init the vm manager (cayman+). Returns 0 for success, error for failure.
Definition at line 456 of file radeon_gart.c.
uint64_t radeon_vm_map_gart | ( | struct radeon_device * | rdev, |
uint64_t | addr | ||
) |