diff options
author | Dave Airlie <airlied@redhat.com> | 2020-08-04 12:55:58 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-08-06 12:32:03 +1000 |
commit | 4265accbfc724a68894f91737e765e2cce43fe4e (patch) | |
tree | 166cae096a550ce8dd76d97ec18bc47035a35b05 /drivers/gpu/drm/ttm | |
parent | a006a3ce8efc9e8276d0f0193c04f2efb0e28135 (diff) |
drm/ttm: make some inline helper functions for cleanup paths. (v2)
The disable path is just temporary for now, it will be dropped once has_type
is gone in a later patch.
v2: add docs.
rename to ttm_mem_type_manager namespace
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-26-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 53017cf06527..be0c0a01b929 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1466,8 +1466,7 @@ int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type) return ret; } - man->use_type = false; - man->has_type = false; + ttm_mem_type_manager_disable(man); ret = 0; if (mem_type > 0) { @@ -1480,8 +1479,7 @@ int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type) ret = (*man->func->takedown)(man); } - dma_fence_put(man->move); - man->move = NULL; + ttm_mem_type_manager_cleanup(man); return ret; } |