drm/ttm/tt: add wrappers to set tt state.
This adds 2 getters and 4 setters, however unbound and populated are currently the same thing, this will change, it also drops a BUG_ON that seems not that useful. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-2-airlied@gmail.com
This commit is contained in:
@ -1304,7 +1304,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_bo_device *bdev,
|
||||
return -ENOMEM;
|
||||
|
||||
ttm->page_flags |= TTM_PAGE_FLAG_SG;
|
||||
ttm->state = tt_unbound;
|
||||
ttm_tt_set_populated(ttm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1324,7 +1324,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_bo_device *bdev,
|
||||
drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
|
||||
gtt->ttm.dma_address,
|
||||
ttm->num_pages);
|
||||
ttm->state = tt_unbound;
|
||||
ttm_tt_set_populated(ttm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user