drm/amdgpu/mes: implement removing mes ring
Remove the mes ring and its resources. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d0c423b647
commit
9cc654c8ce
@ -846,3 +846,14 @@ clean_up_memory:
|
||||
mutex_unlock(&adev->mes.mutex);
|
||||
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,
|
||||
int queue_type, int idx,
|
||||
struct amdgpu_mes_ctx_data *ctx_data,
|
||||
struct amdgpu_ring **out);
|
||||
void amdgpu_mes_remove_ring(struct amdgpu_device *adev,
|
||||
struct amdgpu_ring *ring);
|
||||
|
||||
#endif /* __AMDGPU_MES_H__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user