[PATCH 6/7] drm/amdgpu: drop size check
Alex Deucher
alexdeucher at gmail.com
Fri Sep 14 20:17:55 UTC 2018
On Fri, Sep 14, 2018 at 3:13 PM Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
>
> We no don't allocate zero sized kernel BOs any longer.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 14 ++++++--------
> 1 file 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 710e7751c567..438390fce714 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)
> * This is used for VGA emulation and pre-OS scanout buffers to
> * avoid display artifacts while transitioning between pre-OS
> * and driver. */
> - if (adev->gmc.stolen_size) {
> - r = amdgpu_bo_create_kernel(adev, adev->gmc.stolen_size, PAGE_SIZE,
> - AMDGPU_GEM_DOMAIN_VRAM,
> - &adev->stolen_vga_memory,
> - NULL, NULL);
> - if (r)
> - return r;
> - }
> + r = amdgpu_bo_create_kernel(adev, adev->gmc.stolen_size, PAGE_SIZE,
> + AMDGPU_GEM_DOMAIN_VRAM,
> + &adev->stolen_vga_memory,
> + NULL, NULL);
> + if (r)
> + return r;
> DRM_INFO("amdgpu: %uM of VRAM memory ready\n",
> (unsigned) (adev->gmc.real_vram_size / (1024 * 1024)));
>
> --
> 2.14.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list