diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-10-18 05:19:42 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-19 15:27:16 -0400 |
commit | 6e13bdf6b2d71ab2366a9f87c99d11963aed3bad (patch) | |
tree | 6e4b7e06efc6b5cda96866fb0b0cf157e6f60654 /drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |
parent | 09da3c0e5b407eab205f6783bb17b5793da8be79 (diff) |
drm/amdgpu: fix regresstion on SR-IOV gpu reset failed
fw ucode is corrupted after vf flr by PSP so ucode_init() is
a must in psp_hw_init othewise KIQ/KCQ enabling will fail
Revert "drm/amdgpu: refine code delete duplicated error handling"
This reverts commit e57b87ff828f95efe992468e6d18c2c059b27aa9.
Revert "drm/amdgpu: move amdgpu_ucode_init_bo to amdgpu_device.c"
This reverts commit 815b8f8595148d06a64d2ce4282e8e80dfcb02f1.
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 3b42f407971d..5f5aa5fddc16 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -145,6 +145,8 @@ static int amdgpu_pp_hw_init(void *handle) | |||
145 | int ret = 0; | 145 | int ret = 0; |
146 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 146 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
147 | 147 | ||
148 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) | ||
149 | amdgpu_ucode_init_bo(adev); | ||
148 | 150 | ||
149 | if (adev->powerplay.ip_funcs->hw_init) | 151 | if (adev->powerplay.ip_funcs->hw_init) |
150 | ret = adev->powerplay.ip_funcs->hw_init( | 152 | ret = adev->powerplay.ip_funcs->hw_init( |
@@ -162,6 +164,9 @@ static int amdgpu_pp_hw_fini(void *handle) | |||
162 | ret = adev->powerplay.ip_funcs->hw_fini( | 164 | ret = adev->powerplay.ip_funcs->hw_fini( |
163 | adev->powerplay.pp_handle); | 165 | adev->powerplay.pp_handle); |
164 | 166 | ||
167 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) | ||
168 | amdgpu_ucode_fini_bo(adev); | ||
169 | |||
165 | return ret; | 170 | return ret; |
166 | } | 171 | } |
167 | 172 | ||