{
int r;
- if (adev->gart.robj == NULL) {
+ if (adev->gart.bo == NULL) {
struct amdgpu_bo_param bp;
memset(&bp, 0, sizeof(bp));
AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS;
bp.type = ttm_bo_type_kernel;
bp.resv = NULL;
- r = amdgpu_bo_create(adev, &bp, &adev->gart.robj);
+ r = amdgpu_bo_create(adev, &bp, &adev->gart.bo);
if (r) {
return r;
}
{
int r;
- r = amdgpu_bo_reserve(adev->gart.robj, false);
+ r = amdgpu_bo_reserve(adev->gart.bo, false);
if (unlikely(r != 0))
return r;
- r = amdgpu_bo_pin(adev->gart.robj, AMDGPU_GEM_DOMAIN_VRAM);
+ r = amdgpu_bo_pin(adev->gart.bo, AMDGPU_GEM_DOMAIN_VRAM);
if (r) {
- amdgpu_bo_unreserve(adev->gart.robj);
+ amdgpu_bo_unreserve(adev->gart.bo);
return r;
}
- r = amdgpu_bo_kmap(adev->gart.robj, &adev->gart.ptr);
+ r = amdgpu_bo_kmap(adev->gart.bo, &adev->gart.ptr);
if (r)
- amdgpu_bo_unpin(adev->gart.robj);
- amdgpu_bo_unreserve(adev->gart.robj);
- adev->gart.table_addr = amdgpu_bo_gpu_offset(adev->gart.robj);
+ amdgpu_bo_unpin(adev->gart.bo);
+ amdgpu_bo_unreserve(adev->gart.bo);
+ adev->gart.table_addr = amdgpu_bo_gpu_offset(adev->gart.bo);
return r;
}
{
int r;
- if (adev->gart.robj == NULL) {
+ if (adev->gart.bo == NULL) {
return;
}
- r = amdgpu_bo_reserve(adev->gart.robj, true);
+ r = amdgpu_bo_reserve(adev->gart.bo, true);
if (likely(r == 0)) {
- amdgpu_bo_kunmap(adev->gart.robj);
- amdgpu_bo_unpin(adev->gart.robj);
- amdgpu_bo_unreserve(adev->gart.robj);
+ amdgpu_bo_kunmap(adev->gart.bo);
+ amdgpu_bo_unpin(adev->gart.bo);
+ amdgpu_bo_unreserve(adev->gart.bo);
adev->gart.ptr = NULL;
}
}
*/
void amdgpu_gart_table_vram_free(struct amdgpu_device *adev)
{
- if (adev->gart.robj == NULL) {
+ if (adev->gart.bo == NULL) {
return;
}
- amdgpu_bo_unref(&adev->gart.robj);
+ amdgpu_bo_unref(&adev->gart.bo);
}
/*