summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorFlora Cui <Flora.Cui@amd.com>2016-08-18 13:17:07 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-08-19 12:31:36 -0400
commit32ab75f076ac14a9b2e2e4d0910ecfb102ba9747 (patch)
treebc846d0898467374e634b0c182d38a45b2ad1e36 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parent408778e8e9656105aa4df2fe7dce54244ccdd3d7 (diff)
downloadlinux-32ab75f076ac14a9b2e2e4d0910ecfb102ba9747.tar.bz2
drm/amdgpu: update gart_pin_size only if the bo is pined to GTT
Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 1 insertions, 1 deletions
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);
}