You need to sign in or sign up before continuing.
提交 9cc654c8 编写于 作者: J Jack Xiao 提交者: Alex Deucher

drm/amdgpu/mes: implement removing mes ring

Remove the mes ring and its resources.
Signed-off-by: NJack Xiao <Jack.Xiao@amd.com>
Acked-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 d0c423b6
...@@ -846,3 +846,14 @@ int amdgpu_mes_add_ring(struct amdgpu_device *adev, int gang_id, ...@@ -846,3 +846,14 @@ int amdgpu_mes_add_ring(struct amdgpu_device *adev, int gang_id,
mutex_unlock(&adev->mes.mutex); mutex_unlock(&adev->mes.mutex);
return r; return r;
} }
void amdgpu_mes_remove_ring(struct amdgpu_device *adev,
struct amdgpu_ring *ring)
{
if (!ring)
return;
amdgpu_mes_remove_hw_queue(adev, ring->hw_queue_id);
amdgpu_ring_fini(ring);
kfree(ring);
}
...@@ -259,5 +259,7 @@ int amdgpu_mes_add_ring(struct amdgpu_device *adev, int gang_id, ...@@ -259,5 +259,7 @@ int amdgpu_mes_add_ring(struct amdgpu_device *adev, int gang_id,
int queue_type, int idx, int queue_type, int idx,
struct amdgpu_mes_ctx_data *ctx_data, struct amdgpu_mes_ctx_data *ctx_data,
struct amdgpu_ring **out); struct amdgpu_ring **out);
void amdgpu_mes_remove_ring(struct amdgpu_device *adev,
struct amdgpu_ring *ring);
#endif /* __AMDGPU_MES_H__ */ #endif /* __AMDGPU_MES_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册