[PATCH 1/2] drm/amdgpu: update gart_pin_size if bo is in GTT

Christian König deathsimple at vodafone.de
Fri Sep 9 07:17:15 UTC 2016


Am 09.09.2016 um 08:30 schrieb Flora Cui:
> Change-Id: Ia2cb8a8f62d0933b7937991bec4eace560745f97
> Signed-off-by: Flora Cui <Flora.Cui at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 5a6216c..296eb6a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -376,6 +376,7 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
>   		bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
>   
>   	amdgpu_fill_placement_to_bo(bo, placement);
> +

Unrelated white space change, please remove.

With that fixed the patch is Reviewed-by: Christian König 
<christian.koenig at amd.com>.

Regards,
Christian.

>   	/* Kernel allocation are uninterruptible */
>   	r = ttm_bo_init(&adev->mman.bdev, &bo->tbo, size, type,
>   			&bo->placement, page_align, !kernel, NULL,
> @@ -726,7 +727,7 @@ int amdgpu_bo_unpin(struct amdgpu_bo *bo)
>   		bo->adev->vram_pin_size -= amdgpu_bo_size(bo);
>   		if (bo->flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS)
>   			bo->adev->invisible_pin_size -= amdgpu_bo_size(bo);
> -	} else {
> +	} else if (bo->tbo.mem.mem_type == TTM_PL_TT) {
>   		bo->adev->gart_pin_size -= amdgpu_bo_size(bo);
>   	}
>   




More information about the amd-gfx mailing list