aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0803-drm-amd-display-clear-underflow-on-optc-unblank.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0803-drm-amd-display-clear-underflow-on-optc-unblank.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0803-drm-amd-display-clear-underflow-on-optc-unblank.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0803-drm-amd-display-clear-underflow-on-optc-unblank.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0803-drm-amd-display-clear-underflow-on-optc-unblank.patch
new file mode 100644
index 00000000..300abf5d
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0803-drm-amd-display-clear-underflow-on-optc-unblank.patch
@@ -0,0 +1,58 @@
+From a16a4fbbf58769146c0d3da13fa5a1277f629e75 Mon Sep 17 00:00:00 2001
+From: Jun Lei <Jun.Lei@amd.com>
+Date: Wed, 24 Oct 2018 11:39:55 -0400
+Subject: [PATCH 0803/2940] drm/amd/display: clear underflow on optc unblank
+
+[why]
+Underflow is asserted due to some timing condition which does not
+actually result in visible underflow (i.e. it occurs while blanked).
+
+[how]
+Force clear underflow occured bit whenver we unblank.
+
+Signed-off-by: Jun Lei <Jun.Lei@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Aric Cyr <Aric.Cyr@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
+index 7c76f4016ba8..7c138615f17d 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
+@@ -359,20 +359,19 @@ void optc1_set_blank_data_double_buffer(struct timing_generator *optc, bool enab
+ static void optc1_unblank_crtc(struct timing_generator *optc)
+ {
+ struct optc *optc1 = DCN10TG_FROM_TG(optc);
+- uint32_t vertical_interrupt_enable = 0;
+-
+- REG_GET(OTG_VERTICAL_INTERRUPT2_CONTROL,
+- OTG_VERTICAL_INTERRUPT2_INT_ENABLE, &vertical_interrupt_enable);
+-
+- /* temporary work around for vertical interrupt, once vertical interrupt enabled,
+- * this check will be removed.
+- */
+- if (vertical_interrupt_enable)
+- optc1_set_blank_data_double_buffer(optc, true);
+
+ REG_UPDATE_2(OTG_BLANK_CONTROL,
+ OTG_BLANK_DATA_EN, 0,
+ OTG_BLANK_DE_MODE, 0);
++
++ /* W/A for automated testing
++ * Automated testing will fail underflow test as there
++ * sporadic underflows which occur during the optc blank
++ * sequence. As a w/a, clear underflow on unblank.
++ * This prevents the failure, but will not mask actual
++ * underflow that affect real use cases.
++ */
++ optc1_clear_optc_underflow(optc);
+ }
+
+ /**
+--
+2.17.1
+