X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=drivers%2Fgpu%2Fdrm%2Famd%2Famdgpu%2Famdgpu_gart.c;h=11fea28f8ad30da94a18a28763a498bb5f84868e;hb=b17c524922d65f3ce527277a030d505da3c7b754;hp=a54d5655a191abac380e58c7d175cd08f055fa5b;hpb=3918c21eacb06e3d9d43f718354cbce6703f4812;p=linux.git diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c index a54d5655a191..11fea28f8ad3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c @@ -112,7 +112,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev) { int r; - if (adev->gart.robj == NULL) { + if (adev->gart.bo == NULL) { struct amdgpu_bo_param bp; memset(&bp, 0, sizeof(bp)); @@ -123,7 +123,7 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev) 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; } @@ -145,19 +145,18 @@ int amdgpu_gart_table_vram_pin(struct amdgpu_device *adev) { 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); return r; } @@ -173,14 +172,14 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev) { 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; } } @@ -196,10 +195,10 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev) */ 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); } /*