Skip to contentSkip to conversation

drm/amdgpu: fix reboot failure issue for virtualization

PATCH In review Xiangliang Yu 3 participants 3 messages Jan 18, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: fix reboot failure issue for virtualization

Reboot process will call HW fini functions of IP blocks. For virt, need to send event three before hw fini and send event four after hw fini.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -0
index 2868128..4b82081 100644
@@ -1566,6 +1566,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
 {
 	int i, r;
 
+	if (amdgpu_sriov_vf(adev))
+		amdgpu_virt_request_full_gpu(adev, false);
+
 	/* ungate SMC block first */
 	r = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_SMC,
 					 AMD_CG_STATE_UNGATE);
@@ -1594,6 +1597,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
 		}
 	}
 
+	if (amdgpu_sriov_vf(adev))
+		amdgpu_virt_release_full_gpu(adev, false);
+
 	return 0;
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1484715614-5702-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Monk Liu
#2 lore raw

________________________________
发件人: amd-gfx <[email protected]> 代表 Xiangliang Yu <[email protected]> 发送时间: 2017年1月18日 13:00:14
收件人: [email protected]
抄送: Yu, Xiangliang
主题: [PATCH 1/2] drm/amdgpu: fix reboot failure issue for virtualization

Reboot process will call HW fini functions of IP blocks. For virt, need to send event three before hw fini and send event four after hw fini.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -0
index 2868128..4b82081 100644
@@ -1566,6 +1566,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
 {
         int i, r;
 
+       if (amdgpu_sriov_vf(adev))
+               amdgpu_virt_request_full_gpu(adev, false);
+
         /* ungate SMC block first */
         r = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_SMC,
                                          AMD_CG_STATE_UNGATE);
@@ -1594,6 +1597,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
                 }
         }
 
+       if (amdgpu_sriov_vf(adev))
+               amdgpu_virt_release_full_gpu(adev, false);
+
         return 0;
 }
 

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#3 lore raw
In reply to a message not in the archive

Am 18.01.2017 um 06:00 schrieb Xiangliang Yu:

Quoted 5 lines

Reboot process will call HW fini functions of IP blocks. For virt, need to send event three before hw fini and send event four after hw fini.

Quoted 19 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
index 2868128..4b82081 100644
@@ -1566,6 +1566,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
  {
  	int i, r;
 
+	if (amdgpu_sriov_vf(adev))
+		amdgpu_virt_request_full_gpu(adev, false);
+
  	/* ungate SMC block first */
  	r = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_SMC,
  					 AMD_CG_STATE_UNGATE);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_suspend(struct amdgpu_device *adev) · line 1605

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -1594,6 +1597,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
  		}
  	}
 
+	if (amdgpu_sriov_vf(adev))
+		amdgpu_virt_release_full_gpu(adev, false);
+
  	return 0;
  }
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx