mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-16 02:44:26 +08:00
drm/ttm: tt destroy move null check to outer function.
This just makes things easier later. 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-4-airlied@gmail.com
This commit is contained in:
parent
2ff6e69c04
commit
395a73f8ba
@ -1613,6 +1613,8 @@ EXPORT_SYMBOL(ttm_bo_swapout_all);
|
|||||||
|
|
||||||
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
|
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
|
||||||
{
|
{
|
||||||
|
if (bo->ttm == NULL)
|
||||||
|
return;
|
||||||
ttm_tt_destroy(bo->bdev, bo->ttm);
|
ttm_tt_destroy(bo->bdev, bo->ttm);
|
||||||
bo->ttm = NULL;
|
bo->ttm = NULL;
|
||||||
}
|
}
|
||||||
|
@ -696,3 +696,4 @@ int ttm_bo_pipeline_gutting(struct ttm_buffer_object *bo)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,9 +209,6 @@ EXPORT_SYMBOL(ttm_tt_set_placement_caching);
|
|||||||
|
|
||||||
void ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
|
void ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
|
||||||
{
|
{
|
||||||
if (ttm == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ttm_tt_unbind(bdev, ttm);
|
ttm_tt_unbind(bdev, ttm);
|
||||||
|
|
||||||
ttm_tt_unpopulate(bdev, ttm);
|
ttm_tt_unpopulate(bdev, ttm);
|
||||||
|
Loading…
Reference in New Issue
Block a user