diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2019-08-27 05:13:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-08-29 16:52:26 -0400 |
commit | 317f9cc97bdcfef1e873ba4dfa2b7af87a17775f (patch) | |
tree | 192aa4a2e06f1be27af7337582a36886b8e3aafa | |
parent | c072b0c24e6b8a1951b26b3a575e9e0491bd7bfe (diff) |
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@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 |
1 files 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 79d3fbd3ba63..db28823891ac 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | |||
@@ -3781,20 +3781,12 @@ static int gfx_v10_0_hw_fini(void *handle) | |||
3781 | 3781 | ||
3782 | static int gfx_v10_0_suspend(void *handle) | 3782 | static int gfx_v10_0_suspend(void *handle) |
3783 | { | 3783 | { |
3784 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 3784 | return gfx_v10_0_hw_fini(handle); |
3785 | |||
3786 | adev->in_suspend = true; | ||
3787 | return gfx_v10_0_hw_fini(adev); | ||
3788 | } | 3785 | } |
3789 | 3786 | ||
3790 | static int gfx_v10_0_resume(void *handle) | 3787 | static int gfx_v10_0_resume(void *handle) |
3791 | { | 3788 | { |
3792 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 3789 | return gfx_v10_0_hw_init(handle); |
3793 | int r; | ||
3794 | |||
3795 | r = gfx_v10_0_hw_init(adev); | ||
3796 | adev->in_suspend = false; | ||
3797 | return r; | ||
3798 | } | 3790 | } |
3799 | 3791 | ||
3800 | static bool gfx_v10_0_is_idle(void *handle) | 3792 | static bool gfx_v10_0_is_idle(void *handle) |