From: Jack Zhang Date: Tue, 7 Apr 2020 05:50:05 +0000 (+0800) Subject: drm/amdgpu/sriov add amdgpu_amdkfd_pre_reset in gpu reset X-Git-Tag: v5.8-rc1~194^2~15^2~159 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b639c22c98ff0ba140799ddc56f639240014f999;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu/sriov add amdgpu_amdkfd_pre_reset in gpu reset [PATCH 2/2] kfd_pre_reset will free mem_objs allocated by kfd_gtt_sa_allocate Without this change, sriov tdr code path will never free those allocated memories and get memory leak. Signed-off-by: Jack Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index c387771844330..f7c51fe1bc352 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3850,6 +3850,8 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev, if (r) return r; + amdgpu_amdkfd_pre_reset(adev); + /* Resume IP prior to SMC */ r = amdgpu_device_ip_reinit_early_sriov(adev); if (r)