aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo_util.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-17 12:54:24 +1000
committerDave Airlie <airlied@redhat.com>2020-09-18 06:14:00 +1000
commit0b988ca1c7c4c73983b4ea96ef7c2af2263c87eb (patch)
tree729ee7adfc399e41f03a768f1a1df8f036d7af88 /drivers/gpu/drm/ttm/ttm_bo_util.c
parent67d6a8b358eac488112a4775f77dc3dbf63bea88 (diff)
downloadkernel_replicant_linux-0b988ca1c7c4c73983b4ea96ef7c2af2263c87eb.tar.gz
kernel_replicant_linux-0b988ca1c7c4c73983b4ea96ef7c2af2263c87eb.tar.bz2
kernel_replicant_linux-0b988ca1c7c4c73983b4ea96ef7c2af2263c87eb.zip
drm/ttm: protect against reentrant bind in the drivers
This moves the generic tracking into the drivers and protects against reentrancy in the drivers. It fixes up radeon and agp to be able to query the bound status as that is required. 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-2-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 980368049d68..919489f6a5a3 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -574,10 +574,8 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
if (man->use_tt) {
ghost_obj->ttm = NULL;
- ttm_bo_tt_set_unbound(ghost_obj);
} else {
bo->ttm = NULL;
- ttm_bo_tt_set_unbound(bo);
}
dma_resv_unlock(&ghost_obj->base._resv);
@@ -633,10 +631,8 @@ int ttm_bo_pipeline_move(struct ttm_buffer_object *bo,
if (to->use_tt) {
ghost_obj->ttm = NULL;
- ttm_bo_tt_set_unbound(ghost_obj);
} else {
bo->ttm = NULL;
- ttm_bo_tt_set_unbound(bo);
}
dma_resv_unlock(&ghost_obj->base._resv);
@@ -701,7 +697,6 @@ 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);