aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3708-drm-amd-display-Subsample-mode-suboptimal-for-YCbCr4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3708-drm-amd-display-Subsample-mode-suboptimal-for-YCbCr4.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3708-drm-amd-display-Subsample-mode-suboptimal-for-YCbCr4.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3708-drm-amd-display-Subsample-mode-suboptimal-for-YCbCr4.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3708-drm-amd-display-Subsample-mode-suboptimal-for-YCbCr4.patch
new file mode 100644
index 00000000..1b5bdacf
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3708-drm-amd-display-Subsample-mode-suboptimal-for-YCbCr4.patch
@@ -0,0 +1,55 @@
+From c7e03d3cadf2186e6374cd690d271f4ad8b25ca3 Mon Sep 17 00:00:00 2001
+From: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
+Date: Fri, 9 Aug 2019 17:16:18 -0400
+Subject: [PATCH 3708/4256] drm/amd/display: Subsample mode suboptimal for
+ YCbCr4:2:2
+
+[Why&How]
+Driver defaults to 1-tap subsample mode for 4:2:2.
+DCE11.2 added 3-tap. The policy is:
+DCE8-DCE11 - change to 2-tap, it's better than 1-tap.
+DCE11.2+ - use 3-tap
+
+Note that 4:2:0 was added in DCE11.2 and already uses 3-tap always.
+Note 2 is that DCE not covered on Linux, only DCN+
+
+Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
+Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 5 ++++-
+ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 2 ++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c
+index 1168342c7190..7045c00edab9 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c
+@@ -166,7 +166,10 @@ static void opp1_set_pixel_encoding(
+ REG_UPDATE(FMT_CONTROL, FMT_PIXEL_ENCODING, 0);
+ break;
+ case PIXEL_ENCODING_YCBCR422:
+- REG_UPDATE(FMT_CONTROL, FMT_PIXEL_ENCODING, 1);
++ REG_UPDATE_3(FMT_CONTROL,
++ FMT_PIXEL_ENCODING, 1,
++ FMT_SUBSAMPLING_MODE, 2,
++ FMT_CBCR_BIT_REDUCTION_BYPASS, 0);
+ break;
+ case PIXEL_ENCODING_YCBCR420:
+ REG_UPDATE(FMT_CONTROL, FMT_PIXEL_ENCODING, 2);
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h
+index 0f10adea000c..2c0ecfa5a643 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h
+@@ -116,6 +116,8 @@
+ type FMT_RAND_G_SEED; \
+ type FMT_RAND_B_SEED; \
+ type FMT_PIXEL_ENCODING; \
++ type FMT_SUBSAMPLING_MODE; \
++ type FMT_CBCR_BIT_REDUCTION_BYPASS; \
+ type FMT_CLAMP_DATA_EN; \
+ type FMT_CLAMP_COLOR_FORMAT; \
+ type FMT_DYNAMIC_EXP_EN; \
+--
+2.17.1
+