aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0556-drm-amdgpu-fix-UVD-suspend-and-resume-for-VI-APU.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0556-drm-amdgpu-fix-UVD-suspend-and-resume-for-VI-APU.patch')
-rw-r--r--meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0556-drm-amdgpu-fix-UVD-suspend-and-resume-for-VI-APU.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0556-drm-amdgpu-fix-UVD-suspend-and-resume-for-VI-APU.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0556-drm-amdgpu-fix-UVD-suspend-and-resume-for-VI-APU.patch
new file mode 100644
index 00000000..1fb65421
--- /dev/null
+++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0556-drm-amdgpu-fix-UVD-suspend-and-resume-for-VI-APU.patch
@@ -0,0 +1,60 @@
+From 1f4452105ce39786be13b4636251377a30d1286a Mon Sep 17 00:00:00 2001
+From: Leo Liu <leo.liu@amd.com>
+Date: Fri, 11 Sep 2015 17:09:57 -0400
+Subject: [PATCH 0556/1050] drm/amdgpu: fix UVD suspend and resume for VI APU
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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: Leo Liu <leo.liu@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Cc: stable@vger.kernel.org
+---
+ drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+index a7622ef..7e9934f 100644
+--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+@@ -214,10 +214,12 @@ static int uvd_v6_0_suspend(void *handle)
+ int r;
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
+- r = amdgpu_uvd_suspend(adev);
+- if (r)
+- return r;
+-
++ /* Skip this for APU for now */
++ if (!(adev->flags & AMD_IS_APU)) {
++ r = amdgpu_uvd_suspend(adev);
++ if (r)
++ return r;
++ }
+ r = uvd_v6_0_hw_fini(adev);
+ if (r)
+ return r;
+@@ -230,10 +232,12 @@ static int uvd_v6_0_resume(void *handle)
+ int r;
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
+- r = amdgpu_uvd_resume(adev);
+- if (r)
+- return r;
+-
++ /* Skip this for APU for now */
++ if (!(adev->flags & AMD_IS_APU)) {
++ r = amdgpu_uvd_resume(adev);
++ if (r)
++ return r;
++ }
+ r = uvd_v6_0_hw_init(adev);
+ if (r)
+ return r;
+--
+1.9.1
+