aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4049-drm-amd-display-Reprogram-FMT-on-pipe-change.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4049-drm-amd-display-Reprogram-FMT-on-pipe-change.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4049-drm-amd-display-Reprogram-FMT-on-pipe-change.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4049-drm-amd-display-Reprogram-FMT-on-pipe-change.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4049-drm-amd-display-Reprogram-FMT-on-pipe-change.patch
new file mode 100644
index 00000000..4229fa99
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4049-drm-amd-display-Reprogram-FMT-on-pipe-change.patch
@@ -0,0 +1,58 @@
+From 71aae1ea6a0d0a6edb244e045d1fa012f96a1c29 Mon Sep 17 00:00:00 2001
+From: Julian Parkin <julian.parkin@amd.com>
+Date: Thu, 22 Aug 2019 16:32:05 -0400
+Subject: [PATCH 4049/4256] drm/amd/display: Reprogram FMT on pipe change
+
+[Why]
+When planes are added or removed from a stream, the change
+in pipe usage from dynamic MPC combine can cause a second
+stream using ODM combine to pick a different pipe to combine with.
+
+In this scenario, a different OPP is connected to the ODM without
+programming its FMT.
+
+[How]
+Reprogram the FMT in dcn20_program_pipe whenever a pipe is
+newly enabled, or when its opp changes.
+
+Signed-off-by: Julian Parkin <julian.parkin@amd.com>
+Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+---
+ .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 20 +++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+index 1b4aac185f3f..4a0038293569 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+@@ -1399,6 +1399,26 @@ static void dcn20_program_pipe(
+ */
+ if (pipe_ctx->update_flags.bits.enable || pipe_ctx->stream->update_flags.bits.out_tf)
+ dc->hwss.set_output_transfer_func(pipe_ctx, pipe_ctx->stream);
++
++ /* If the pipe has been enabled or has a different opp, we
++ * should reprogram the fmt. This deals with cases where
++ * interation between mpc and odm combine on different streams
++ * causes a different pipe to be chosen to odm combine with.
++ */
++ if (pipe_ctx->update_flags.bits.enable
++ || pipe_ctx->update_flags.bits.opp_changed) {
++
++ pipe_ctx->stream_res.opp->funcs->opp_set_dyn_expansion(
++ pipe_ctx->stream_res.opp,
++ COLOR_SPACE_YCBCR601,
++ pipe_ctx->stream->timing.display_color_depth,
++ pipe_ctx->stream->signal);
++
++ pipe_ctx->stream_res.opp->funcs->opp_program_fmt(
++ pipe_ctx->stream_res.opp,
++ &pipe_ctx->stream->bit_depth_params,
++ &pipe_ctx->stream->clamping);
++ }
+ }
+
+ static bool does_pipe_need_lock(struct pipe_ctx *pipe)
+--
+2.17.1
+