dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/ttm: refine ghost BO resv criteria
@ 2019-11-11 14:58 Christian König
  2019-11-11 14:58 ` Christian König
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Christian König @ 2019-11-11 14:58 UTC (permalink / raw)
  To: Kevin1.Wang-5C7GfCeVMHo,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Ghost BOs need to stick with the resv object only when the origin is imported.

This is a low hanging fruit to avoid OOM situations on evictions.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 2b0e5a088da0..86d152472f38 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -511,7 +511,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
 	kref_init(&fbo->base.kref);
 	fbo->base.destroy = &ttm_transfered_destroy;
 	fbo->base.acc_size = 0;
-	if (bo->base.resv == &bo->base._resv)
+	if (bo->type != ttm_bo_type_sg)
 		fbo->base.base.resv = &fbo->base.base._resv;
 
 	dma_resv_init(&fbo->base.base._resv);
-- 
2.17.1

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

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

end of thread, other threads:[~2019-11-15 22:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 14:58 [PATCH 1/4] drm/ttm: refine ghost BO resv criteria Christian König
2019-11-11 14:58 ` Christian König
     [not found] ` <20191111145832.37320-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-11-11 14:58   ` [PATCH 2/4] drm/ttm: cleanup ttm_buffer_object_transfer Christian König
2019-11-11 14:58     ` Christian König
     [not found]     ` <20191111145832.37320-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-11-15 22:27       ` Felix Kuehling
2019-11-15 22:27         ` Felix Kuehling
2019-11-11 14:58   ` [PATCH 3/4] drm/ttm: rework BO delayed delete Christian König
2019-11-11 14:58     ` Christian König
     [not found]     ` <20191111145832.37320-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-11-15 22:47       ` Felix Kuehling
2019-11-15 22:47         ` Felix Kuehling
2019-11-12 10:25   ` [PATCH 1/4] drm/ttm: refine ghost BO resv criteria Daniel Vetter
2019-11-12 10:25     ` Daniel Vetter
2019-11-11 14:58 ` [PATCH 4/4] drm/ttm: replace dma_resv object on deleted BOs Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).