mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/ttm: add ttm_resource_fini v2
Make sure we call the common cleanup function in all
implementations of the resource manager.
v2: fix missing case in i915, rudimentary kerneldoc, should be
filled in more when we add more functionality
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220124122514.1832-2-christian.koenig@amd.com
This commit is contained in:
@@ -169,6 +169,7 @@ static int amdgpu_gtt_mgr_new(struct ttm_resource_manager *man,
|
||||
return 0;
|
||||
|
||||
err_free:
|
||||
ttm_resource_fini(man, &node->base.base);
|
||||
kfree(node);
|
||||
|
||||
err_out:
|
||||
@@ -200,6 +201,7 @@ static void amdgpu_gtt_mgr_del(struct ttm_resource_manager *man,
|
||||
if (!(res->placement & TTM_PL_FLAG_TEMPORARY))
|
||||
atomic64_sub(res->num_pages, &mgr->used);
|
||||
|
||||
ttm_resource_fini(man, res);
|
||||
kfree(node);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user