diff options
author | Christian König <christian.koenig@amd.com> | 2018-09-14 15:06:50 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-19 13:36:57 -0400 |
commit | 5297572806aeeb68c2491169fe7fcc436e09e41d (patch) | |
tree | a153c8f42a541db87b99d89e9f2aaa0ac8924fb8 | |
parent | 21a7e77f77b348e73c9c67064a545e724c4a0c9a (diff) |
drm/amdgpu: drop size check
We no don't allocate zero sized kernel BOs any longer.
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>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index c81b35d06df1..5da87ec67c64 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -1809,14 +1809,12 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) | |||
1809 | * This is used for VGA emulation and pre-OS scanout buffers to | 1809 | * This is used for VGA emulation and pre-OS scanout buffers to |
1810 | * avoid display artifacts while transitioning between pre-OS | 1810 | * avoid display artifacts while transitioning between pre-OS |
1811 | * and driver. */ | 1811 | * and driver. */ |
1812 | if (adev->gmc.stolen_size) { | 1812 | r = amdgpu_bo_create_kernel(adev, adev->gmc.stolen_size, PAGE_SIZE, |
1813 | r = amdgpu_bo_create_kernel(adev, adev->gmc.stolen_size, PAGE_SIZE, | 1813 | AMDGPU_GEM_DOMAIN_VRAM, |
1814 | AMDGPU_GEM_DOMAIN_VRAM, | 1814 | &adev->stolen_vga_memory, |
1815 | &adev->stolen_vga_memory, | 1815 | NULL, NULL); |
1816 | NULL, NULL); | 1816 | if (r) |
1817 | if (r) | 1817 | return r; |
1818 | return r; | ||
1819 | } | ||
1820 | DRM_INFO("amdgpu: %uM of VRAM memory ready\n", | 1818 | DRM_INFO("amdgpu: %uM of VRAM memory ready\n", |
1821 | (unsigned) (adev->gmc.real_vram_size / (1024 * 1024))); | 1819 | (unsigned) (adev->gmc.real_vram_size / (1024 * 1024))); |
1822 | 1820 | ||