diff options
author | Aaron Liu <aaron.liu@amd.com> | 2021-01-13 12:14:02 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-06-04 23:03:12 +0300 |
commit | bea75349945f4a446d29e434dad40ec78ff5fcbc (patch) | |
tree | 5a11dadaf0086393d9d329fea709b1fb6bfced79 /drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | |
parent | e15a5fb9b6ac2556a4fe59dba5faa34c695e8b73 (diff) | |
download | linux-bea75349945f4a446d29e434dad40ec78ff5fcbc.tar.xz |
drm/amdgpu: reserved buffer is not needed with ip discovery enabled
When IP discovery enabled, the reserved buffer has been alloacted.
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index 86d28dca4f1d..4fc1515381f5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -790,14 +790,17 @@ void amdgpu_gmc_get_reserved_allocation(struct amdgpu_device *adev) { /* Some ASICs need to reserve a region of video memory to avoid access * from driver */ + adev->mman.stolen_reserved_offset = 0; + adev->mman.stolen_reserved_size = 0; + switch (adev->asic_type) { case CHIP_YELLOW_CARP: - adev->mman.stolen_reserved_offset = 0x1ffb0000; - adev->mman.stolen_reserved_size = 64 * PAGE_SIZE; + if (amdgpu_discovery == 0) { + adev->mman.stolen_reserved_offset = 0x1ffb0000; + adev->mman.stolen_reserved_size = 64 * PAGE_SIZE; + } break; default: - adev->mman.stolen_reserved_offset = 0; - adev->mman.stolen_reserved_size = 0; break; } } |