Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 01/33] drm/amd/display: Clear OTG_AUTO_FORCE_VSYNC_MODE on OTG disable
       [not found] <20261116215641.2800595-1-PingLei.Lin@amd.com>
@ 2026-11-16 21:50 ` James Lin
  2026-11-16 21:50 ` [PATCH 03/33] drm/amd/display: Power up eDP when detect link James Lin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: James Lin @ 2026-11-16 21:50 UTC (permalink / raw)
  To: amd-gfx
  Cc: Harry Wentland, Leo Li, Aurabindo Pillai, Roman Li, Wayne Lin,
	Tom Chung, Fangzhi Zuo, Dan Wheeler, Ray Wu, Ivan Lipski,
	Alex Hung, James Lin, Chenyu Chen, Michael Strauss, Aric Cyr,
	Mario Limonciello, Alex Deucher, stable, James Lin

From: Michael Strauss <michael.strauss@amd.com>

[WHY]
A frame-lock reset trigger sets OTG_AUTO_FORCE_VSYNC_MODE. If the bit is
not cleared when the OTG is released, the OTG keeps forcing vsync on
every trigger event.

When a display stream later reuses that OTG with DRR enabled, each DRR
manual trigger forces an early vsync and cuts the frame short. The
display then runs above its programmed refresh rate and underflows,
leaving the external monitor with no signal.

[HOW]
Clear OTG_AUTO_FORCE_VSYNC_MODE in the DCN31/314/35 disable_crtc so a
released OTG is left clean.

Cc: Aric Cyr <aric.cyr@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Signed-off-by: James Lin <pinglei.lin@amd.com>
---
 drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c   | 4 ++++
 drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c | 4 ++++
 drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c   | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c b/drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c
index ce9cd32b807a..7706f5f16a68 100644
--- a/drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c
+++ b/drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c
@@ -143,6 +143,10 @@ static bool optc31_disable_crtc(struct timing_generator *optc)
 			1, 100000);
 	optc1_clear_optc_underflow(optc);
 
+	/* a stale frame-lock force-vsync would cut every DRR-triggered frame short on reuse */
+	REG_UPDATE(OTG_VERT_SYNC_CONTROL,
+			OTG_AUTO_FORCE_VSYNC_MODE, 0);
+
 	return true;
 }
 /*
diff --git a/drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c b/drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c
index f5faa49680ef..5ec70e849cce 100644
--- a/drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c
+++ b/drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c
@@ -142,6 +142,10 @@ static bool optc314_disable_crtc(struct timing_generator *optc)
 			OTG_BUSY, 0,
 			1, 100000);
 
+	/* a stale frame-lock force-vsync would cut every DRR-triggered frame short on reuse */
+	REG_UPDATE(OTG_VERT_SYNC_CONTROL,
+			OTG_AUTO_FORCE_VSYNC_MODE, 0);
+
 	return true;
 }
 
diff --git a/drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c b/drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
index 406446e5eae5..b4b4792167dd 100644
--- a/drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
+++ b/drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
@@ -162,6 +162,10 @@ static bool optc35_disable_crtc(struct timing_generator *optc)
 
 	optc1_clear_optc_underflow(optc);
 
+	/* a stale frame-lock force-vsync would cut every DRR-triggered frame short on reuse */
+	REG_UPDATE(OTG_VERT_SYNC_CONTROL,
+			OTG_AUTO_FORCE_VSYNC_MODE, 0);
+
 	return true;
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 03/33] drm/amd/display: Power up eDP when detect link
       [not found] <20261116215641.2800595-1-PingLei.Lin@amd.com>
  2026-11-16 21:50 ` [PATCH 01/33] drm/amd/display: Clear OTG_AUTO_FORCE_VSYNC_MODE on OTG disable James Lin
@ 2026-11-16 21:50 ` James Lin
  2026-11-16 21:50 ` [PATCH 20/33] drm/amd/display: Honor the Replay stream regeneration wait event James Lin
  2026-11-16 21:50 ` [PATCH 22/33] drm/amd/display: Skip DSC padding borrow estimate for zero padding James Lin
  3 siblings, 0 replies; 4+ messages in thread
