aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
index 9e05e257729f..0d15eb7d31d7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
@@ -108,10 +108,10 @@ bool amdgpu_gtt_mgr_is_allocated(struct ttm_mem_reg *mem)
108 * 108 *
109 * Allocate the address space for a node. 109 * Allocate the address space for a node.
110 */ 110 */
111int amdgpu_gtt_mgr_alloc(struct ttm_mem_type_manager *man, 111static int amdgpu_gtt_mgr_alloc(struct ttm_mem_type_manager *man,
112 struct ttm_buffer_object *tbo, 112 struct ttm_buffer_object *tbo,
113 const struct ttm_place *place, 113 const struct ttm_place *place,
114 struct ttm_mem_reg *mem) 114 struct ttm_mem_reg *mem)
115{ 115{
116 struct amdgpu_device *adev = amdgpu_ttm_adev(man->bdev); 116 struct amdgpu_device *adev = amdgpu_ttm_adev(man->bdev);
117 struct amdgpu_gtt_mgr *mgr = man->priv; 117 struct amdgpu_gtt_mgr *mgr = man->priv;
@@ -143,12 +143,8 @@ int amdgpu_gtt_mgr_alloc(struct ttm_mem_type_manager *man,
143 fpfn, lpfn, mode); 143 fpfn, lpfn, mode);
144 spin_unlock(&mgr->lock); 144 spin_unlock(&mgr->lock);
145 145
146 if (!r) { 146 if (!r)
147 mem->start = node->start; 147 mem->start = node->start;
148 if (&tbo->mem == mem)
149 tbo->offset = (tbo->mem.start << PAGE_SHIFT) +
150 tbo->bdev->man[tbo->mem.mem_type].gpu_offset;
151 }
152 148
153 return r; 149 return r;
154} 150}