From: Flora Cui Date: Thu, 18 Aug 2016 05:17:07 +0000 (+0800) Subject: drm/amdgpu: update gart_pin_size only if the bo is pined to GTT X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32ab75f076ac14a9b2e2e4d0910ecfb102ba9747;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: update gart_pin_size only if the bo is pined to GTT Signed-off-by: Flora Cui Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 0a0f3cb89f92..dbab3c0d096d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -578,7 +578,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, 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 (domain == AMDGPU_GEM_DOMAIN_GTT) { bo->adev->gart_pin_size += amdgpu_bo_size(bo); }