diff options
author | Christian König <christian.koenig@amd.com> | 2022-02-18 12:05:40 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2022-05-09 15:49:50 +0300 |
commit | 3507932390bbfcf7c69dff9843f1c9da6ed4b861 (patch) | |
tree | d4fa2e34a9a6eb79d4066064d1baaeace4b043c7 /drivers/gpu/drm/ttm | |
parent | f0eaf60c67738da8aae786bda74a2fffeca6d7cc (diff) | |
download | linux-3507932390bbfcf7c69dff9843f1c9da6ed4b861.tar.xz |
drm/ttm: move default BO destructor into VMWGFX v2
It's the only driver using this.
v2: use BUG_ON() in vmw_bo_create() as suggested by Zack
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220329110243.6335-5-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 75d308ec173d..296af2b89951 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -44,12 +44,6 @@ #include "ttm_module.h" -/* default destructor */ -static void ttm_bo_default_destroy(struct ttm_buffer_object *bo) -{ - kfree(bo); -} - static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo, struct ttm_placement *placement) { @@ -936,8 +930,7 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, bool locked; int ret; - bo->destroy = destroy ? destroy : ttm_bo_default_destroy; - + bo->destroy = destroy; kref_init(&bo->kref); INIT_LIST_HEAD(&bo->ddestroy); bo->bdev = bdev; |