diff options
author | Christian König <christian.koenig@amd.com> | 2018-11-29 16:25:10 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-30 18:12:16 +0100 |
commit | d6e820fcd4cf08b11d291a1dd7bbd0636914647c (patch) | |
tree | 3a790a944e79e4c57e65138e4b27354e9d4a968e /drivers/gpu/drm | |
parent | drm/amd/display: Fix 6x4K displays light-up on Vega20 (v2) (diff) | |
download | linux-d6e820fcd4cf08b11d291a1dd7bbd0636914647c.tar.xz linux-d6e820fcd4cf08b11d291a1dd7bbd0636914647c.zip |
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index ba80150d1052..895d77d799e4 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -492,8 +492,10 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, if (!fbo) return -ENOMEM; - ttm_bo_get(bo); fbo->base = *bo; + fbo->base.mem.placement |= TTM_PL_FLAG_NO_EVICT; + + ttm_bo_get(bo); fbo->bo = bo; /** |