diff options
author | Dave Airlie <airlied@redhat.com> | 2020-09-15 11:16:53 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-09-16 09:34:54 +1000 |
commit | 2040ec970e94dde0b94e200ae9bb8f21a61c928f (patch) | |
tree | ee69d70cc3bf124bf28ddc5276fe632c042e1ed8 /drivers/gpu/drm/radeon | |
parent | drm/ttm: tt destroy move null check to outer function. (diff) | |
download | linux-dev-2040ec970e94dde0b94e200ae9bb8f21a61c928f.tar.xz linux-dev-2040ec970e94dde0b94e200ae9bb8f21a61c928f.zip |
drm/ttm: split populate out from binding.
Drivers have to call populate themselves now before binding.
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-5-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ttm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index b0e8c9337f54..283302898201 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -233,7 +233,12 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo, goto out_cleanup; } - r = ttm_tt_bind(bo->bdev, bo->ttm, &tmp_mem, &ctx); + r = ttm_tt_populate(bo->bdev, bo->ttm, &ctx); + if (unlikely(r)) { + goto out_cleanup; + } + + r = ttm_tt_bind(bo->bdev, bo->ttm, &tmp_mem); if (unlikely(r)) { goto out_cleanup; } |