From: James Lin @ 2026-11-16 21:50 UTC (permalink / raw)
  To: amd-gfx
  Cc: Harry Wentland, Leo Li, Aurabindo Pillai, Roman Li, Wayne Lin,
	Tom Chung, Fangzhi Zuo, Dan Wheeler, Ray Wu, Ivan Lipski,
	Alex Hung, James Lin, Chenyu Chen, Zhikai Zhai, Wenjing Liu,
	Mario Limonciello, Alex Deucher, stable, James Lin

From: Zhikai Zhai <zhikai.zhai@amd.com>

[WHY]
Previously we would start the asynchronous detection
timer after resuming from S0i3, the sequence for
eDP power up when resume from S0i3 is:
1. eDP power up when link enable
2. Timer trigger async detect for eDP
3. The AUPI could read successfully in display detect
Currently
1. eDP detection runs from the display detect path
2. AUPI read fail as HPD low when eDP link detect
3. Link enable to power up eDP

[HOW]
Power up eDP when detect link for aux read.

Cc: Wenjing Liu <wenjing.liu@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Zhikai Zhai <zhikai.zhai@amd.com>
Signed-off-by: James Lin <pinglei.lin@amd.com>
---
 .../gpu/drm/amd/display/dc/link/link_detection.c  | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index 9bd24b3e4291..dae9e6840272 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -1153,11 +1153,16 @@ static bool detect_link_and_local_sink(struct dc_link *link,
 		(!link->dc->config.allow_edp_hotplug_detection)) &&
 		link->local_sink) {
 		// need to re-write OUI and brightness in resume case
-		if (link->connector_signal == SIGNAL_TYPE_EDP &&
-			(link->dpcd_sink_ext_caps.bits.oled == 1)) {
-			dpcd_set_source_specific_data(link);
-			msleep(post_oui_delay);
-			set_default_brightness_aux(link);
+		if (link->connector_signal == SIGNAL_TYPE_EDP) {
+			if (!link->dc->config.edp_no_power_sequencing)
+				link->dc->hwss.edp_power_control(link, true);
+			link->dc->hwss.edp_wait_for_hpd_ready(link, true);
+
+			if (link->dpcd_sink_ext_caps.bits.oled == 1) {
+				dpcd_set_source_specific_data(link);
+				msleep(post_oui_delay);
+				set_default_brightness_aux(link);
+			}
 		}
 
 		return true;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 20/33] drm/amd/display: Honor the Replay stream regeneration wait event
       [not found] <20261116215641.2800595-1-PingLei.Lin@amd.com>
  2026-11-16 21:50 ` [PATCH 01/33] drm/amd/display: Clear OTG_AUTO_FORCE_VSYNC_MODE on OTG disable James Lin
  2026-11-16 21:50 ` [PATCH 03/33] drm/amd/display: Power up eDP when detect link James Lin
@ 2026-11-16 21:50 ` James Lin
  2026-11-16 21:50 ` [PATCH 22/33] drm/amd/display: Skip DSC padding borrow estimate for zero padding James Lin
  3 siblings, 0 replies; 4+ messages in thread
From: James Lin @ 2026-11-16 21:50 UTC (permalink / raw)
  To: amd-gfx
  Cc: Harry Wentland, Leo Li, Aurabindo Pillai, Roman Li, Wayne Lin,
	Tom Chung, Fangzhi Zuo, Dan Wheeler, Ray Wu, Ivan Lipski,
	Alex Hung, James Lin, Chenyu Chen, Harry VanZyllDeJong,
	Leon Huang, Mario Limonciello, Alex Deucher, stable, James Lin

From: Harry VanZyllDeJong <hvanzyll@amd.com>

[Why]
The shared FreeSync Replay inactive mask omits the stream regeneration
wait event. Replay can become eligible before the regeneration wait
period expires after stream enable.

[How]
Include the regeneration wait in the inactive mask. Exercise the
public event API to verify nominal coasting while waiting and
restoration of static-screen coasting after the event clears.

Cc: Leon Huang <leon.huang1@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Harry VanZyllDeJong <hvanzyll@amd.com>
Signed-off-by: James Lin <pinglei.lin@amd.com>
---
 drivers/gpu/drm/amd/display/modules/power/power_replay.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/modules/power/power_replay.c b/drivers/gpu/drm/amd/display/modules/power/power_replay.c
index fcfb6066066c..6b1955ff2109 100644
--- a/drivers/gpu/drm/amd/display/modules/power/power_replay.c
+++ b/drivers/gpu/drm/amd/display/modules/power/power_replay.c
@@ -232,6 +232,7 @@ static bool mod_power_update_replay_active_status(unsigned int active_replay_eve
 			replay_event_sleep_resume |
 			replay_event_disable_in_AC |
 			replay_event_disable_replay_while_detect_display |
+			replay_event_waiting_stream_regen |
 			replay_event_infopacket |
 			replay_event_crc_window_active))
 		return false;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 22/33] drm/amd/display: Skip DSC padding borrow estimate for zero padding
       [not found] <20261116215641.2800595-1-PingLei.Lin@amd.com>
                   ` (2 preceding siblings ...)
  2026-11-16 21:50 ` [PATCH 20/33] drm/amd/display: Honor the Replay stream regeneration wait event James Lin
