Skip to content

Commit d91c411

Browse files
ZhenGuo YinChristianKoenigAMD
authored andcommitted
drm/ttm: update bulk move object of ghost BO
[Why] Ghost BO is released with non-empty bulk move object. There is a warning trace: WARNING: CPU: 19 PID: 1582 at ttm/ttm_bo.c:366 ttm_bo_release+0x2e1/0x2f0 [amdttm] Call Trace: amddma_resv_reserve_fences+0x10d/0x1f0 [amdkcl] amdttm_bo_put+0x28/0x30 [amdttm] amdttm_bo_move_accel_cleanup+0x126/0x200 [amdttm] amdgpu_bo_move+0x1a8/0x770 [amdgpu] ttm_bo_handle_move_mem+0xb0/0x140 [amdttm] amdttm_bo_validate+0xbf/0x100 [amdttm] [How] The resource of ghost BO should be moved to LRU directly, instead of using bulk move. The bulk move object of ghost BO should set to NULL before function ttm_bo_move_to_lru_tail_unlocked. v2: set bulk move to NULL manually if no resource associated with ghost BO Fixed: 5b951e4 ("drm/ttm: fix bulk move handling v2") Signed-off-by: ZhenGuo Yin <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c7943bb commit d91c411

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/ttm/ttm_bo_util.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
239239
if (fbo->base.resource) {
240240
ttm_resource_set_bo(fbo->base.resource, &fbo->base);
241241
bo->resource = NULL;
242+
ttm_bo_set_bulk_move(&fbo->base, NULL);
243+
} else {
244+
fbo->base.bulk_move = NULL;
242245
}
243246

244247
dma_resv_init(&fbo->base.base._resv);

0 commit comments

Comments
 (0)