]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
drm/amdgpu/vcn:Replace value with defined macro
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_gart.c
index a54d5655a191abac380e58c7d175cd08f055fa5b..11fea28f8ad30da94a18a28763a498bb5f84868e 100644 (file)
@@ -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);
 }
 
 /*