aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1107-drm-amdgpu-fix-UVD-enabled-display-after-system-resu.patch
blob: 6df693cc9150237badb2cc45e603a59e3ddaf280 (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
41
42
43
44
45
From 7bfda3a4c5a894c4f91ff0acd600e551664d8105 Mon Sep 17 00:00:00 2001
From: Raveendra Talabattula <raveendra.talabattula@amd.com>
Date: Tue, 19 Jul 2016 14:05:50 +0530
Subject: [PATCH 1107/1110] drm/amdgpu: fix UVD enabled display after system
 resume

During a playback using hardware decode (vdpau/vaapi), if the
system enters suspend and resumes back, the output of sysfs
entry amdgpu_pm_info displays UVD as being disabled. It is
confirmed from the output of ps and top commands that UVD is
actually engaged even after system resume.

This patch fixes the issue and the amdgpu_pm_info correctly
reports UVD being enabled after system resume.

Signed-off-by: Raveendra Talabattula <raveendra.talabattula@amd.com>
Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index a43f1a7..9b27c69 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -34,6 +34,7 @@
 #include "smu/smu_7_1_3_d.h"
 #include "smu/smu_7_1_3_sh_mask.h"
 #include "vi.h"
+#include "amdgpu_pm.h"
 
 static void uvd_v6_0_set_ring_funcs(struct amdgpu_device *adev);
 static void uvd_v6_0_set_irq_funcs(struct amdgpu_device *adev);
@@ -246,6 +247,8 @@ static int uvd_v6_0_resume(void *handle)
 	r = uvd_v6_0_hw_init(adev);
 	if (r)
 		return r;
+	
+	amdgpu_dpm_enable_uvd(adev, true);
 
 	return r;
 }
-- 
2.7.4