drm/amdgpu: do not disable SMU on vm reboot
authorNirmoy Das <nirmoy.das@amd.com>
Fri, 10 Jul 2020 14:15:40 +0000 (16:15 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Jul 2020 19:37:39 +0000 (15:37 -0400)
For passthrough device,  we do baco reset after 1st vm boot so
if we disable SMU on 1st VM shutdown baco reset will fail for
2nd vm boot.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 2eacf1f..26127c7 100644 (file)
@@ -1186,7 +1186,8 @@ amdgpu_pci_shutdown(struct pci_dev *pdev)
         * unfortunately we can't detect certain
         * hypervisors so just do this all the time.
         */
-       adev->mp1_state = PP_MP1_STATE_UNLOAD;
+       if (!amdgpu_passthrough(adev))
+               adev->mp1_state = PP_MP1_STATE_UNLOAD;
        amdgpu_device_ip_suspend(adev);
        adev->mp1_state = PP_MP1_STATE_NONE;
 }