diff options
| author | Dave Airlie <[email protected]> | 2020-09-15 01:16:53 +0000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2020-09-15 23:34:54 +0000 |
| commit | 2040ec970e94dde0b94e200ae9bb8f21a61c928f (patch) | |
| tree | ee69d70cc3bf124bf28ddc5276fe632c042e1ed8 /drivers/gpu/drm/ttm/ttm_bo_util.c | |
| parent | drm/ttm: tt destroy move null check to outer function. (diff) | |
| download | kernel-2040ec970e94dde0b94e200ae9bb8f21a61c928f.tar.gz kernel-2040ec970e94dde0b94e200ae9bb8f21a61c928f.zip | |
drm/ttm: split populate out from binding.
Drivers have to call populate themselves now before binding.
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
| -rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 8389972a1ed6..2ce97760a089 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -77,7 +77,12 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo, return ret; if (new_mem->mem_type != TTM_PL_SYSTEM) { - ret = ttm_tt_bind(bo->bdev, ttm, new_mem, ctx); + + ret = ttm_tt_populate(bo->bdev, ttm, ctx); + if (unlikely(ret != 0)) + return ret; + + ret = ttm_tt_bind(bo->bdev, ttm, new_mem); if (unlikely(ret != 0)) return ret; } |
