All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: update gart_pin_size if bo is in GTT
@ 2016-09-09  6:30 Flora Cui
       [not found] ` <1473402651-2395-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Flora Cui @ 2016-09-09  6:30 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Flora Cui

Change-Id: Ia2cb8a8f62d0933b7937991bec4eace560745f97
Signed-off-by: Flora Cui <Flora.Cui@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);
+
 	/* 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);
 	}
 
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-09  8:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09  6:30 [PATCH 1/2] drm/amdgpu: update gart_pin_size if bo is in GTT Flora Cui
     [not found] ` <1473402651-2395-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
2016-09-09  6:30   ` [PATCH 2/2] drm/amdgpu: calc addr with domain's gpu_offset Flora Cui
     [not found]     ` <1473402651-2395-2-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org>
2016-09-09  6:40       ` 答复: " Qu, Jim
2016-09-09  7:18       ` Christian König
     [not found]         ` <7b7de55b-a83c-618f-d91a-2174e850d521-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-09-09  7:54           ` Flora Cui
2016-09-09  8:52             ` Christian König
2016-09-09  7:17   ` [PATCH 1/2] drm/amdgpu: update gart_pin_size if bo is in GTT Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.