aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/2965-drm-amdgpu-always-cancel-uvd-idle-handler-in-uvd-sus.patch
blob: 8644d25feb6aac76d64b98cabcfb8aac5cda8a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 78dd36b1099c02e437dcc08b77a5024993c2bc11 Mon Sep 17 00:00:00 2001
From: Jim Qu <Jim.Qu@amd.com>
Date: Fri, 15 Dec 2017 15:27:57 +0800
Subject: [PATCH 2965/4131] drm/amdgpu: always cancel uvd idle handler in uvd
 suspend
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: I62720a2df92005c8838f2e6a505f7d4840903ebb
Signed-off-by: Jim Qu <Jim.Qu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index ed73661..b2b15ea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -296,6 +296,7 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
 
 	if (adev->uvd.vcpu_bo == NULL)
 		return 0;
+	cancel_delayed_work_sync(&adev->uvd.idle_work);
 
 	/* only valid for physical mode */
 	if (adev->asic_type < CHIP_POLARIS10) {
@@ -307,8 +308,6 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
 			return 0;
 	}
 
-	cancel_delayed_work_sync(&adev->uvd.idle_work);
-
 	size = amdgpu_bo_size(adev->uvd.vcpu_bo);
 	ptr = adev->uvd.cpu_addr;
 
-- 
2.7.4