[PATCH 2/3] drm/amdgpu: update gart_pin_size only if the bo is pined to GTT

Flora Cui Flora.Cui at amd.com
Thu Aug 18 05:36:58 UTC 2016


Change-Id: I975a0a97d570bd14b8031c4033cb447a3b3d2b1a
Signed-off-by: Flora Cui <Flora.Cui at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 0a0f3cb..dbab3c0 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);
 	}
 
-- 
2.7.4



More information about the amd-gfx mailing list