[PATCH] free the metadata buffer for sg type BOs as well
Das, Nirmoy
Nirmoy.Das at amd.com
Wed May 26 11:31:17 UTC 2021
[AMD Official Use Only]
Please add a commit message as well.
With that, this is Acked-by: Nirmoy Das <Nirmoy.das at amd.com> but Christian should review it as well.
Nirmoy
-----Original Message-----
From: Zhang, Morris <Shiwu.Zhang at amd.com>
Sent: Wednesday, May 26, 2021 5:46 AM
To: amd-gfx at lists.freedesktop.org; Das, Nirmoy <Nirmoy.Das at amd.com>
Subject: [PATCH] free the metadata buffer for sg type BOs as well
Signed-off-by: Shiwu Zhang <shiwu.zhang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 2d876e1eaa7c..e9f8701fd046 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -95,7 +95,7 @@ static void amdgpu_bo_destroy(struct ttm_buffer_object *tbo)
}
amdgpu_bo_unref(&bo->parent);
- if (bo->tbo.type == ttm_bo_type_device) {
+ if (bo->tbo.type != ttm_bo_type_kernel) {
ubo = to_amdgpu_bo_user(bo);
kfree(ubo->metadata);
}
--
2.17.1
More information about the amd-gfx
mailing list