mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/ttm: move initializing ttm->sg into ttm_tt_init_fields
Better to set this with all other fields as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
dde5da2379
commit
536bbeba9b
1 changed files with 1 additions and 3 deletions
|
@ -77,9 +77,6 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc)
|
|||
if (unlikely(bo->ttm == NULL))
|
||||
return -ENOMEM;
|
||||
|
||||
if (bo->type == ttm_bo_type_sg)
|
||||
bo->ttm->sg = bo->sg;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -245,6 +242,7 @@ void ttm_tt_init_fields(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
|
|||
ttm->page_flags = page_flags;
|
||||
ttm->state = tt_unpopulated;
|
||||
ttm->swap_storage = NULL;
|
||||
ttm->sg = bo->sg;
|
||||
}
|
||||
|
||||
int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
|
||||
|
|
Loading…
Add table
Reference in a new issue