drm/amdgpu/sriov:don't load psp fw during gpu reset
authorMonk Liu <Monk.Liu@amd.com>
Fri, 15 Sep 2017 10:42:12 +0000 (18:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 19:14:09 +0000 (15:14 -0400)
At least for SRIOV we found reload PSP fw during
gpu reset cause PSP hang.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index a5b595a75d9103cdbbd97dba80f1825e66b65b55..e02828665b14a5ec3fc3cc462a72d836fd721d2f 100644 (file)
@@ -255,15 +255,18 @@ static int psp_asd_load(struct psp_context *psp)
 
 static int psp_hw_start(struct psp_context *psp)
 {
+       struct amdgpu_device *adev = psp->adev;
        int ret;
 
-       ret = psp_bootloader_load_sysdrv(psp);
-       if (ret)
-               return ret;
+       if (!amdgpu_sriov_vf(adev) || !adev->in_sriov_reset) {
+               ret = psp_bootloader_load_sysdrv(psp);
+               if (ret)
+                       return ret;
 
-       ret = psp_bootloader_load_sos(psp);
-       if (ret)
-               return ret;
+               ret = psp_bootloader_load_sos(psp);
+               if (ret)
+                       return ret;
+       }
 
        ret = psp_ring_create(psp, PSP_RING_TYPE__KM);
        if (ret)