]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
Merge drm/drm-next into drm-misc-next
[thirdparty/linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_ttm.c
index 46a24d2308aa36652b52308ea27228b8ce9a604d..8722beba494e563fd45c3e2f3cfba05a7f9d38e8 100644 (file)
@@ -540,10 +540,11 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,
                        return r;
        }
 
+       trace_amdgpu_bo_move(abo, new_mem->mem_type, old_mem->mem_type);
 out:
        /* update statistics */
        atomic64_add(bo->base.size, &adev->num_bytes_moved);
-       amdgpu_bo_move_notify(bo, evict, new_mem);
+       amdgpu_bo_move_notify(bo, evict);
        return 0;
 }
 
@@ -954,10 +955,8 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo)
                return 0;
 
        addr = amdgpu_gmc_agp_addr(bo);
-       if (addr != AMDGPU_BO_INVALID_OFFSET) {
-               bo->resource->start = addr >> PAGE_SHIFT;
+       if (addr != AMDGPU_BO_INVALID_OFFSET)
                return 0;
-       }
 
        /* allocate GART space */
        placement.num_placement = 1;
@@ -1548,7 +1547,7 @@ static int amdgpu_ttm_access_memory(struct ttm_buffer_object *bo,
 static void
 amdgpu_bo_delete_mem_notify(struct ttm_buffer_object *bo)
 {
-       amdgpu_bo_move_notify(bo, false, NULL);
+       amdgpu_bo_move_notify(bo, false);
 }
 
 static struct ttm_device_funcs amdgpu_bo_driver = {