diff options
author | Christian König <christian.koenig@amd.com> | 2017-06-28 12:18:54 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-07-14 11:06:20 -0400 |
commit | cc25188afdb886044785be4c29f3993c3a3b2b92 (patch) | |
tree | c536c9741fb63232e88e906414c1b70b86667e95 /drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | |
parent | 606ce3c098b19cd5458930a133ef1577c64b1072 (diff) | |
download | linux-cc25188afdb886044785be4c29f3993c3a3b2b92.tar.gz linux-cc25188afdb886044785be4c29f3993c3a3b2b92.tar.bz2 linux-cc25188afdb886044785be4c29f3993c3a3b2b92.zip |
drm/amdgpu: reserve the first 2x512 pages of GART
We want to use them as remap address space.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c index 1ef625550442..f46a97d91675 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c @@ -43,12 +43,15 @@ static int amdgpu_gtt_mgr_init(struct ttm_mem_type_manager *man, unsigned long p_size) { struct amdgpu_gtt_mgr *mgr; + uint64_t start, size; mgr = kzalloc(sizeof(*mgr), GFP_KERNEL); if (!mgr) return -ENOMEM; - drm_mm_init(&mgr->mm, 0, p_size); + start = AMDGPU_GTT_MAX_TRANSFER_SIZE * AMDGPU_GTT_NUM_TRANSFER_WINDOWS; + size = p_size - start; + drm_mm_init(&mgr->mm, start, size); spin_lock_init(&mgr->lock); mgr->available = p_size; man->priv = mgr; |