summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2023-03-03 15:33:00 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 16:57:46 +0300
commita0ba127960982b8827ba8b410c272ec8f3ee7e6a (patch)
treeb91e24e3c31643e3851595d61ed0a5a481e32112 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parente181be58ccc2ac48e4b79996c8dd6dd9f34fa4b5 (diff)
downloadlinux-a0ba127960982b8827ba8b410c272ec8f3ee7e6a.tar.xz
drm/amdgpu: Fix unmapping of aperture
When aperture size is zero, there is no mapping done. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 3933432daaac..09d1a98bd11e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1844,12 +1844,13 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
adev->mman.aper_base_kaddr = ioremap_cache(adev->gmc.aper_base,
adev->gmc.visible_vram_size);
- else if (!adev->gmc.is_app_apu)
+ else if (adev->gmc.is_app_apu)
+ DRM_DEBUG_DRIVER(
+ "No need to ioremap when real vram size is 0\n");
+ else
#endif
adev->mman.aper_base_kaddr = ioremap_wc(adev->gmc.aper_base,
adev->gmc.visible_vram_size);
- else
- DRM_DEBUG_DRIVER("No need to ioremap when real vram size is 0\n");
#endif
/*