drm/amdgpu: move full access into amdgpu_device_ip_suspend
Subsystems (2)
PATCH 1/1 drm/amdgpu: move full access into amdgpu_device_ip_suspend
It will be more safe to make full-acess include both phase1 and phase2. Then accessing special registeris wherever at phase1 or phase2 will not block any shutdown and suspend process under virtualization.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -6
@@ -1932,9 +1932,6 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) {int i, r; -if (amdgpu_sriov_vf (adev)) -amdgpu_virt_request_full_gpu (adev, false); -amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE );amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );
@@ -1953,9 +1950,6 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) } } -if (amdgpu_sriov_vf (adev)) -amdgpu_virt_release_full_gpu (adev, false); -return 0 ; }
@@ -2007,11 +2001,17 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev) {int r; +if (amdgpu_sriov_vf (adev)) +amdgpu_virt_request_full_gpu (adev, false); + r =amdgpu_device_ip_suspend_phase1 (adev);if (r)return r; r =amdgpu_device_ip_suspend_phase2 (adev); +if (amdgpu_sriov_vf (adev)) +amdgpu_virt_release_full_gpu (adev, false); +return r; }
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): 1534937049-7630-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Acked-byQuoted 6 lines · Yintian Tao
It will be more safe to make full-acess include both phase1 and phase2. Then accessing special registeris wherever at phase1 or phase2 will not block any shutdown and suspend process under virtualization.
Signed-off-by Yintian Tao <[email protected]>
Quoted 49 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6
-7@@ -1932,9 +1932,6 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) {int i, r; -if (amdgpu_sriov_vf (adev)) -amdgpu_virt_request_full_gpu (adev, false); -amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE );amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );@@ -1953,9 +1950,6 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) } } -if (amdgpu_sriov_vf (adev)) -amdgpu_virt_release_full_gpu (adev, false); -return 0 ; }@@ -2007,11 +2001,17 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev) {int r; +if (amdgpu_sriov_vf (adev)) +amdgpu_virt_request_full_gpu (adev, false); + r =amdgpu_device_ip_suspend_phase1 (adev);if (r)return r; r =amdgpu_device_ip_suspend_phase2 (adev); +if (amdgpu_sriov_vf (adev)) +amdgpu_virt_release_full_gpu (adev, false); +return r; } --2.7.4
Quoted 4 lines
_______________________________________________
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