[PATCH] drm/amdgpu: do not disable SMU on vm reboot

Quan, Evan Evan.Quan at amd.com
Wed Jul 15 05:12:15 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Acked-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: Nirmoy Das <nirmoy.aiemd at gmail.com>
Sent: Friday, July 10, 2020 10:51 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Quan, Evan <Evan.Quan at amd.com>; Das, Nirmoy <Nirmoy.Das at amd.com>
Subject: [PATCH] drm/amdgpu: do not disable SMU on vm reboot

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 at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index d1adbc45d37b..07be61ce969a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1178,7 +1178,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;
 }
--
2.27.0



More information about the amd-gfx mailing list