diff options
author | Dave Airlie <airlied@redhat.com> | 2020-10-20 11:03:13 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-10-21 13:43:21 +1000 |
commit | 9764c35348b4c0da722a234fd355119abb371196 (patch) | |
tree | 74d80c554e23af1edfbfe67f5c5f63ee1ef9ba8d /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | 47170f89f76b28c55f359b4766da41d6b91d9ffe (diff) | |
download | linux-9764c35348b4c0da722a234fd355119abb371196.tar.bz2 |
drm/ttm: move some move binds into the drivers
This just gives the driver control over some of the bind paths.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-2-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index ec79c3b251e8..526bbf4c399a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -931,9 +931,13 @@ nouveau_bo_move_flips(struct ttm_buffer_object *bo, bool evict, if (ret) return ret; - ret = ttm_bo_move_to_new_tt_mem(bo, ctx, &tmp_reg); - if (ret) - goto out; + ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx); + if (unlikely(ret != 0)) + return ret; + + ret = nouveau_ttm_tt_bind(bo->bdev, bo->ttm, &tmp_reg); + if (unlikely(ret != 0)) + return ret; ttm_bo_assign_mem(bo, &tmp_reg); ret = nouveau_bo_move_m2mf(bo, true, ctx, new_reg); |