diff options
author | Dave Airlie <airlied@redhat.com> | 2020-09-15 11:42:30 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-09-16 09:35:47 +1000 |
commit | 3a4ab168a5df5c9532763ac26cde5c2ad06ca1e5 (patch) | |
tree | 061db5a5cf3b43865bf0ee80152754cacbe05f56 /drivers/gpu/drm/ttm | |
parent | 9e9a153bdf2555a931fd37678a8e44d170a5d943 (diff) |
drm/ttm: split bound/populated flags.
Move bound up into the bo object, and keep populated with the tt
object.
The ghost object handling needs to follow the flags at the bo
level now instead of it being part of the ttm tt object.
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-7-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index d6634a5caba2..980368049d68 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -572,10 +572,13 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, * bo to be unbound and destroyed. */ - if (man->use_tt) + if (man->use_tt) { ghost_obj->ttm = NULL; - else + ttm_bo_tt_set_unbound(ghost_obj); + } else { bo->ttm = NULL; + ttm_bo_tt_set_unbound(bo); + } dma_resv_unlock(&ghost_obj->base._resv); ttm_bo_put(ghost_obj); @@ -628,10 +631,13 @@ int ttm_bo_pipeline_move(struct ttm_buffer_object *bo, * bo to be unbound and destroyed. */ - if (to->use_tt) + if (to->use_tt) { ghost_obj->ttm = NULL; - else + ttm_bo_tt_set_unbound(ghost_obj); + } else { bo->ttm = NULL; + ttm_bo_tt_set_unbound(bo); + } dma_resv_unlock(&ghost_obj->base._resv); ttm_bo_put(ghost_obj); @@ -695,6 +701,7 @@ int ttm_bo_pipeline_gutting(struct ttm_buffer_object *bo) memset(&bo->mem, 0, sizeof(bo->mem)); bo->mem.mem_type = TTM_PL_SYSTEM; bo->ttm = NULL; + ttm_bo_tt_set_unbound(bo); dma_resv_unlock(&ghost->base._resv); ttm_bo_put(ghost); |