[PATCH 5/6] drm/amdgpu: use expolicit limit fro VRAM<->GTT moves

Alex Deucher alexdeucher at gmail.com
Mon Sep 12 21:05:53 UTC 2016


On Mon, Sep 12, 2016 at 10:39 AM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> Use an explicit limit when moving things around to
> force address space allocation.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>

Typo in the patch title:
s/expolicit/explicit/

With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>


> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 2f8aba3..8e247ac 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -339,7 +339,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo,
>         placement.num_busy_placement = 1;
>         placement.busy_placement = &placements;
>         placements.fpfn = 0;
> -       placements.lpfn = 0;
> +       placements.lpfn = adev->mc.gtt_size >> PAGE_SHIFT;
>         placements.flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT;
>         r = ttm_bo_mem_space(bo, &placement, &tmp_mem,
>                              interruptible, no_wait_gpu);
> @@ -386,7 +386,7 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo,
>         placement.num_busy_placement = 1;
>         placement.busy_placement = &placements;
>         placements.fpfn = 0;
> -       placements.lpfn = 0;
> +       placements.lpfn = adev->mc.gtt_size >> PAGE_SHIFT;
>         placements.flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT;
>         r = ttm_bo_mem_space(bo, &placement, &tmp_mem,
>                              interruptible, no_wait_gpu);
> --
> 2.5.0
>
> _______________________________________________
> 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