forked from Minki/linux
drm/ttm: fix LRU handling in ttm_buffer_object_transfer
We need to set the NO_EVICT flag on the ghost object or otherwise we are adding it to the LRU. When it is added to the LRU we can run into a race between destroying and evicting it again. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c6888879fd
commit
d6e820fcd4
@ -492,8 +492,10 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
|
|||||||
if (!fbo)
|
if (!fbo)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ttm_bo_get(bo);
|
|
||||||
fbo->base = *bo;
|
fbo->base = *bo;
|
||||||
|
fbo->base.mem.placement |= TTM_PL_FLAG_NO_EVICT;
|
||||||
|
|
||||||
|
ttm_bo_get(bo);
|
||||||
fbo->bo = bo;
|
fbo->bo = bo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user