Commit 1f445210 authored by Leo Liu's avatar Leo Liu Committed by Alex Deucher

drm/amdgpu: fix UVD suspend and resume for VI APU

User space passed the same handle before suspend and after resume,
so we have remove the session and handle destroy, and keep the
firmware untouched.
Signed-off-by: default avatarLeo Liu <leo.liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
parent 2bd188d0
...@@ -214,10 +214,12 @@ static int uvd_v6_0_suspend(void *handle) ...@@ -214,10 +214,12 @@ static int uvd_v6_0_suspend(void *handle)
int r; int r;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
r = amdgpu_uvd_suspend(adev); /* Skip this for APU for now */
if (r) if (!(adev->flags & AMD_IS_APU)) {
return r; r = amdgpu_uvd_suspend(adev);
if (r)
return r;
}
r = uvd_v6_0_hw_fini(adev); r = uvd_v6_0_hw_fini(adev);
if (r) if (r)
return r; return r;
...@@ -230,10 +232,12 @@ static int uvd_v6_0_resume(void *handle) ...@@ -230,10 +232,12 @@ static int uvd_v6_0_resume(void *handle)
int r; int r;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
r = amdgpu_uvd_resume(adev); /* Skip this for APU for now */
if (r) if (!(adev->flags & AMD_IS_APU)) {
return r; r = amdgpu_uvd_resume(adev);
if (r)
return r;
}
r = uvd_v6_0_hw_init(adev); r = uvd_v6_0_hw_init(adev);
if (r) if (r)
return r; return r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment