summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorJack Zhang <Jack.Zhang1@amd.com>2020-04-02 15:10:24 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 13:17:54 +0200
commitcb1dfad688ef9aa7140933a5fe7ffe49b2ee5c48 (patch)
tree7c0ca29993b88a481967f1ba999f1eb504be60cd /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent644148cd15378b89123e9cdc9d1840cf6135f7ea (diff)
downloadlinux-stable-cb1dfad688ef9aa7140933a5fe7ffe49b2ee5c48.tar.gz
linux-stable-cb1dfad688ef9aa7140933a5fe7ffe49b2ee5c48.tar.bz2
linux-stable-cb1dfad688ef9aa7140933a5fe7ffe49b2ee5c48.zip
drm/amdgpu/sriov add amdgpu_amdkfd_pre_reset in gpu reset
[ Upstream commit 04bef61e5da18c2b301c629a209ccdba4d4c6fbb ] 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. v2:add a bugfix for kiq ring test fail Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 5e1dce424154..4105fbf57167 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3466,6 +3466,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)