aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1148-drm-amd-display-take-dpms_off-into-account-for-edp-t.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1148-drm-amd-display-take-dpms_off-into-account-for-edp-t.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1148-drm-amd-display-take-dpms_off-into-account-for-edp-t.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1148-drm-amd-display-take-dpms_off-into-account-for-edp-t.patch b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1148-drm-amd-display-take-dpms_off-into-account-for-edp-t.patch
new file mode 100644
index 00000000..b6a66c52
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1148-drm-amd-display-take-dpms_off-into-account-for-edp-t.patch
@@ -0,0 +1,63 @@
+From fc3348111ec3b0b1a61fe4575ed5395a7725ffd2 Mon Sep 17 00:00:00 2001
+From: Eric Yang <Eric.Yang2@amd.com>
+Date: Fri, 11 Jan 2019 17:09:18 -0500
+Subject: [PATCH 1148/2940] drm/amd/display: take dpms_off into account for edp
+ turn off logic
+
+[why]
+Previously we incorrectly skipped backlight control when stream is
+present but dpms_off = true. This causes backlight to remain on in
+the we boot up or resume into a external display only configuration
+where VBIOS posted on the eDP.
+
+[How]
+Add dpms_off into the condition for edp need to turn off.
+
+Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
+Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
+Acked-by: Leo Li <sunpeng.li@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+index 4bb2bac01b32..a30e2d08f531 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
++++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+@@ -1520,7 +1520,7 @@ static struct dc_link *get_link_for_edp(struct dc *dc)
+ return NULL;
+ }
+
+-static struct dc_link *get_link_for_edp_not_in_use(
++static struct dc_link *get_link_for_edp_to_turn_off(
+ struct dc *dc,
+ struct dc_state *context)
+ {
+@@ -1529,8 +1529,12 @@ static struct dc_link *get_link_for_edp_not_in_use(
+
+ /* check if eDP panel is suppose to be set mode, if yes, no need to disable */
+ for (i = 0; i < context->stream_count; i++) {
+- if (context->streams[i]->signal == SIGNAL_TYPE_EDP)
+- return NULL;
++ if (context->streams[i]->signal == SIGNAL_TYPE_EDP) {
++ if (context->streams[i]->dpms_off == true)
++ return context->streams[i]->sink->link;
++ else
++ return NULL;
++ }
+ }
+
+ /* check if there is an eDP panel not in use */
+@@ -1572,7 +1576,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
+ }
+
+ if (can_edp_fast_boot_optimize)
+- edp_link_to_turnoff = get_link_for_edp_not_in_use(dc, context);
++ edp_link_to_turnoff = get_link_for_edp_to_turn_off(dc, context);
+
+ /* if OS doesn't light up eDP and eDP link is available, we want to disable
+ * If resume from S4/S5, should optimization.
+--
+2.17.1
+