drm/ttm: refine ghost BO resv criteria
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> Reviewed-by: xinhui pan <xinhui.pan@amd.com> Link: https://patchwork.freedesktop.org/patch/352740/
This commit is contained in:
parent
23575e7afd
commit
5b34406f54
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue