aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1950-drm-amdgpu-add-uvd-enc-into-run-queue.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1950-drm-amdgpu-add-uvd-enc-into-run-queue.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1950-drm-amdgpu-add-uvd-enc-into-run-queue.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1950-drm-amdgpu-add-uvd-enc-into-run-queue.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1950-drm-amdgpu-add-uvd-enc-into-run-queue.patch
new file mode 100644
index 00000000..ac6d6c97
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1950-drm-amdgpu-add-uvd-enc-into-run-queue.patch
@@ -0,0 +1,50 @@
+From 66e360623f02ed32bf1c46f47d0957666d0e28a1 Mon Sep 17 00:00:00 2001
+From: James Zhu <James.Zhu@amd.com>
+Date: Fri, 29 Sep 2017 15:20:23 -0400
+Subject: [PATCH 1950/4131] drm/amdgpu: add uvd enc into run queue
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: James Zhu <James.Zhu@amd.com>
+Reviewed-and-Tested-by: Leo Liu <leo.liu@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+index e5db2a7..e7e8c50 100644
+--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+@@ -187,6 +187,18 @@ static int uvd_v6_0_sw_init(void *handle)
+ if (r)
+ return r;
+
++ if (uvd_v6_0_enc_support(adev)) {
++ struct amd_sched_rq *rq;
++ ring = &adev->uvd.ring_enc[0];
++ rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_NORMAL];
++ r = amd_sched_entity_init(&ring->sched, &adev->uvd.entity_enc,
++ rq, amdgpu_sched_jobs);
++ if (r) {
++ DRM_ERROR("Failed setting up UVD ENC run queue.\n");
++ return r;
++ }
++ }
++
+ r = amdgpu_uvd_resume(adev);
+ if (r)
+ return r;
+@@ -220,6 +232,8 @@ static int uvd_v6_0_sw_fini(void *handle)
+ return r;
+
+ if (uvd_v6_0_enc_support(adev)) {
++ amd_sched_entity_fini(&adev->uvd.ring_enc[0].sched, &adev->uvd.entity_enc);
++
+ for (i = 0; i < adev->uvd.num_enc_rings; ++i)
+ amdgpu_ring_fini(&adev->uvd.ring_enc[i]);
+ }
+--
+2.7.4
+