@ 2026-11-16 21:50 ` James Lin
  3 siblings, 0 replies; 4+ messages in thread
From: James Lin @ 2026-11-16 21:50 UTC (permalink / raw)
  To: amd-gfx
  Cc: Harry Wentland, Leo Li, Aurabindo Pillai, Roman Li, Wayne Lin,
	Tom Chung, Fangzhi Zuo, Dan Wheeler, Ray Wu, Ivan Lipski,
	Alex Hung, James Lin, Chenyu Chen, Nicholas Kazlauskas, Aric Cyr,
	Mario Limonciello, Alex Deucher, stable, James Lin

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

[Why]
For non-DSC streams the DSC padding is zero.

This causes the borrow-mode estimate to always borrow instead of
falling back to FRL_BORROW_MODE_NONE.

[How]
Return early in update_borrow_mode_from_dsc_padding() when both
hactive and htotal padding are zero.

Cc: Aric Cyr <aric.cyr@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: James Lin <pinglei.lin@amd.com>
---
 drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c
index 2eaa830662b0..cb201c9ee3c6 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c
@@ -1173,6 +1173,10 @@ static void update_borrow_mode_from_dsc_padding(struct dsc_padding_params *dsc_p
 	uint32_t h_blank = timing->h_total - h_active;
 	struct frl_borrow_params *borrow_params = &frl_link_settings->borrow_params;
 
+	if (dsc_padding_params->dsc_hactive_padding == 0 &&
+	    dsc_padding_params->dsc_htotal_padding == 0)
+		return;
+
 	borrow_params->borrow_mode = frl_modify_borrow_mode_for_dsc_padding(timing->pix_clk_100hz,
 		h_active,
 		h_active + dsc_padding_params->dsc_hactive_padding,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-17 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261116215641.2800595-1-PingLei.Lin@amd.com>
2026-11-16 21:50 ` [PATCH 01/33] drm/amd/display: Clear OTG_AUTO_FORCE_VSYNC_MODE on OTG disable James Lin
2026-11-16 21:50 ` [PATCH 03/33] drm/amd/display: Power up eDP when detect link James Lin
2026-11-16 21:50 ` [PATCH 20/33] drm/amd/display: Honor the Replay stream regeneration wait event James Lin
2026-11-16 21:50 ` [PATCH 22/33] drm/amd/display: Skip DSC padding borrow estimate for zero padding James Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox