diff options
author | Jack Xiao <Jack.Xiao@amd.com> | 2019-04-12 19:11:18 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-21 18:59:28 -0500 |
commit | 71c57941889173d11a3261d5d619bc2bfc1f8e4d (patch) | |
tree | 668233cd07aa9d1f4c670ce5202c3e7f0d65b433 /drivers/gpu/drm/amd/amdgpu | |
parent | 85c90e9b54047e591fa9fc2f45ce9b3f4d74eac0 (diff) |
drm/amdgpu/mes10.1: implement ucode buffers destruction
Free ucode GPU buffers.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c b/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c index 764967b20c40..edf1fbc1d02d 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v10_1.c @@ -169,6 +169,17 @@ static int mes_v10_1_allocate_ucode_data_buffer(struct amdgpu_device *adev) return 0; } +static void mes_v10_1_free_ucode_buffers(struct amdgpu_device *adev) +{ + amdgpu_bo_free_kernel(&adev->mes.data_fw_obj, + &adev->mes.data_fw_gpu_addr, + (void **)&adev->mes.data_fw_ptr); + + amdgpu_bo_free_kernel(&adev->mes.ucode_fw_obj, + &adev->mes.ucode_fw_gpu_addr, + (void **)&adev->mes.ucode_fw_ptr); +} + static int mes_v10_1_sw_init(void *handle) { return 0; |