[PATCH] drm/amdgpu: correct in_suspend setting for navi series

Deucher, Alexander Alexander.Deucher at amd.com
Tue Aug 27 12:50:47 UTC 2019


Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Hawking Zhang <Hawking.Zhang at amd.com>
Sent: Tuesday, August 27, 2019 5:19 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>
Subject: [PATCH] drm/amdgpu: correct in_suspend setting for navi series

in_suspend flag should be set in amdgpu_device_suspend/resume in pairs,
instead of gfx10 ip suspend/resume function.

Signed-off-by: Hawking Zhang <Hawking.Zhang at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index f708912..a2f4ff1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -3768,20 +3768,12 @@ static int gfx_v10_0_hw_fini(void *handle)

 static int gfx_v10_0_suspend(void *handle)
 {
-       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-
-       adev->in_suspend = true;
-       return gfx_v10_0_hw_fini(adev);
+       return gfx_v10_0_hw_fini(handle);
 }

 static int gfx_v10_0_resume(void *handle)
 {
-       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-       int r;
-
-       r = gfx_v10_0_hw_init(adev);
-       adev->in_suspend = false;
-       return r;
+       return gfx_v10_0_hw_init(handle);
 }

 static bool gfx_v10_0_is_idle(void *handle)
--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190827/6e88cff9/attachment-0001.html>


More information about the amd-gfx mailing list