aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5502-drm-amdgpu-Refine-uvd_v6-7_0_enc_get_destroy_msg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5502-drm-amdgpu-Refine-uvd_v6-7_0_enc_get_destroy_msg.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5502-drm-amdgpu-Refine-uvd_v6-7_0_enc_get_destroy_msg.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5502-drm-amdgpu-Refine-uvd_v6-7_0_enc_get_destroy_msg.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5502-drm-amdgpu-Refine-uvd_v6-7_0_enc_get_destroy_msg.patch
new file mode 100644
index 00000000..dab5e373
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5502-drm-amdgpu-Refine-uvd_v6-7_0_enc_get_destroy_msg.patch
@@ -0,0 +1,90 @@
+From 1fc9dbf19e4dc263df0509c2045d1d83beac864a Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Fri, 28 Sep 2018 15:25:06 +0800
+Subject: [PATCH 5502/5725] drm/amdgpu: Refine uvd_v6/7_0_enc_get_destroy_msg
+
+1. make uvd_v7_0_enc_get_destroy_msg static
+2. drop a function variable that always true
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 10 +++-------
+ drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 12 ++++--------
+ 2 files changed, 7 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+index 0ef7ce4..2fcafb4 100644
+--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+@@ -274,7 +274,7 @@ static int uvd_v6_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle
+ */
+ static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
+ uint32_t handle,
+- bool direct, struct dma_fence **fence)
++ struct dma_fence **fence)
+ {
+ const unsigned ib_size_dw = 16;
+ struct amdgpu_job *job;
+@@ -310,11 +310,7 @@ static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
+ for (i = ib->length_dw; i < ib_size_dw; ++i)
+ ib->ptr[i] = 0x0;
+
+- if (direct)
+- r = amdgpu_job_submit_direct(job, ring, &f);
+- else
+- r = amdgpu_job_submit(job, &ring->adev->vce.entity,
+- AMDGPU_FENCE_OWNER_UNDEFINED, &f);
++ r = amdgpu_job_submit_direct(job, ring, &f);
+ if (r)
+ goto err;
+
+@@ -345,7 +341,7 @@ static int uvd_v6_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
+ goto error;
+ }
+
+- r = uvd_v6_0_enc_get_destroy_msg(ring, 1, true, &fence);
++ r = uvd_v6_0_enc_get_destroy_msg(ring, 1, &fence);
+ if (r) {
+ DRM_ERROR("amdgpu: failed to get destroy ib (%ld).\n", r);
+ goto error;
+diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
+index cc705b4..07cb92e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
+@@ -280,8 +280,8 @@ static int uvd_v7_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle
+ *
+ * Close up a stream for HW test or if userspace failed to do so
+ */
+-int uvd_v7_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
+- bool direct, struct dma_fence **fence)
++static int uvd_v7_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
++ struct dma_fence **fence)
+ {
+ const unsigned ib_size_dw = 16;
+ struct amdgpu_job *job;
+@@ -317,11 +317,7 @@ int uvd_v7_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
+ for (i = ib->length_dw; i < ib_size_dw; ++i)
+ ib->ptr[i] = 0x0;
+
+- if (direct)
+- r = amdgpu_job_submit_direct(job, ring, &f);
+- else
+- r = amdgpu_job_submit(job, &ring->adev->vce.entity,
+- AMDGPU_FENCE_OWNER_UNDEFINED, &f);
++ r = amdgpu_job_submit_direct(job, ring, &f);
+ if (r)
+ goto err;
+
+@@ -352,7 +348,7 @@ static int uvd_v7_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
+ goto error;
+ }
+
+- r = uvd_v7_0_enc_get_destroy_msg(ring, 1, true, &fence);
++ r = uvd_v7_0_enc_get_destroy_msg(ring, 1, &fence);
+ if (r) {
+ DRM_ERROR("amdgpu: (%d)failed to get destroy ib (%ld).\n", ring->me, r);
+ goto error;
+--
+2.7.4
+