Skip to contentSkip to conversation

drm/amd: Revert "drm/amd/display: keep eDP Vdd on when eDP stream is already enabled"

PATCH In review Mario Limonciello 3 participants 4 messages Jun 15, 2022 – Jun 20, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd: Revert "drm/amd/display: keep eDP Vdd on when eDP stream is already enabled"

A variety of Lenovo machines with Rembrandt APUs and OLED panels have stopped showing the display at login. This behavior clears up after leaving it idle and moving the mouse or touching keyboard.

It was bisected to be caused by commit 559e2655220d ("drm/amd/display:
keep eDP Vdd on when eDP stream is already enabled"). Revert this commit to fix the issue.

Fixes 559e2655220d ("drm/amd/display: keep eDP Vdd on when eDP stream is already enabled")
---
 .../display/dc/dce110/dce110_hw_sequencer.c   | 24 ++-----------------
 1 file changed, 2 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -22
index 7eff7811769d..5f2afa5b4814 100644
@@ -1766,29 +1766,9 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 				break;
 			}
 		}
-
-		/*
-		 * TO-DO: So far the code logic below only addresses single eDP case.
-		 * For dual eDP case, there are a few things that need to be
-		 * implemented first:
-		 *
-		 * 1. Change the fastboot logic above, so eDP link[0 or 1]'s
-		 * stream[0 or 1] will all be checked.
-		 *
-		 * 2. Change keep_edp_vdd_on to an array, and maintain keep_edp_vdd_on
-		 * for each eDP.
-		 *
-		 * Once above 2 things are completed, we can then change the logic below
-		 * correspondingly, so dual eDP case will be fully covered.
-		 */
-
-		// We are trying to enable eDP, don't power down VDD if eDP stream is existing
-		if ((edp_stream_num == 1 && edp_streams[0] != NULL) || can_apply_edp_fast_boot) {
+		// We are trying to enable eDP, don't power down VDD
+		if (can_apply_edp_fast_boot)
 			keep_edp_vdd_on = true;
-			DC_LOG_EVENT_LINK_TRAINING("Keep eDP Vdd on\n");
-		} else {
-			DC_LOG_EVENT_LINK_TRAINING("No eDP stream enabled, turn eDP Vdd off\n");
-		}
 	}
 
 	// Check seamless boot support
Signature · 1 line
2.34.1
#1 lore raw

[Public]

+ people associated with original patch being reverted for comments

Quoted 74 lines

-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Wednesday, June 15, 2022 17:30
To: [email protected]
Cc: Limonciello, Mario <[email protected]>; Aaron Ma <[email protected]>
Subject: [PATCH] drm/amd: Revert "drm/amd/display: keep eDP Vdd on when eDP stream is already enabled"

A variety of Lenovo machines with Rembrandt APUs and OLED panels have stopped showing the display at login. This behavior clears up after leaving it idle and moving the mouse or touching keyboard.

It was bisected to be caused by commit 559e2655220d ("drm/amd/display:
keep eDP Vdd on when eDP stream is already enabled"). Revert this commit to fix the issue.

Fixes 559e2655220d ("drm/amd/display: keep eDP Vdd on when eDP stream

is already enabled")

---
 .../display/dc/dce110/dce110_hw_sequencer.c   | 24 ++-----------------
 1 file changed, 2 insertions(+), 22 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 7eff7811769d..5f2afa5b4814 100644

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -3
@@ -1766,29 +1766,9 @@ void dce110_enable_accelerated_mode(struct dc
 *dc, struct dc_state *context)
 				break;
 			}
 		}
-
-		/*
-		 * TO-DO: So far the code logic below only addresses single

eDP case.

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -7
-		 * For dual eDP case, there are a few things that need to be
-		 * implemented first:
-		 *
-		 * 1. Change the fastboot logic above, so eDP link[0 or 1]'s
-		 * stream[0 or 1] will all be checked.
-		 *
-		 * 2. Change keep_edp_vdd_on to an array, and maintain

keep_edp_vdd_on

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -3
-		 * for each eDP.
-		 *
-		 * Once above 2 things are completed, we can then change

the logic below

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -4
-		 * correspondingly, so dual eDP case will be fully covered.
-		 */
-
-		// We are trying to enable eDP, don't power down VDD if

