mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-20 05:43:09 +00:00
drm/radeon: separate pt alloc from lru add
Make it possible to allocate a persistent page table. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d72d43cfc5
commit
13e55c38f8
3 changed files with 18 additions and 4 deletions
|
@ -617,9 +617,6 @@ int radeon_vm_alloc_pt(struct radeon_device *rdev, struct radeon_vm *vm)
|
|||
}
|
||||
|
||||
if (vm->page_directory != NULL) {
|
||||
/* update lru */
|
||||
list_del_init(&vm->list);
|
||||
list_add_tail(&vm->list, &rdev->vm_manager.lru_vm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -653,10 +650,25 @@ retry:
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
list_add_tail(&vm->list, &rdev->vm_manager.lru_vm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* radeon_vm_add_to_lru - add VMs page table to LRU list
|
||||
*
|
||||
* @rdev: radeon_device pointer
|
||||
* @vm: vm to add to LRU
|
||||
*
|
||||
* Add the allocated page table to the LRU list (cayman+).
|
||||
*
|
||||
* Global mutex must be locked!
|
||||
*/
|
||||
void radeon_vm_add_to_lru(struct radeon_device *rdev, struct radeon_vm *vm)
|
||||
{
|
||||
list_del_init(&vm->list);
|
||||
list_add_tail(&vm->list, &rdev->vm_manager.lru_vm);
|
||||
}
|
||||
|
||||
/**
|
||||
* radeon_vm_grab_id - allocate the next free VMID
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue