aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0807-drm-amd-display-get-tail-pipe-before-aquire-free-pip.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0807-drm-amd-display-get-tail-pipe-before-aquire-free-pip.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0807-drm-amd-display-get-tail-pipe-before-aquire-free-pip.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0807-drm-amd-display-get-tail-pipe-before-aquire-free-pip.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0807-drm-amd-display-get-tail-pipe-before-aquire-free-pip.patch
new file mode 100644
index 00000000..db3be493
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0807-drm-amd-display-get-tail-pipe-before-aquire-free-pip.patch
@@ -0,0 +1,53 @@
+From b272d5c3380680db4a06de999a62a53f6ebd33ed Mon Sep 17 00:00:00 2001
+From: Eric Bernstein <eric.bernstein@amd.com>
+Date: Mon, 29 Oct 2018 16:05:47 -0400
+Subject: [PATCH 0807/2940] drm/amd/display: get tail pipe before aquire free
+ pipe
+
+[Why]
+For some complicated blending transition cases, the head
+pipe of the second stream may end up being a higher pipe
+index than the free pipe. In those cases dc_add_plane_to_context
+will incorrectly set the tail_pipe to the free pipe, which
+will cause the top_pipe and bottom_pipe to be the same
+
+[How]
+Move the call to resource_get_tail_pipe_for_stream() to be
+before call to acquire_free_pipe_for_stream().
+
+Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
+Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+index a06ca07c7038..f014f2f96d84 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+@@ -1182,6 +1182,9 @@ bool dc_add_plane_to_context(
+ return false;
+ }
+
++ tail_pipe = resource_get_tail_pipe_for_stream(&context->res_ctx, stream);
++ ASSERT(tail_pipe);
++
+ free_pipe = acquire_free_pipe_for_stream(context, pool, stream);
+
+ #ifdef CONFIG_X86
+@@ -1199,10 +1202,6 @@ bool dc_add_plane_to_context(
+ free_pipe->plane_state = plane_state;
+
+ if (head_pipe != free_pipe) {
+-
+- tail_pipe = resource_get_tail_pipe_for_stream(&context->res_ctx, stream);
+- ASSERT(tail_pipe);
+-
+ free_pipe->stream_res.tg = tail_pipe->stream_res.tg;
+ free_pipe->stream_res.abm = tail_pipe->stream_res.abm;
+ free_pipe->stream_res.opp = tail_pipe->stream_res.opp;
+--
+2.17.1
+