diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2020-01-17 01:10:52 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-05-01 15:19:07 -0400 |
commit | 942a0dd2d6d5b1586784e1ff2c056382ee05a9fa (patch) | |
tree | 48d24ad77f1dfbde63c5c94cd00df7d81deaf06f /drivers/gpu/drm | |
parent | e0c116c1906618823e6fa823a8a727bcea04ac18 (diff) | |
download | linux-stable-942a0dd2d6d5b1586784e1ff2c056382ee05a9fa.tar.gz linux-stable-942a0dd2d6d5b1586784e1ff2c056382ee05a9fa.tar.bz2 linux-stable-942a0dd2d6d5b1586784e1ff2c056382ee05a9fa.zip |
drm/amdgpu: skip reservation of discovery tmr region in pre-Navi
IP discovery is only supported in Navi series and onwards.
There is no need to reserve a portion of vram as discovery
tmr region for pre-Navi adapters.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 085d7c238163..93d057f92dcd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1961,14 +1961,16 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) * reserve TMR memory at the top of VRAM which holds * IP Discovery data and is protected by PSP. */ - r = amdgpu_bo_create_kernel_at(adev, + if (adev->discovery_tmr_size > 0) { + r = amdgpu_bo_create_kernel_at(adev, adev->gmc.real_vram_size - adev->discovery_tmr_size, adev->discovery_tmr_size, AMDGPU_GEM_DOMAIN_VRAM, &adev->discovery_memory, NULL); - if (r) - return r; + if (r) + return r; + } DRM_INFO("amdgpu: %uM of VRAM memory ready\n", (unsigned) (adev->gmc.real_vram_size / (1024 * 1024))); |