aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4396-drm-amd-display-check-for-dp-rev-before-reading-lttp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4396-drm-amd-display-check-for-dp-rev-before-reading-lttp.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4396-drm-amd-display-check-for-dp-rev-before-reading-lttp.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4396-drm-amd-display-check-for-dp-rev-before-reading-lttp.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4396-drm-amd-display-check-for-dp-rev-before-reading-lttp.patch
new file mode 100644
index 00000000..12fcd76a
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4396-drm-amd-display-check-for-dp-rev-before-reading-lttp.patch
@@ -0,0 +1,47 @@
+From 92a6ea98405ccb7b2c47b2480a1e43bbc7e5d1a1 Mon Sep 17 00:00:00 2001
+From: abdoulaye berthe <abdoulaye.berthe@amd.com>
+Date: Wed, 18 Sep 2019 11:57:47 -0400
+Subject: [PATCH 4396/4736] drm/amd/display: check for dp rev before reading
+ lttpr regs
+
+[Why]
+LTTPR was introduced after DP1.2. Reading LTTPR registers 0xFXXXX
+on some DP 1.2 display is causing an unexpected behavior.
+
+[How]
+Make sure that we don't read any lttpr registers on 1.2 displays.
+
+Signed-off-by: abdoulaye berthe <abdoulaye.berthe@amd.com>
+Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+index 2a89f90ef7a7..1e4480f3bd3c 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+@@ -2759,9 +2759,10 @@ static bool retrieve_link_cap(struct dc_link *link)
+ /* Set default timeout to 3.2ms and read LTTPR capabilities */
+ bool ext_timeout_support = link->dc->caps.extended_aux_timeout_support &&
+ !link->dc->config.disable_extended_timeout_support;
++ link->is_lttpr_mode_transparent = true;
++
+ if (ext_timeout_support) {
+ status = dc_link_aux_configure_timeout(link->ddc, LINK_AUX_DEFAULT_EXTENDED_TIMEOUT_PERIOD);
+- link->is_lttpr_mode_transparent = true;
+ }
+
+ memset(dpcd_data, '\0', sizeof(dpcd_data));
+@@ -2796,7 +2797,7 @@ static bool retrieve_link_cap(struct dc_link *link)
+ return false;
+ }
+
+- if (ext_timeout_support) {
++ if (ext_timeout_support && link->dpcd_caps.dpcd_rev.raw >= 0x14) {
+ status = core_link_read_dpcd(
+ link,
+ DP_PHY_REPEATER_CNT,
+--
+2.17.1
+