drm/ttm: flip tt destroy ordering.
Call the driver first and have it call the common code cleanup. This is useful later to fix unbind. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-3-airlied@gmail.com
This commit is contained in:
@@ -207,7 +207,7 @@ int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement)
|
||||
}
|
||||
EXPORT_SYMBOL(ttm_tt_set_placement_caching);
|
||||
|
||||
void ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
|
||||
void ttm_tt_destroy_common(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
|
||||
{
|
||||
ttm_tt_unpopulate(bdev, ttm);
|
||||
|
||||
@@ -216,6 +216,11 @@ void ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
|
||||
fput(ttm->swap_storage);
|
||||
|
||||
ttm->swap_storage = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(ttm_tt_destroy_common);
|
||||
|
||||
void ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
|
||||
{
|
||||
bdev->driver->ttm_tt_destroy(bdev, ttm);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user