eDP stream is existing

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -1
-		if ((edp_stream_num == 1 && edp_streams[0] != NULL) ||

can_apply_edp_fast_boot) {

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -1
+		// We are trying to enable eDP, don't power down VDD
+		if (can_apply_edp_fast_boot)
 			keep_edp_vdd_on = true;
-			DC_LOG_EVENT_LINK_TRAINING("Keep eDP Vdd

on\n");

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -2
-		} else {
-			DC_LOG_EVENT_LINK_TRAINING("No eDP stream

enabled, turn eDP Vdd off\n");

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -2
-		}
 	}
 
 	// Check seamless boot support
--

2.34.1

Acked-by
#2 lore raw
Quoted 79 lines · Mario

[Public]

+ people associated with original patch being reverted for comments

Quoted 74 lines

-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Wednesday, June 15, 2022 17:30
To: [email protected]
Cc: Limonciello, Mario <[email protected]>; Aaron Ma <[email protected]>
Subject: [PATCH] drm/amd: Revert "drm/amd/display: keep eDP Vdd on when eDP stream is already enabled"

A variety of Lenovo machines with Rembrandt APUs and OLED panels have stopped showing the display at login. This behavior clears up after leaving it idle and moving the mouse or touching keyboard.

It was bisected to be caused by commit 559e2655220d ("drm/amd/display:
keep eDP Vdd on when eDP stream is already enabled"). Revert this commit to fix the issue.

Fixes 559e2655220d ("drm/amd/display: keep eDP Vdd on when eDP stream

is already enabled")

---
 .../display/dc/dce110/dce110_hw_sequencer.c   | 24 ++-----------------
 1 file changed, 2 insertions(+), 22 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 7eff7811769d..5f2afa5b4814 100644

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -3
@@ -1766,29 +1766,9 @@ void dce110_enable_accelerated_mode(struct dc
 *dc, struct dc_state *context)
                              break;
                      }
              }
-
-             /*
-              * TO-DO: So far the code logic below only addresses single

eDP case.

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -7
-              * For dual eDP case, there are a few things that need to be
-              * implemented first:
-              *
-              * 1. Change the fastboot logic above, so eDP link[0 or 1]'s
-              * stream[0 or 1] will all be checked.
-              *
-              * 2. Change keep_edp_vdd_on to an array, and maintain

keep_edp_vdd_on

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -3
-              * for each eDP.
-              *
-              * Once above 2 things are completed, we can then change

the logic below

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -4
-              * correspondingly, so dual eDP case will be fully covered.
-              */
-
-             // We are trying to enable eDP, don't power down VDD if

eDP stream is existing
- if ((edp_stream_num == 1 && edp_streams[0] != NULL) ||
can_apply_edp_fast_boot) {

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -1
+             // We are trying to enable eDP, don't power down VDD
+             if (can_apply_edp_fast_boot)
                      keep_edp_vdd_on = true;
-                     DC_LOG_EVENT_LINK_TRAINING("Keep eDP Vdd

on\n");

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -2
-             } else {
-                     DC_LOG_EVENT_LINK_TRAINING("No eDP stream

enabled, turn eDP Vdd off\n");
- }

      }

      // Check seamless boot support

--
2.34.1

Tested-by on v1 1/1
#3 lore raw
In reply to Mario Limonciello
Quoted 42 lines · Mario Limonciello

A variety of Lenovo machines with Rembrandt APUs and OLED panels have stopped showing the display at login. This behavior clears up after leaving it idle and moving the mouse or touching keyboard.

It was bisected to be caused by commit 559e2655220d ("drm/amd/display:
keep eDP Vdd on when eDP stream is already enabled"). Revert this commit to fix the issue.

Fixes 559e2655220d ("drm/amd/display: keep eDP Vdd on when eDP stream is already enabled")
---
 .../display/dc/dce110/dce110_hw_sequencer.c   | 24 ++-----------------
 1 file changed, 2 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -18
index 7eff7811769d..5f2afa5b4814 100644
@@ -1766,29 +1766,9 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 				break;
 			}
 		}
-
-		/*
-		 * TO-DO: So far the code logic below only addresses single eDP case.
-		 * For dual eDP case, there are a few things that need to be
-		 * implemented first:
-		 *
-		 * 1. Change the fastboot logic above, so eDP link[0 or 1]'s
-		 * stream[0 or 1] will all be checked.
-		 *
-		 * 2. Change keep_edp_vdd_on to an array, and maintain keep_edp_vdd_on
-		 * for each eDP.
-		 *
-		 * Once above 2 things are completed, we can then change the logic below
-		 * correspondingly, so dual eDP case will be fully covered.
-		 */
-
-		// We are trying to enable eDP, don't power down VDD if eDP stream is existing
-		if ((edp_stream_num == 1 && edp_streams[0] != NULL) || can_apply_edp_fast_boot) {

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context) · line 1774

Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -4
+		// We are trying to enable eDP, don't power down VDD
+		if (can_apply_edp_fast_boot)
 			keep_edp_vdd_on = true;
-			DC_LOG_EVENT_LINK_TRAINING("Keep eDP Vdd on\n");
-		} else {
-			DC_LOG_EVENT_LINK_TRAINING("No eDP stream enabled, turn eDP Vdd off\n");
-		}
 	}
 
 	// Check seamless boot support

Verified this fixed the issue on my Lenovo Z13 (R5 Pro 6650U) when applied to a build of 5.18 from Linus's tree
Thanks Mario!