Skip to contentSkip to conversation

DC Patches Dec 22 2025

PATCH In review Chenyu Chen 4 participants 23 messages Dec 16, 2025 – Jan 16

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

cover DC Patches Dec 22 2025

This DC patchset brings improvements in multiple areas. In summary, we highlight:

- Add frame skip feature support flag.
- Add sink EDID data null check.
- Update function name to link_detect_connection_type_analog.
- Fix mismatched unlock for DMUB HW lock in HWSS fast path.
- Fix P010, NV12, YUY2 scale down by four times failure.
- Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL.
- Consolidate dmub fb info to a single struct.
- Add new fields to fams2 config.
- Update timing source enums.
- Add signal type check for dcn401 get_phyd32clk_src.
- Fix dsc eDP issue.
- Remove unnecessary divider update flag.
- Update dc_connection_dac_load to dc_connection_analog_load.
- Check NULL before calling dac_load_detection.
- Replace log macro for analog display detection.

Cc Daniel Wheeler <[email protected]>

Alex Hung (4):
drm/amd/display: Update function name to
link_detect_connection_type_analog
drm/amd/display: Update dc_connection_dac_load to
dc_connection_analog_load
drm/amd/display: Check NULL before calling dac_load_detection drm/amd/display: Replace log macro for analog display detection

Charlene Liu (1):
drm/amd/display: Fix dsc eDP issue

ChunTao Tso (1):
drm/amd/display: Add frame skip feature support flag

Clay King (1):
drm/amd/display: Update timing source enums

Cruise Hung (1):
drm/amd/display: Remove unnecessary divider update flag

Dillon Varone (2):
drm/amd/display: Consolidate dmub fb info to a single struct drm/amd/display: Add new fields to fams2 config

Dmytro Laktyushkin (1):
drm/amd/display: Add signal type check for dcn401 get_phyd32clk_src

Dominik Kaszewski (1):
drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Kaier Hsueg (1):
drm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure

Nicholas Kazlauskas (1):
drm/amd/display: Fix mismatched unlock for DMUB HW lock in HWSS fast
path

Richard Chiang (1):
drm/amd/display: sink EDID data null check

Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.364

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  6 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 80 +++++++++----------
 .../drm/amd/display/dc/core/dc_hw_sequencer.c | 10 ++-
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 drivers/gpu/drm/amd/display/dc/dc_types.h     |  5 +-
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 12 ++-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  6 +-
 .../display/dc/link/accessories/link_dp_cts.c |  6 +-
 .../drm/amd/display/dc/link/link_detection.c  | 27 ++++---
 drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c  |  3 +-
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   | 16 +++-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c |  6 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn30.c |  6 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c |  6 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c |  6 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c |  6 +-
 .../drm/amd/display/dmub/src/dmub_dcn401.c    |  6 +-
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |  7 +-
 .../amd/display/modules/power/power_helpers.c |  3 +
 19 files changed, 121 insertions(+), 98 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/16 drm/amd/display: Add frame skip feature support flag

From: ChunTao Tso <[email protected]>

[WHY]
The set_replay_frame_skip_number() function should not execute when the link does not support the Frame Skipping feature.

[HOW]
Add a new field frame_skip_supported to struct replay_config to indicate whether the link supports frame skipping. Check this flag at the beginning of set_replay_frame_skip_number() and return early if the feature is not supported.

---
 drivers/gpu/drm/amd/display/dc/dc_types.h                 | 2 ++
 drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 3 +++
 2 files changed, 5 insertions(+)
drivers/gpu/drm/amd/display/dc/dc_types.h +2 -0
index cf4bf0faf1cd..455b22350ae8 100644
@@ -1185,6 +1185,8 @@ struct replay_config {
 	bool os_request_force_ffu;
 	/* Replay optimization */
 	union replay_optimization replay_optimization;
+	/* Replay sub feature Frame Skipping is supported */
+	bool frame_skip_supported;
 };
 
 /* Replay feature flags*/
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +3 -0
index fd139b219bf9..864002b63716 100644
@@ -984,6 +984,9 @@ void set_replay_frame_skip_number(struct dc_link *link,
 	uint32_t *frame_skip_number_array = NULL;
 	uint32_t frame_skip_number = 0;
 
+	if (false == link->replay_settings.config.frame_skip_supported)
+		return;
+
 	if (link == NULL || flicker_free_refresh_rate_mhz == 0 || coasting_vtotal_refresh_rate_mhz == 0)
 		return;
 
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/16 drm/amd/display: sink EDID data null check

In reply to Chenyu Chen

From: Richard Chiang <[email protected]>

[Why]
When sink EDID data pointer is NULL, it will cause an unexpected error.

[How]
Check data pointer is not NULL first.

---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/link/link_detection.c +3 -0
index 373e68cf2bde..080642dfde2a 100644
@@ -623,6 +623,9 @@ static bool detect_dp(struct dc_link *link,
 
 static bool is_same_edid(struct dc_edid *old_edid, struct dc_edid *new_edid)
 {
+	if (old_edid == NULL || new_edid == NULL)
+		return false;
+
 	if (old_edid->length != new_edid->length)
 		return false;
 
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/16 drm/amd/display: Update function name to link_detect_connection_type_analog

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

[WHAT]
Update function "link_detect_analog" to a more accurate name "link_detect_connection_type_analog".

---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_detection.c +3 -3
index 080642dfde2a..bfb5c1c886a5 100644
@@ -1365,7 +1365,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
 }
 
 /**
- * link_detect_analog() - Determines if an analog sink is connected.
+ * link_detect_connection_type_analog() - Determines if an analog sink is connected.
  *
  * @link: DC link to evaluate (must support analog signalling).
  * @type: Updated with the detected connection type:
@@ -1375,7 +1375,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
  *
  * Return: true if detection completed.
  */
-static bool link_detect_analog(struct dc_link *link, enum dc_connection_type *type)
+static bool link_detect_connection_type_analog(struct dc_link *link, enum dc_connection_type *type)
 {
 	/* Don't care about connectors that don't support an analog signal. */
 	ASSERT(dc_connector_supports_analog(link->link_id.id));
@@ -1417,7 +1417,7 @@ bool link_detect_connection_type(struct dc_link *link, enum dc_connection_type *
 	 *   (So it's high even when no display is connected.)
 	 */
 	if (dc_connector_supports_analog(link->link_id.id))
-		return link_detect_analog(link, type);
+		return link_detect_connection_type_analog(link, type);
 
 	if (link->connector_signal == SIGNAL_TYPE_EDP) {
 		/*in case it is not on*/
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/16 drm/amd/display: Fix mismatched unlock for DMUB HW lock in HWSS fast path

In reply to Chenyu Chen

From: Nicholas Kazlauskas <[email protected]>

[Why]
The evaluation for whether we need to use the DMUB HW lock isn't the same as whether we need to unlock which results in a hang when the fast path is used for ASIC without FAMS support.

[How]
Store a flag that indicates whether we should use the lock and use that same flag to specify whether unlocking is needed.

---
 drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +6 -4
index e2763b60482a..052d573408c3 100644
@@ -741,6 +741,7 @@ void hwss_build_fast_sequence(struct dc *dc,
 	struct dce_hwseq *hws = dc->hwseq;
 	struct pipe_ctx *current_pipe = NULL;
 	struct pipe_ctx *current_mpc_pipe = NULL;
+	bool is_dmub_lock_required = false;
 	unsigned int i = 0;
 
 	*num_steps = 0; // Initialize to 0
@@ -763,11 +764,12 @@ void hwss_build_fast_sequence(struct dc *dc,
 		(*num_steps)++;
 	}
 	if (dc->hwss.dmub_hw_control_lock_fast) {
+		is_dmub_lock_required = dc_state_is_fams2_in_use(dc, context) ||
+					dmub_hw_lock_mgr_does_link_require_lock(dc, stream->link);
+
 		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.dc = dc;
 		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.lock = true;
-		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.is_required =
-			dc_state_is_fams2_in_use(dc, context) ||
-			dmub_hw_lock_mgr_does_link_require_lock(dc, stream->link);
+		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.is_required = is_dmub_lock_required;
 		block_sequence[*num_steps].func = DMUB_HW_CONTROL_LOCK_FAST;
 		(*num_steps)++;
 	}
@@ -906,7 +908,7 @@ void hwss_build_fast_sequence(struct dc *dc,
 	if (dc->hwss.dmub_hw_control_lock_fast) {
 		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.dc = dc;
 		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.lock = false;
-		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.is_required = dc_state_is_fams2_in_use(dc, context);
+		block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.is_required = is_dmub_lock_required;
 		block_sequence[*num_steps].func = DMUB_HW_CONTROL_LOCK_FAST;
 		(*num_steps)++;
 	}
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/16 drm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure

In reply to Chenyu Chen

From: Kaier Hsueg <[email protected]>

[WHY]
When performing 4:1 downscaling with subsampled formats, the SPL remainder distribution logic (+1) overrides the upper layer’s aligned width, resulting in odd segment widths and causing hang.

The upper layer alignment ensures the width is sufficient and even, so SPL should not modify it further.

[HOW]
In dc_spl.c within calculate_mpc_slice_in_timing_active, add an extra condition: Skip the remainder distribution (+1) when use_recout_width_aligned is true.This change respects the upper layer’s alignment decision, prevents odd widths, and is a minimal, safe fix.

---
 drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c +2 -1
index f506ab70a307..d8aebaff7c3f 100644
@@ -226,7 +226,8 @@ static struct spl_rect calculate_mpc_slice_in_timing_active(
 	/* extra pixels in the division remainder need to go to pipes after
 	 * the extra pixel index minus one(epimo) defined here as:
 	 */
-	if (mpc_slice_idx > epimo && spl_in->basic_in.custom_width == 0) {
+	if ((use_recout_width_aligned == false) &&
+		mpc_slice_idx > epimo && spl_in->basic_in.custom_width == 0) {
 		mpc_rec.x += mpc_slice_idx - epimo - 1;
 		mpc_rec.width += 1;
 	}
Signature · 1 line
2.43.0
#6 lore raw

PATCH 6/16 drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

In reply to Chenyu Chen

From: Dominik Kaszewski <[email protected]>

[Why]
Reenable new split implementation, previously partially reverted due to issues with ODM on high-bandwidth displays 4k144Hz, resulting in a corrupted gray screen.

Minimal flows require two separate commits, with extra intermediate commit to enable seamless transitions, each followed by a swap. Since new design requires commit to be run in execute and swap in cleanup stage, an attempt was made to reorder them from CSCS (Commit-Swap-Commit-Swap) to CCSS (Commit-Commit-Swap-Swap). Not only is this not viable, but was implemented incorrectly as CCS, one swap missing.

[How]
* Change UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW/CURRENT to execute and cleanup one commit, then run UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS, which closely matches old implementation where minimal flows fall back to seamless.
* Fix uninitialized variable error.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 80 ++++++++++++------------
 1 file changed, 39 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +39 -41
index 1be5c1c15798..57f6a4c8afff 100644
@@ -784,7 +784,7 @@ bool dc_stream_get_crc(struct dc *dc, struct dc_stream_state *stream, uint8_t id
 		       uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb)
 {
 	int i;
-	struct pipe_ctx *pipe;
+	struct pipe_ctx *pipe = NULL;
 	struct timing_generator *tg;
 
 	dc_exit_ips_for_hw_access(dc);
@@ -5437,35 +5437,23 @@ bool dc_update_planes_and_stream(struct dc *dc,
 		struct dc_stream_state *stream,
 		struct dc_stream_update *stream_update)
 {
-	bool ret = false;
+	struct dc_update_scratch_space *scratch = dc_update_planes_and_stream_init(
+			dc,
+			srf_updates,
+			surface_count,
+			stream,
+			stream_update
+	);
+	bool more = true;
 
-	dc_exit_ips_for_hw_access(dc);
-	/*
-	 * update planes and stream version 3 separates FULL and FAST updates
-	 * to their own sequences. It aims to clean up frequent checks for
-	 * update type resulting unnecessary branching in logic flow. It also
-	 * adds a new commit minimal transition sequence, which detects the need
-	 * for minimal transition based on the actual comparison of current and
-	 * new states instead of "predicting" it based on per feature software
-	 * policy.i.e could_mpcc_tree_change_for_active_pipes. The new commit
-	 * minimal transition sequence is made universal to any power saving
-	 * features that would use extra free pipes such as Dynamic ODM/MPC
-	 * Combine, MPO or SubVp. Therefore there is no longer a need to
-	 * specially handle compatibility problems with transitions among those
-	 * features as they are now transparent to the new sequence.
-	 */
-	if (dc->ctx->dce_version >= DCN_VERSION_4_01 || dc->ctx->dce_version == DCN_VERSION_3_2 ||
-			dc->ctx->dce_version == DCN_VERSION_3_21)
-		ret = update_planes_and_stream_v3(dc, srf_updates,
-				surface_count, stream, stream_update);
-	else
-		ret = update_planes_and_stream_v2(dc, srf_updates,
-			surface_count, stream, stream_update);
-	if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 ||
-		dc->ctx->dce_version == DCN_VERSION_3_01))
-		clear_update_flags(srf_updates, surface_count, stream);
+	while (more) {
+		if (!dc_update_planes_and_stream_prepare(scratch))
+			return false;
 
-	return ret;
+		dc_update_planes_and_stream_execute(scratch);
+		more = dc_update_planes_and_stream_cleanup(scratch);
+	}
+	return true;
 }
 
 void dc_commit_updates_for_stream(struct dc *dc,
@@ -7241,7 +7229,7 @@ static bool update_planes_and_stream_cleanup_v2(
 	return false;
 }
 
-static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
 		struct dc_update_scratch_space *scratch,
 		bool backup
 );
@@ -7262,6 +7250,10 @@ static bool update_planes_and_stream_prepare_v3(
 		struct dc_update_scratch_space *scratch
 )
 {
+	if (scratch->flow == UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS) {
+		return true;
+	}
+	ASSERT(scratch->flow == UPDATE_V3_FLOW_INVALID);
 	dc_exit_ips_for_hw_access(scratch->dc);
 
 	if (!update_planes_and_stream_state(
@@ -7327,11 +7319,11 @@ static bool update_planes_and_stream_prepare_v3(
 			return true;
 		}
 
-		update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
+		update_planes_and_stream_cleanup_v3_release_minimal(scratch, false);
 	}
 
-	restore_planes_and_stream_state(&scratch->dc->scratch.current_state, scratch->stream);
 	scratch->backup_context = scratch->dc->current_state;
+	restore_planes_and_stream_state(&scratch->dc->scratch.current_state, scratch->stream);
 	dc_state_retain(scratch->backup_context);
 	scratch->intermediate_context = create_minimal_transition_state(
 			scratch->dc,
@@ -7347,7 +7339,7 @@ static bool update_planes_and_stream_prepare_v3(
 			return true;
 		}
 
-		update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
+		update_planes_and_stream_cleanup_v3_release_minimal(scratch, true);
 	}
 
 	scratch->flow = UPDATE_V3_FLOW_INVALID;
@@ -7398,12 +7390,10 @@ static void update_planes_and_stream_execute_v3(
 
 	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
 		update_planes_and_stream_execute_v3_commit(scratch, false, true);
-		update_planes_and_stream_execute_v3_commit(scratch, false, false);
 		break;
 
 	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
 		update_planes_and_stream_execute_v3_commit(scratch, true, true);
-		update_planes_and_stream_execute_v3_commit(scratch, false, false);
 		break;
 
 	case UPDATE_V3_FLOW_INVALID:
@@ -7419,7 +7409,7 @@ static void update_planes_and_stream_cleanup_v3_new_context(
 	swap_and_release_current_context(scratch->dc, scratch->new_context, scratch->stream);
 }
 
-static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
 		struct dc_update_scratch_space *scratch,
 		bool backup
 )
@@ -7432,6 +7422,16 @@ static void update_planes_and_stream_cleanup_v3_intermediate(
 	);
 }
 
+static void update_planes_and_stream_cleanup_v3_intermediate(
+		struct dc_update_scratch_space *scratch,
+		bool backup
+)
+{
+	swap_and_release_current_context(scratch->dc, scratch->intermediate_context, scratch->stream);
+	dc_state_retain(scratch->dc->current_state);
+	update_planes_and_stream_cleanup_v3_release_minimal(scratch, backup);
+}
+
 static bool update_planes_and_stream_cleanup_v3(
 		struct dc_update_scratch_space *scratch
 )
@@ -7448,17 +7448,15 @@ static bool update_planes_and_stream_cleanup_v3(
 
 	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
 		update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
-		update_planes_and_stream_cleanup_v3_new_context(scratch);
-		break;
+		scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+		return true;
 
 	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
-		swap_and_release_current_context(scratch->dc, scratch->intermediate_context, scratch->stream);
-		dc_state_retain(scratch->dc->current_state);
 		update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
 		dc_state_release(scratch->backup_context);
 		restore_planes_and_stream_state(&scratch->dc->scratch.new_state, scratch->stream);
-		update_planes_and_stream_cleanup_v3_new_context(scratch);
-		break;
+		scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+		return true;
 
 	case UPDATE_V3_FLOW_INVALID:
 	default:
Signature · 1 line
2.43.0
#7 lore raw

Re: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Hi,

This change reintroduce some glitches/screen corruption on DCN321 with gamescope and a 4k@120Hz display, when transitioning from multiple planes (primary + overlay, and pipe split) to single plane (no pipe split).
We see small white artifacts near the cursor in its first appearance on the screen after boot, and eventually a corrupted,colorful strip appears in "fast" transitions between single plane -> multi-plane -> single plane, for example, when moving the cursor (single plane), click on the Steam menu (multi planes) and moving the cursor just after (single plane).

The problem was previously solved by commit 24ddca9a3af1 ("drm/amd/display: Defer transitions from minimal state to final state") [1] and reintroduced again by this patch here, i.e., I don't see the issue if I revert this commit here in current asdn. Also, the issue isn't reproducible if you disable SubVP.

[1] https://gitlab.freedesktop.org/agd5f/linux/-/commit/24ddca9a3af1

Best Regards,

Melissa

Quoted 196 lines · Chenyu Chen

From: Dominik Kaszewski <[email protected]>

[Why]
Reenable new split implementation, previously partially reverted due to issues with ODM on high-bandwidth displays 4k144Hz, resulting in a corrupted gray screen.

Minimal flows require two separate commits, with extra intermediate commit to enable seamless transitions, each followed by a swap. Since new design requires commit to be run in execute and swap in cleanup stage, an attempt was made to reorder them from CSCS (Commit-Swap-Commit-Swap) to CCSS (Commit-Commit-Swap-Swap). Not only is this not viable, but was implemented incorrectly as CCS, one swap missing.

[How]
* Change UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW/CURRENT to execute and cleanup one commit, then run UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS, which closely matches old implementation where minimal flows fall back to seamless.
* Fix uninitialized variable error.

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 80 ++++++++++++------------
  1 file changed, 39 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +39 -41
index 1be5c1c15798..57f6a4c8afff 100644
@@ -784,7 +784,7 @@ bool dc_stream_get_crc(struct dc *dc, struct dc_stream_state *stream, uint8_t id
  		       uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb)
  {
  	int i;
-	struct pipe_ctx *pipe;
+	struct pipe_ctx *pipe = NULL;
  	struct timing_generator *tg;
 
  	dc_exit_ips_for_hw_access(dc);
@@ -5437,35 +5437,23 @@ bool dc_update_planes_and_stream(struct dc *dc,
  		struct dc_stream_state *stream,
  		struct dc_stream_update *stream_update)
  {
-	bool ret = false;
+	struct dc_update_scratch_space *scratch = dc_update_planes_and_stream_init(
+			dc,
+			srf_updates,
+			surface_count,
+			stream,
+			stream_update
+	);
+	bool more = true;
 
-	dc_exit_ips_for_hw_access(dc);
-	/*
-	 * update planes and stream version 3 separates FULL and FAST updates
-	 * to their own sequences. It aims to clean up frequent checks for
-	 * update type resulting unnecessary branching in logic flow. It also
-	 * adds a new commit minimal transition sequence, which detects the need
-	 * for minimal transition based on the actual comparison of current and
-	 * new states instead of "predicting" it based on per feature software
-	 * policy.i.e could_mpcc_tree_change_for_active_pipes. The new commit
-	 * minimal transition sequence is made universal to any power saving
-	 * features that would use extra free pipes such as Dynamic ODM/MPC
-	 * Combine, MPO or SubVp. Therefore there is no longer a need to
-	 * specially handle compatibility problems with transitions among those
-	 * features as they are now transparent to the new sequence.
-	 */
-	if (dc->ctx->dce_version >= DCN_VERSION_4_01 || dc->ctx->dce_version == DCN_VERSION_3_2 ||
-			dc->ctx->dce_version == DCN_VERSION_3_21)
-		ret = update_planes_and_stream_v3(dc, srf_updates,
-				surface_count, stream, stream_update);
-	else
-		ret = update_planes_and_stream_v2(dc, srf_updates,
-			surface_count, stream, stream_update);
-	if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 ||
-		dc->ctx->dce_version == DCN_VERSION_3_01))
-		clear_update_flags(srf_updates, surface_count, stream);
+	while (more) {
+		if (!dc_update_planes_and_stream_prepare(scratch))
+			return false;
 
-	return ret;
+		dc_update_planes_and_stream_execute(scratch);
+		more = dc_update_planes_and_stream_cleanup(scratch);
+	}
+	return true;
  }
 
  void dc_commit_updates_for_stream(struct dc *dc,
@@ -7241,7 +7229,7 @@ static bool update_planes_and_stream_cleanup_v2(
  	return false;
  }
 
-static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
  		struct dc_update_scratch_space *scratch,
  		bool backup
  );
@@ -7262,6 +7250,10 @@ static bool update_planes_and_stream_prepare_v3(
  		struct dc_update_scratch_space *scratch
  )
  {
+	if (scratch->flow == UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS) {
+		return true;
+	}
+	ASSERT(scratch->flow == UPDATE_V3_FLOW_INVALID);
  	dc_exit_ips_for_hw_access(scratch->dc);
 
  	if (!update_planes_and_stream_state(
@@ -7327,11 +7319,11 @@ static bool update_planes_and_stream_prepare_v3(
  			return true;
  		}
 
-		update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
+		update_planes_and_stream_cleanup_v3_release_minimal(scratch, false);
  	}
 
-	restore_planes_and_stream_state(&scratch->dc->scratch.current_state, scratch->stream);
  	scratch->backup_context = scratch->dc->current_state;
+	restore_planes_and_stream_state(&scratch->dc->scratch.current_state, scratch->stream);
  	dc_state_retain(scratch->backup_context);
  	scratch->intermediate_context = create_minimal_transition_state(
  			scratch->dc,
@@ -7347,7 +7339,7 @@ static bool update_planes_and_stream_prepare_v3(
  			return true;
  		}
 
-		update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
+		update_planes_and_stream_cleanup_v3_release_minimal(scratch, true);
  	}
 
  	scratch->flow = UPDATE_V3_FLOW_INVALID;
@@ -7398,12 +7390,10 @@ static void update_planes_and_stream_execute_v3(
 
  	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
  		update_planes_and_stream_execute_v3_commit(scratch, false, true);
-		update_planes_and_stream_execute_v3_commit(scratch, false, false);
  		break;
 
  	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
  		update_planes_and_stream_execute_v3_commit(scratch, true, true);
-		update_planes_and_stream_execute_v3_commit(scratch, false, false);
  		break;
 
  	case UPDATE_V3_FLOW_INVALID:
@@ -7419,7 +7409,7 @@ static void update_planes_and_stream_cleanup_v3_new_context(
  	swap_and_release_current_context(scratch->dc, scratch->new_context, scratch->stream);
  }
 
-static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
  		struct dc_update_scratch_space *scratch,
  		bool backup
  )
@@ -7432,6 +7422,16 @@ static void update_planes_and_stream_cleanup_v3_intermediate(
  	);
  }
 
+static void update_planes_and_stream_cleanup_v3_intermediate(
+		struct dc_update_scratch_space *scratch,
+		bool backup
+)
+{
+	swap_and_release_current_context(scratch->dc, scratch->intermediate_context, scratch->stream);
+	dc_state_retain(scratch->dc->current_state);
+	update_planes_and_stream_cleanup_v3_release_minimal(scratch, backup);
+}
+
  static bool update_planes_and_stream_cleanup_v3(
  		struct dc_update_scratch_space *scratch
  )
@@ -7448,17 +7448,15 @@ static bool update_planes_and_stream_cleanup_v3(
 
  	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
  		update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
-		update_planes_and_stream_cleanup_v3_new_context(scratch);
-		break;
+		scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+		return true;
 
  	case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
-		swap_and_release_current_context(scratch->dc, scratch->intermediate_context, scratch->stream);
-		dc_state_retain(scratch->dc->current_state);
  		update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
  		dc_state_release(scratch->backup_context);
  		restore_planes_and_stream_state(&scratch->dc->scratch.new_state, scratch->stream);
-		update_planes_and_stream_cleanup_v3_new_context(scratch);
-		break;
+		scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+		return true;
 
  	case UPDATE_V3_FLOW_INVALID:
  	default:
#8 lore raw

Re: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Quoted 7 lines · Melissa Wen

Hi,

This change reintroduce some glitches/screen corruption on DCN321 with gamescope and a 4k@120Hz display, when transitioning from multiple planes (primary + overlay, and pipe split) to single plane (no pipe split).
We see small white artifacts near the cursor in its first appearance on the screen after boot, and eventually a corrupted,colorful strip appears in "fast" transitions between single plane -> multi-plane -> single plane, for example, when moving the cursor (single plane), click on the Steam menu (multi planes) and moving the cursor just after (single plane).

The problem was previously solved by commit 24ddca9a3af1 ("drm/amd/display: Defer transitions from minimal state to final state") [1] and reintroduced again by this patch here, i.e., I don't see the issue if I revert this commit here in current asdn. Also, the issue isn't reproducible if you disable SubVP.

Just to reinforce that the situation I describe here affects this issue in a similar way:
- https://gitlab.freedesktop.org/drm/amd/-/issues/3614 ("[DCN32/7900XTX] when VRR is active + an overlay plane is in use, using a hardware cursor in gamescope-session causes artifacts during transition out of scan-out")

Melissa

Quoted 205 lines

[1] https://gitlab.freedesktop.org/agd5f/linux/-/commit/24ddca9a3af1

Best Regards,

Melissa

Quoted 196 lines · Chenyu Chen

From: Dominik Kaszewski <[email protected]>

[Why]
Reenable new split implementation, previously partially reverted due to issues with ODM on high-bandwidth displays 4k144Hz, resulting in a corrupted gray screen.

Minimal flows require two separate commits, with extra intermediate commit to enable seamless transitions, each followed by a swap. Since new design requires commit to be run in execute and swap in cleanup stage, an attempt was made to reorder them from CSCS (Commit-Swap-Commit-Swap) to CCSS (Commit-Commit-Swap-Swap). Not only is this not viable, but was implemented incorrectly as CCS, one swap missing.

[How]
* Change UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW/CURRENT to execute and cleanup one commit, then run UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS, which closely matches old implementation where minimal flows fall back to seamless.
* Fix uninitialized variable error.

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 80 ++++++++++++------------

  1 file changed, 39 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index 1be5c1c15798..57f6a4c8afff 100644
@@ -784,7 +784,7 @@ bool dc_stream_get_crc(struct dc *dc, struct 

dc_stream_state *stream, uint8_t id
                 uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb) {
      int i;
-    struct pipe_ctx *pipe;
+    struct pipe_ctx *pipe = NULL;
      struct timing_generator *tg; dc_exit_ips_for_hw_access(dc);

drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -5437,35 +5437,23 @@ bool dc_update_planes_and_stream(struct dc *dc,
           struct dc_stream_state *stream,
           struct dc_stream_update *stream_update)
   {
-    bool ret = false;
+    struct dc_update_scratch_space *scratch = 

dc_update_planes_and_stream_init(
+            dc,
+            srf_updates,
+            surface_count,
+            stream,
+            stream_update
+    );
+    bool more = true;
  -    dc_exit_ips_for_hw_access(dc);
-    /*
-     * update planes and stream version 3 separates FULL and FAST updates
-     * to their own sequences. It aims to clean up frequent checks for -     * update type resulting unnecessary branching in logic flow. It also
-     * adds a new commit minimal transition sequence, which detects the need
-     * for minimal transition based on the actual comparison of current and
-     * new states instead of "predicting" it based on per feature software
-     * policy.i.e could_mpcc_tree_change_for_active_pipes. The new commit
-     * minimal transition sequence is made universal to any power saving
-     * features that would use extra free pipes such as Dynamic ODM/MPC -     * Combine, MPO or SubVp. Therefore there is no longer a need to -     * specially handle compatibility problems with transitions among those
-     * features as they are now transparent to the new sequence. -     */
-    if (dc->ctx->dce_version >= DCN_VERSION_4_01 || dc->ctx->dce_version == DCN_VERSION_3_2 ||
-            dc->ctx->dce_version == DCN_VERSION_3_21)
-        ret = update_planes_and_stream_v3(dc, srf_updates, -                surface_count, stream, stream_update);
-    else
-        ret = update_planes_and_stream_v2(dc, srf_updates, -            surface_count, stream, stream_update);
-    if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 || -        dc->ctx->dce_version == DCN_VERSION_3_01))
-        clear_update_flags(srf_updates, surface_count, stream); +    while (more) {
+        if (!dc_update_planes_and_stream_prepare(scratch)) +            return false;
  -    return ret;
+        dc_update_planes_and_stream_execute(scratch);
+        more = dc_update_planes_and_stream_cleanup(scratch); +    }
+    return true;
  }
    void dc_commit_updates_for_stream(struct dc *dc,

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7241,7 +7229,7 @@ static bool update_planes_and_stream_cleanup_v2(
       return false;
   }

  -static void update_planes_and_stream_cleanup_v3_intermediate( +static void update_planes_and_stream_cleanup_v3_release_minimal( struct dc_update_scratch_space *scratch,
          bool backup
  );

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7262,6 +7250,10 @@ static bool update_planes_and_stream_prepare_v3(

          struct dc_update_scratch_space *scratch
  )
  {
+    if (scratch->flow == UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS) { +        return true;
+    }
+    ASSERT(scratch->flow == UPDATE_V3_FLOW_INVALID); dc_exit_ips_for_hw_access(scratch->dc);
        if (!update_planes_and_stream_state(

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
@@ -7327,11 +7319,11 @@ static bool update_planes_and_stream_prepare_v3(
               return true;
           }
   - update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch, false);
       }
   - restore_planes_and_stream_state(&scratch->dc->scratch.current_state, scratch->stream);
       scratch->backup_context = scratch->dc->current_state;
+ 
 restore_planes_and_stream_state(&scratch->dc->scratch.current_state, scratch->stream);
       dc_state_retain(scratch->backup_context);

      scratch->intermediate_context = create_minimal_transition_state( scratch->dc,

drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
@@ -7347,7 +7339,7 @@ static bool update_planes_and_stream_prepare_v3(
               return true;
           }
   - update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch, true);
       }
         scratch->flow = UPDATE_V3_FLOW_INVALID;
@@ -7398,12 +7390,10 @@ static void update_planes_and_stream_execute_v3(

        case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
          update_planes_and_stream_execute_v3_commit(scratch, false, true); -        update_planes_and_stream_execute_v3_commit(scratch, false, false);
          break;
        case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
          update_planes_and_stream_execute_v3_commit(scratch, true, true); -        update_planes_and_stream_execute_v3_commit(scratch, false, false);
          break;
        case UPDATE_V3_FLOW_INVALID:

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7419,7 +7409,7 @@ static void 

update_planes_and_stream_cleanup_v3_new_context( swap_and_release_current_context(scratch->dc, scratch->new_context, scratch->stream); }
  -static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
          struct dc_update_scratch_space *scratch,
          bool backup
  )

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7432,6 +7422,16 @@ static void 

update_planes_and_stream_cleanup_v3_intermediate(
      );
  }
  +static void update_planes_and_stream_cleanup_v3_intermediate( +        struct dc_update_scratch_space *scratch,
+        bool backup

drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
+)
+{
+    swap_and_release_current_context(scratch->dc, 

scratch->intermediate_context, scratch->stream);
+    dc_state_retain(scratch->dc->current_state);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch, backup);

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
+}
+

  static bool update_planes_and_stream_cleanup_v3( struct dc_update_scratch_space *scratch )

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7448,17 +7448,15 @@ static bool update_planes_and_stream_cleanup_v3(

        case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
- update_planes_and_stream_cleanup_v3_new_context(scratch);
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
        case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
-        swap_and_release_current_context(scratch->dc, scratch->intermediate_context, scratch->stream);
-        dc_state_retain(scratch->dc->current_state); update_planes_and_stream_cleanup_v3_intermediate(scratch, true); dc_state_release(scratch->backup_context); restore_planes_and_stream_state(&scratch->dc->scratch.new_state, scratch->stream);
- update_planes_and_stream_cleanup_v3_new_context(scratch);
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
        case UPDATE_V3_FLOW_INVALID:
      default:

#9 lore raw

RE: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Melissa,

Thank you for letting me know, I will look into this regression.

Best regards,
Dominik Kaszewski
Senior Software Engineer
SW - Display NPI

-----Original Message-----
From: Melissa Wen <[email protected]>
Sent: Monday, January 12, 2026 12:44 PM
To: Chen, Chen-Yu <[email protected]>; [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Kaszewski, Dominik <[email protected]>; Kazlauskas, Nicholas <[email protected]>
Subject: Re: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Quoted 13 lines · Melissa Wen

Hi,

This change reintroduce some glitches/screen corruption on DCN321 with gamescope and a 4k@120Hz display, when transitioning from multiple planes (primary + overlay, and pipe split) to single plane (no pipe split).
We see small white artifacts near the cursor in its first appearance on the screen after boot, and eventually a corrupted,colorful strip appears in "fast" transitions between single plane -> multi-plane -> single plane, for example, when moving the cursor (single plane), click on the Steam menu (multi planes) and moving the cursor just after (single plane).

Quoted 5 lines

The problem was previously solved by commit 24ddca9a3af1 ("drm/amd/display: Defer transitions from minimal state to final state") [1] and reintroduced again by this patch here, i.e., I don't see the issue if I revert this commit here in current asdn. Also, the issue isn't reproducible if you disable SubVP.

Just to reinforce that the situation I describe here affects this issue in a similar way:
- https://gitlab.freedesktop.org/drm/amd/-/issues/3614 ("[DCN32/7900XTX] when VRR is active + an overlay plane is in use, using a hardware cursor in gamescope-session causes artifacts during transition out of scan-out")

Melissa

Quoted 222 lines

[1] https://gitlab.freedesktop.org/agd5f/linux/-/commit/24ddca9a3af1

Best Regards,

Melissa

Quoted 213 lines · Chenyu Chen

From: Dominik Kaszewski <[email protected]>

[Why]
Reenable new split implementation, previously partially reverted due to issues with ODM on high-bandwidth displays 4k144Hz, resulting in a corrupted gray screen.

Minimal flows require two separate commits, with extra intermediate commit to enable seamless transitions, each followed by a swap. Since new design requires commit to be run in execute and swap in cleanup stage, an attempt was made to reorder them from CSCS (Commit-Swap-Commit-Swap)
to CCSS (Commit-Commit-Swap-Swap). Not only is this not viable, but was implemented incorrectly as CCS, one swap missing.

[How]
* Change UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW/CURRENT to execute and cleanup one commit, then run UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS, which closely matches old implementation where minimal flows fall back to seamless.
* Fix uninitialized variable error.

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 80
++++++++++++------------
  1 file changed, 39 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index 1be5c1c15798..57f6a4c8afff 100644
@@ -784,7 +784,7 @@ bool dc_stream_get_crc(struct dc *dc, struct

dc_stream_state *stream, uint8_t id

                 uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb)
  {
      int i;
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
-    struct pipe_ctx *pipe;
+    struct pipe_ctx *pipe = NULL;
      struct timing_generator *tg;
        dc_exit_ips_for_hw_access(dc); @@ -5437,35 +5437,23 @@ bool

dc_update_planes_and_stream(struct dc *dc,
struct dc_stream_state *stream,
struct dc_stream_update *stream_update)
{

drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
-    bool ret = false;
+    struct dc_update_scratch_space *scratch =

dc_update_planes_and_stream_init(

drivers/gpu/drm/amd/display/dc/core/dc.c +7 -2
+            dc,
+            srf_updates,
+            surface_count,
+            stream,
+            stream_update
+    );
+    bool more = true;
  -    dc_exit_ips_for_hw_access(dc);
-    /*
-     * update planes and stream version 3 separates FULL and FAST

updates
- * to their own sequences. It aims to clean up frequent checks
for
- * update type resulting unnecessary branching in logic flow. It
also
- * adds a new commit minimal transition sequence, which detects
the need
- * for minimal transition based on the actual comparison of
current and
- * new states instead of "predicting" it based on per feature
software
- * policy.i.e could_mpcc_tree_change_for_active_pipes. The new
commit
- * minimal transition sequence is made universal to any power
saving
- * features that would use extra free pipes such as Dynamic
ODM/MPC

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -2
-     * Combine, MPO or SubVp. Therefore there is no longer a need to
-     * specially handle compatibility problems with transitions

among those

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -3
-     * features as they are now transparent to the new sequence.
-     */
-    if (dc->ctx->dce_version >= DCN_VERSION_4_01 ||

dc->ctx->dce_version == DCN_VERSION_3_2 ||

drivers/gpu/drm/amd/display/dc/core/dc.c +9 -9
-            dc->ctx->dce_version == DCN_VERSION_3_21)
-        ret = update_planes_and_stream_v3(dc, srf_updates,
-                surface_count, stream, stream_update);
-    else
-        ret = update_planes_and_stream_v2(dc, srf_updates,
-            surface_count, stream, stream_update);
-    if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 ||
-        dc->ctx->dce_version == DCN_VERSION_3_01))
-        clear_update_flags(srf_updates, surface_count, stream);
+    while (more) {
+        if (!dc_update_planes_and_stream_prepare(scratch))
+            return false;
  -    return ret;
+        dc_update_planes_and_stream_execute(scratch);
+        more = dc_update_planes_and_stream_cleanup(scratch);
+    }
+    return true;
  }
    void dc_commit_updates_for_stream(struct dc *dc, @@ -7241,7
+7229,7 @@ static bool update_planes_and_stream_cleanup_v2(
      return false;
  }
  -static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
          struct dc_update_scratch_space *scratch,
          bool backup
  );
@@ -7262,6 +7250,10 @@ static bool

update_planes_and_stream_prepare_v3(
struct dc_update_scratch_space *scratch
)
{

drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
+    if (scratch->flow == UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS) {
+        return true;
+    }
+    ASSERT(scratch->flow == UPDATE_V3_FLOW_INVALID);
      dc_exit_ips_for_hw_access(scratch->dc);
        if (!update_planes_and_stream_state( @@ -7327,11 +7319,11 @@

static bool update_planes_and_stream_prepare_v3(

              return true;
          }
  - update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch,
+ false);
      }
  -
restore_planes_and_stream_state(&scratch->dc->scratch.current_state,
scratch->stream);
      scratch->backup_context = scratch->dc->current_state;
+
restore_planes_and_stream_state(&scratch->dc->scratch.current_state,
scratch->stream);
      dc_state_retain(scratch->backup_context);
      scratch->intermediate_context =
create_minimal_transition_state(
              scratch->dc,
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7347,7 +7339,7 @@ static bool

update_planes_and_stream_prepare_v3(

              return true;
          }
  - update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch, true);
      }
        scratch->flow = UPDATE_V3_FLOW_INVALID; @@ -7398,12 +7390,10

@@ static void update_planes_and_stream_execute_v3(
case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
update_planes_and_stream_execute_v3_commit(scratch, false,
true);
- update_planes_and_stream_execute_v3_commit(scratch, false,

false);
          break;
        case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
          update_planes_and_stream_execute_v3_commit(scratch, true,
true);
-        update_planes_and_stream_execute_v3_commit(scratch, false,
false);
          break;
        case UPDATE_V3_FLOW_INVALID:
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7419,7 +7409,7 @@ static void

update_planes_and_stream_cleanup_v3_new_context(

      swap_and_release_current_context(scratch->dc,

scratch->new_context, scratch->stream);
}
-static void update_planes_and_stream_cleanup_v3_intermediate(

drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
+static void update_planes_and_stream_cleanup_v3_release_minimal(
          struct dc_update_scratch_space *scratch,
          bool backup
  )
@@ -7432,6 +7422,16 @@ static void

update_planes_and_stream_cleanup_v3_intermediate(

      );

}
+static void update_planes_and_stream_cleanup_v3_intermediate(

drivers/gpu/drm/amd/display/dc/core/dc.c +5 -0
+        struct dc_update_scratch_space *scratch,
+        bool backup
+)
+{
+    swap_and_release_current_context(scratch->dc,

scratch->intermediate_context, scratch->stream);

drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
+    dc_state_retain(scratch->dc->current_state);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch,
+backup); }
+
  static bool update_planes_and_stream_cleanup_v3(
          struct dc_update_scratch_space *scratch
  )
@@ -7448,17 +7448,15 @@ static bool

update_planes_and_stream_cleanup_v3(
case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
- update_planes_and_stream_cleanup_v3_new_context(scratch);

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
        case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
-        swap_and_release_current_context(scratch->dc,

scratch->intermediate_context, scratch->stream);
- dc_state_retain(scratch->dc->current_state);

update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
          dc_state_release(scratch->backup_context);

restore_planes_and_stream_state(&scratch->dc->scratch.new_state, scratch->stream);
- update_planes_and_stream_cleanup_v3_new_context(scratch);

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
        case UPDATE_V3_FLOW_INVALID:
      default:
#10 lore raw

Re: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Hey,

Just to let you know that I tested this commit: https://gitlab.freedesktop.org/agd5f/linux/-/commit/85c4669b1834 and the regression is solved.

Thanks,

Melissa

Quoted 264 lines · Dominik

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Melissa,

Thank you for letting me know, I will look into this regression.

Best regards,
Dominik Kaszewski
Senior Software Engineer
SW - Display NPI

-----Original Message-----
From: Melissa Wen <[email protected]>
Sent: Monday, January 12, 2026 12:44 PM
To: Chen, Chen-Yu <[email protected]>; [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Kaszewski, Dominik <[email protected]>; Kazlauskas, Nicholas <[email protected]>
Subject: Re: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Quoted 13 lines · Melissa Wen

Hi,

This change reintroduce some glitches/screen corruption on DCN321 with gamescope and a 4k@120Hz display, when transitioning from multiple planes (primary + overlay, and pipe split) to single plane (no pipe split).
We see small white artifacts near the cursor in its first appearance on the screen after boot, and eventually a corrupted,colorful strip appears in "fast" transitions between single plane -> multi-plane -> single plane, for example, when moving the cursor (single plane), click on the Steam menu (multi planes) and moving the cursor just after (single plane).

Quoted 5 lines

The problem was previously solved by commit 24ddca9a3af1 ("drm/amd/display: Defer transitions from minimal state to final state") [1] and reintroduced again by this patch here, i.e., I don't see the issue if I revert this commit here in current asdn. Also, the issue isn't reproducible if you disable SubVP.

Just to reinforce that the situation I describe here affects this issue in a similar way:
- https://gitlab.freedesktop.org/drm/amd/-/issues/3614 ("[DCN32/7900XTX] when VRR is active + an overlay plane is in use, using a hardware cursor in gamescope-session causes artifacts during transition out of scan-out")

Melissa

Quoted 220 lines

[1] https://gitlab.freedesktop.org/agd5f/linux/-/commit/24ddca9a3af1

Best Regards,

Melissa

Quoted 213 lines · Chenyu Chen

From: Dominik Kaszewski <[email protected]>

[Why]
Reenable new split implementation, previously partially reverted due to issues with ODM on high-bandwidth displays 4k144Hz, resulting in a corrupted gray screen.

Minimal flows require two separate commits, with extra intermediate commit to enable seamless transitions, each followed by a swap. Since new design requires commit to be run in execute and swap in cleanup stage, an attempt was made to reorder them from CSCS (Commit-Swap-Commit-Swap)
to CCSS (Commit-Commit-Swap-Swap). Not only is this not viable, but was implemented incorrectly as CCS, one swap missing.

[How]
* Change UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW/CURRENT to execute and cleanup one commit, then run UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS, which closely matches old implementation where minimal flows fall back to seamless.
* Fix uninitialized variable error.

---
   drivers/gpu/drm/amd/display/dc/core/dc.c | 80
++++++++++++------------
   1 file changed, 39 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index 1be5c1c15798..57f6a4c8afff 100644
@@ -784,7 +784,7 @@ bool dc_stream_get_crc(struct dc *dc, struct

dc_stream_state *stream, uint8_t id

                  uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb)
   {
       int i;
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
-    struct pipe_ctx *pipe;
+    struct pipe_ctx *pipe = NULL;
       struct timing_generator *tg;
         dc_exit_ips_for_hw_access(dc); @@ -5437,35 +5437,23 @@ bool

dc_update_planes_and_stream(struct dc *dc,
struct dc_stream_state *stream, struct dc_stream_update *stream_update)
{

drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
-    bool ret = false;
+    struct dc_update_scratch_space *scratch =

dc_update_planes_and_stream_init(

drivers/gpu/drm/amd/display/dc/core/dc.c +7 -2
+            dc,
+            srf_updates,
+            surface_count,
+            stream,
+            stream_update
+    );
+    bool more = true;
   -    dc_exit_ips_for_hw_access(dc);
-    /*
-     * update planes and stream version 3 separates FULL and FAST

updates
- * to their own sequences. It aims to clean up frequent checks
for
- * update type resulting unnecessary branching in logic flow. It
also
- * adds a new commit minimal transition sequence, which detects
the need
- * for minimal transition based on the actual comparison of
current and
- * new states instead of "predicting" it based on per feature
software
- * policy.i.e could_mpcc_tree_change_for_active_pipes. The new
commit
- * minimal transition sequence is made universal to any power
saving
- * features that would use extra free pipes such as Dynamic
ODM/MPC

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -2
-     * Combine, MPO or SubVp. Therefore there is no longer a need to
-     * specially handle compatibility problems with transitions

among those

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -3
-     * features as they are now transparent to the new sequence.
-     */
-    if (dc->ctx->dce_version >= DCN_VERSION_4_01 ||

dc->ctx->dce_version == DCN_VERSION_3_2 ||

drivers/gpu/drm/amd/display/dc/core/dc.c +9 -9
-            dc->ctx->dce_version == DCN_VERSION_3_21)
-        ret = update_planes_and_stream_v3(dc, srf_updates,
-                surface_count, stream, stream_update);
-    else
-        ret = update_planes_and_stream_v2(dc, srf_updates,
-            surface_count, stream, stream_update);
-    if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 ||
-        dc->ctx->dce_version == DCN_VERSION_3_01))
-        clear_update_flags(srf_updates, surface_count, stream);
+    while (more) {
+        if (!dc_update_planes_and_stream_prepare(scratch))
+            return false;
   -    return ret;
+        dc_update_planes_and_stream_execute(scratch);
+        more = dc_update_planes_and_stream_cleanup(scratch);
+    }
+    return true;
   }
     void dc_commit_updates_for_stream(struct dc *dc, @@ -7241,7
+7229,7 @@ static bool update_planes_and_stream_cleanup_v2(
       return false;
   }
   -static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
           struct dc_update_scratch_space *scratch,
           bool backup
   );
@@ -7262,6 +7250,10 @@ static bool

update_planes_and_stream_prepare_v3(
struct dc_update_scratch_space *scratch
)
{

drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
+    if (scratch->flow == UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS) {
+        return true;
+    }
+    ASSERT(scratch->flow == UPDATE_V3_FLOW_INVALID);
       dc_exit_ips_for_hw_access(scratch->dc);
         if (!update_planes_and_stream_state( @@ -7327,11 +7319,11 @@

static bool update_planes_and_stream_prepare_v3(

               return true;
           }
   - update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch,
+ false);
       }
   -
restore_planes_and_stream_state(&scratch->dc->scratch.current_state,
scratch->stream);
       scratch->backup_context = scratch->dc->current_state;
+
restore_planes_and_stream_state(&scratch->dc->scratch.current_state,
scratch->stream);
       dc_state_retain(scratch->backup_context);
       scratch->intermediate_context =
create_minimal_transition_state(
               scratch->dc,
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7347,7 +7339,7 @@ static bool

update_planes_and_stream_prepare_v3(

               return true;
           }
   - update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch, true);
       }
         scratch->flow = UPDATE_V3_FLOW_INVALID; @@ -7398,12 +7390,10

@@ static void update_planes_and_stream_execute_v3(
case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
update_planes_and_stream_execute_v3_commit(scratch, false,
true);
- update_planes_and_stream_execute_v3_commit(scratch, false,

false);
           break;
         case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
           update_planes_and_stream_execute_v3_commit(scratch, true,
true);
-        update_planes_and_stream_execute_v3_commit(scratch, false,
false);
           break;
         case UPDATE_V3_FLOW_INVALID:
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7419,7 +7409,7 @@ static void

update_planes_and_stream_cleanup_v3_new_context(

       swap_and_release_current_context(scratch->dc,
scratch->new_context, scratch->stream);
   }
   -static void update_planes_and_stream_cleanup_v3_intermediate(
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
+static void update_planes_and_stream_cleanup_v3_release_minimal(
           struct dc_update_scratch_space *scratch,
           bool backup
   )
@@ -7432,6 +7422,16 @@ static void

update_planes_and_stream_cleanup_v3_intermediate(

       );

}
+static void update_planes_and_stream_cleanup_v3_intermediate(

drivers/gpu/drm/amd/display/dc/core/dc.c +5 -0
+        struct dc_update_scratch_space *scratch,
+        bool backup
+)
+{
+    swap_and_release_current_context(scratch->dc,

scratch->intermediate_context, scratch->stream);

drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
+    dc_state_retain(scratch->dc->current_state);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch,
+backup); }
+
   static bool update_planes_and_stream_cleanup_v3(
           struct dc_update_scratch_space *scratch
   )
@@ -7448,17 +7448,15 @@ static bool

update_planes_and_stream_cleanup_v3(
case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
- update_planes_and_stream_cleanup_v3_new_context(scratch);

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
         case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
-        swap_and_release_current_context(scratch->dc,

scratch->intermediate_context, scratch->stream);
- dc_state_retain(scratch->dc->current_state);

update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
           dc_state_release(scratch->backup_context);

restore_planes_and_stream_state(&scratch->dc->scratch.new_state, scratch->stream);
- update_planes_and_stream_cleanup_v3_new_context(scratch);

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
         case UPDATE_V3_FLOW_INVALID:
       default:
#11 lore raw

RE: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Melissa,

Thank you for letting me know, we saw that commit fix similar problems on our side, glad to hear it worked for you as well.

Best regards,
Dominik Kaszewski
Senior Software Engineer
SW - Display NPI

-----Original Message-----
From: Melissa Wen <[email protected]>
Sent: Friday, January 16, 2026 3:20 PM
To: Kaszewski, Dominik <[email protected]>; Chen, Chen-Yu <[email protected]>; [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Kazlauskas, Nicholas <[email protected]>
Subject: Re: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Hey,

Just to let you know that I tested this commit:
https://gitlab.freedesktop.org/agd5f/linux/-/commit/85c4669b1834 and the regression is solved.

Thanks,

Melissa

Quoted 280 lines · Dominik

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Melissa,

Thank you for letting me know, I will look into this regression.

Best regards,
Dominik Kaszewski
Senior Software Engineer
SW - Display NPI

-----Original Message-----
From: Melissa Wen <[email protected]>
Sent: Monday, January 12, 2026 12:44 PM
To: Chen, Chen-Yu <[email protected]>; [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Kaszewski, Dominik <[email protected]>; Kazlauskas, Nicholas <[email protected]>
Subject: Re: [PATCH 06/16] drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Quoted 13 lines · Melissa Wen

Hi,

This change reintroduce some glitches/screen corruption on DCN321 with gamescope and a 4k@120Hz display, when transitioning from multiple planes (primary + overlay, and pipe split) to single plane (no pipe split).
We see small white artifacts near the cursor in its first appearance on the screen after boot, and eventually a corrupted,colorful strip appears in "fast" transitions between single plane -> multi-plane -> single plane, for example, when moving the cursor (single plane), click on the Steam menu (multi planes) and moving the cursor just after (single plane).

Quoted 5 lines

The problem was previously solved by commit 24ddca9a3af1 ("drm/amd/display: Defer transitions from minimal state to final state") [1] and reintroduced again by this patch here, i.e., I don't see the issue if I revert this commit here in current asdn. Also, the issue isn't reproducible if you disable SubVP.

Just to reinforce that the situation I describe here affects this issue in a similar way:
- https://gitlab.freedesktop.org/drm/amd/-/issues/3614
("[DCN32/7900XTX] when VRR is active + an overlay plane is in use,
using a hardware cursor in gamescope-session causes artifacts during transition out of scan-out")

Melissa

Quoted 224 lines

[1] https://gitlab.freedesktop.org/agd5f/linux/-/commit/24ddca9a3af1

Best Regards,

Melissa

Quoted 217 lines · Chenyu Chen

From: Dominik Kaszewski <[email protected]>

[Why]
Reenable new split implementation, previously partially reverted due to issues with ODM on high-bandwidth displays 4k144Hz, resulting in a corrupted gray screen.

Minimal flows require two separate commits, with extra intermediate commit to enable seamless transitions, each followed by a swap. Since new design requires commit to be run in execute and swap in cleanup stage, an attempt was made to reorder them from CSCS (Commit-Swap-Commit-Swap)
to CCSS (Commit-Commit-Swap-Swap). Not only is this not viable, but was implemented incorrectly as CCS, one swap missing.

[How]
* Change UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW/CURRENT to execute and cleanup one commit, then run UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS,
which closely matches old implementation where minimal flows fall back to seamless.
* Fix uninitialized variable error.

---
   drivers/gpu/drm/amd/display/dc/core/dc.c | 80
++++++++++++------------
   1 file changed, 39 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index 1be5c1c15798..57f6a4c8afff 100644
@@ -784,7 +784,7 @@ bool dc_stream_get_crc(struct dc *dc, struct

dc_stream_state *stream, uint8_t id

                  uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb)
   {
       int i;
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
-    struct pipe_ctx *pipe;
+    struct pipe_ctx *pipe = NULL;
       struct timing_generator *tg;
         dc_exit_ips_for_hw_access(dc); @@ -5437,35 +5437,23 @@ bool

dc_update_planes_and_stream(struct dc *dc,
struct dc_stream_state *stream, struct dc_stream_update *stream_update)
{

drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
-    bool ret = false;
+    struct dc_update_scratch_space *scratch =

dc_update_planes_and_stream_init(

drivers/gpu/drm/amd/display/dc/core/dc.c +7 -2
+            dc,
+            srf_updates,
+            surface_count,
+            stream,
+            stream_update
+    );
+    bool more = true;
   -    dc_exit_ips_for_hw_access(dc);
-    /*
-     * update planes and stream version 3 separates FULL and FAST

updates
- * to their own sequences. It aims to clean up frequent checks
for
- * update type resulting unnecessary branching in logic flow. It
also
- * adds a new commit minimal transition sequence, which detects
the need
- * for minimal transition based on the actual comparison of
current and
- * new states instead of "predicting" it based on per feature
software
- * policy.i.e could_mpcc_tree_change_for_active_pipes. The new
commit
- * minimal transition sequence is made universal to any power
saving
- * features that would use extra free pipes such as Dynamic
ODM/MPC

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -2
-     * Combine, MPO or SubVp. Therefore there is no longer a need to
-     * specially handle compatibility problems with transitions

among those

drivers/gpu/drm/amd/display/dc/core/dc.c +0 -3
-     * features as they are now transparent to the new sequence.
-     */
-    if (dc->ctx->dce_version >= DCN_VERSION_4_01 ||

dc->ctx->dce_version == DCN_VERSION_3_2 ||

drivers/gpu/drm/amd/display/dc/core/dc.c +9 -9
-            dc->ctx->dce_version == DCN_VERSION_3_21)
-        ret = update_planes_and_stream_v3(dc, srf_updates,
-                surface_count, stream, stream_update);
-    else
-        ret = update_planes_and_stream_v2(dc, srf_updates,
-            surface_count, stream, stream_update);
-    if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 ||
-        dc->ctx->dce_version == DCN_VERSION_3_01))
-        clear_update_flags(srf_updates, surface_count, stream);
+    while (more) {
+        if (!dc_update_planes_and_stream_prepare(scratch))
+            return false;
   -    return ret;
+        dc_update_planes_and_stream_execute(scratch);
+        more = dc_update_planes_and_stream_cleanup(scratch);
+    }
+    return true;
   }
     void dc_commit_updates_for_stream(struct dc *dc, @@ -7241,7
+7229,7 @@ static bool update_planes_and_stream_cleanup_v2(
       return false;
   }
   -static void update_planes_and_stream_cleanup_v3_intermediate(
+static void update_planes_and_stream_cleanup_v3_release_minimal(
           struct dc_update_scratch_space *scratch,
           bool backup
   );
@@ -7262,6 +7250,10 @@ static bool

update_planes_and_stream_prepare_v3(
struct dc_update_scratch_space *scratch
)
{

drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
+    if (scratch->flow == UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS) {
+        return true;
+    }
+    ASSERT(scratch->flow == UPDATE_V3_FLOW_INVALID);
       dc_exit_ips_for_hw_access(scratch->dc);
         if (!update_planes_and_stream_state( @@ -7327,11 +7319,11

@@ static bool update_planes_and_stream_prepare_v3(

               return true;
           }
   - update_planes_and_stream_cleanup_v3_intermediate(scratch,
false);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch,
+ false);
       }
   -
restore_planes_and_stream_state(&scratch->dc->scratch.current_state,
scratch->stream);
       scratch->backup_context = scratch->dc->current_state;
+
restore_planes_and_stream_state(&scratch->dc->scratch.current_state,
scratch->stream);
       dc_state_retain(scratch->backup_context);
       scratch->intermediate_context =
create_minimal_transition_state(
               scratch->dc,
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7347,7 +7339,7 @@ static bool

update_planes_and_stream_prepare_v3(

               return true;
           }
   - update_planes_and_stream_cleanup_v3_intermediate(scratch,
true);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch,
+ true);
       }
         scratch->flow = UPDATE_V3_FLOW_INVALID; @@ -7398,12

+7390,10 @@ static void update_planes_and_stream_execute_v3(
case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
update_planes_and_stream_execute_v3_commit(scratch,
false, true);
- update_planes_and_stream_execute_v3_commit(scratch, false,

false);
           break;
         case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
           update_planes_and_stream_execute_v3_commit(scratch, true,
true);
-        update_planes_and_stream_execute_v3_commit(scratch, false,
false);
           break;
         case UPDATE_V3_FLOW_INVALID:
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -7419,7 +7409,7 @@ static void

update_planes_and_stream_cleanup_v3_new_context(

       swap_and_release_current_context(scratch->dc,
scratch->new_context, scratch->stream);
   }
   -static void update_planes_and_stream_cleanup_v3_intermediate(
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
+static void update_planes_and_stream_cleanup_v3_release_minimal(
           struct dc_update_scratch_space *scratch,
           bool backup
   )
@@ -7432,6 +7422,16 @@ static void

update_planes_and_stream_cleanup_v3_intermediate(

       );

}
+static void update_planes_and_stream_cleanup_v3_intermediate(

drivers/gpu/drm/amd/display/dc/core/dc.c +5 -0
+        struct dc_update_scratch_space *scratch,
+        bool backup
+)
+{
+    swap_and_release_current_context(scratch->dc,

scratch->intermediate_context, scratch->stream);

drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
+    dc_state_retain(scratch->dc->current_state);
+ update_planes_and_stream_cleanup_v3_release_minimal(scratch,
+backup); }
+
   static bool update_planes_and_stream_cleanup_v3(
           struct dc_update_scratch_space *scratch
   )
@@ -7448,17 +7448,15 @@ static bool

update_planes_and_stream_cleanup_v3(
case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_NEW:
update_planes_and_stream_cleanup_v3_intermediate(scratch, false);
- update_planes_and_stream_cleanup_v3_new_context(scratch);

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
         case UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL_CURRENT:
-        swap_and_release_current_context(scratch->dc,

scratch->intermediate_context, scratch->stream);
- dc_state_retain(scratch->dc->current_state);

update_planes_and_stream_cleanup_v3_intermediate(scratch, true);
           dc_state_release(scratch->backup_context);

restore_planes_and_stream_state(&scratch->dc->scratch.new_state, scratch->stream);
- update_planes_and_stream_cleanup_v3_new_context(scratch);

drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
-        break;
+        scratch->flow = UPDATE_V3_FLOW_NEW_CONTEXT_SEAMLESS;
+        return true;
         case UPDATE_V3_FLOW_INVALID:
       default:
#12 lore raw

PATCH 7/16 drm/amd/display: Consolidate dmub fb info to a single struct

In reply to Chenyu Chen

From: Dillon Varone <[email protected]>

[WHY&HOW]
Consolidate dmub fb info into a single structure to simplify translation between components.

---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c    |  4 ++--
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h      | 16 ++++++++++++----
 .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c    |  6 +++---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn30.c    |  6 +++---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c    |  6 +++---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c    |  6 +++---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c    |  6 +++---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn401.c   |  6 +++---
 drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c  |  3 +--
 9 files changed, 33 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -2
index 0346052f2e57..d66854e7f18f 100644
@@ -1336,8 +1336,8 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
 
 	/* Initialize hardware. */
 	memset(&hw_params, 0, sizeof(hw_params));
-	hw_params.fb_base = adev->gmc.fb_start;
-	hw_params.fb_offset = adev->vm_manager.vram_base_offset;
+	hw_params.soc_fb_info.fb_base = adev->gmc.fb_start;
+	hw_params.soc_fb_info.fb_offset = adev->vm_manager.vram_base_offset;
 
 	/* backdoor load firmware and trigger dmub running */
 	if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +12 -4
index 12c1f9f7115a..3b6bba017040 100644
@@ -307,6 +307,16 @@ struct dmub_srv_fb_info {
 	struct dmub_fb fb[DMUB_WINDOW_TOTAL];
 };
 
+/**
+ * struct dmub_soc_fb_info - relevant addresses from the frame buffer
+ * @fb_base: base of the framebuffer aperture
+ * @fb_offset: offset of the framebuffer aperture
+ */
+struct dmub_soc_fb_info {
+	uint64_t fb_base;
+	uint64_t fb_offset;
+};
+
 /*
  * struct dmub_srv_hw_params - params for dmub hardware initialization
  * @fb: framebuffer info for each region
@@ -317,8 +327,7 @@ struct dmub_srv_fb_info {
  */
 struct dmub_srv_hw_params {
 	struct dmub_fb *fb[DMUB_WINDOW_TOTAL];
-	uint64_t fb_base;
-	uint64_t fb_offset;
+	struct dmub_soc_fb_info soc_fb_info;
 	uint32_t psp_version;
 	bool load_inst_const;
 	bool skip_panel_power_sequence;
@@ -610,8 +619,7 @@ struct dmub_srv {
 	bool hw_init;
 	bool dpia_supported;
 
-	uint64_t fb_base;
-	uint64_t fb_offset;
+	struct dmub_soc_fb_info soc_fb_info;
 	uint32_t psp_version;
 
 	/* Feature capabilities reported by fw */
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c +3 -3
index 73888c1bea93..54df2147e4dc 100644
@@ -63,9 +63,9 @@ static void dmub_dcn20_get_fb_base_offset(struct dmub_srv *dmub,
 {
 	uint32_t tmp;
 
-	if (dmub->fb_base || dmub->fb_offset) {
-		*fb_base = dmub->fb_base;
-		*fb_offset = dmub->fb_offset;
+	if (dmub->soc_fb_info.fb_base || dmub->soc_fb_info.fb_offset) {
+		*fb_base = dmub->soc_fb_info.fb_base;
+		*fb_offset = dmub->soc_fb_info.fb_offset;
 		return;
 	}
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn30.c +3 -3
index a4abe951c838..84a6eb3f677d 100644
@@ -63,9 +63,9 @@ static void dmub_dcn30_get_fb_base_offset(struct dmub_srv *dmub,
 {
 	uint32_t tmp;
 
-	if (dmub->fb_base || dmub->fb_offset) {
-		*fb_base = dmub->fb_base;
-		*fb_offset = dmub->fb_offset;
+	if (dmub->soc_fb_info.fb_base || dmub->soc_fb_info.fb_offset) {
+		*fb_base = dmub->soc_fb_info.fb_base;
+		*fb_offset = dmub->soc_fb_info.fb_offset;
 		return;
 	}
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +3 -3
index cd04d7c756c3..a0cefc03b21d 100644
@@ -59,9 +59,9 @@ static void dmub_dcn31_get_fb_base_offset(struct dmub_srv *dmub,
 {
 	uint32_t tmp;
 
-	if (dmub->fb_base || dmub->fb_offset) {
-		*fb_base = dmub->fb_base;
-		*fb_offset = dmub->fb_offset;
+	if (dmub->soc_fb_info.fb_base || dmub->soc_fb_info.fb_offset) {
+		*fb_base = dmub->soc_fb_info.fb_base;
+		*fb_offset = dmub->soc_fb_info.fb_offset;
 		return;
 	}
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c +3 -3
index 7e9856289910..2f99a2772599 100644
@@ -65,9 +65,9 @@ static void dmub_dcn32_get_fb_base_offset(struct dmub_srv *dmub,
 {
 	uint32_t tmp;
 
-	if (dmub->fb_base || dmub->fb_offset) {
-		*fb_base = dmub->fb_base;
-		*fb_offset = dmub->fb_offset;
+	if (dmub->soc_fb_info.fb_base || dmub->soc_fb_info.fb_offset) {
+		*fb_base = dmub->soc_fb_info.fb_base;
+		*fb_offset = dmub->soc_fb_info.fb_offset;
 		return;
 	}
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c +3 -3
index e13557ed97be..6a2d35756c8c 100644
@@ -63,9 +63,9 @@ static void dmub_dcn35_get_fb_base_offset(struct dmub_srv *dmub,
 	uint32_t tmp;
 
 	/*
-	if (dmub->fb_base || dmub->fb_offset) {
-		*fb_base = dmub->fb_base;
-		*fb_offset = dmub->fb_offset;
+	if (dmub->soc_fb_info.fb_base || dmub->soc_fb_info.fb_offset) {
+		*fb_base = dmub->soc_fb_info.fb_base;
+		*fb_offset = dmub->soc_fb_info.fb_offset;
 		return;
 	}
 	*/
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c +3 -3
index 95542299e3b3..16ed07f0e96d 100644
@@ -39,9 +39,9 @@ static void dmub_dcn401_get_fb_base_offset(struct dmub_srv *dmub,
 {
 	uint32_t tmp;
 
-	if (dmub->fb_base || dmub->fb_offset) {
-		*fb_base = dmub->fb_base;
-		*fb_offset = dmub->fb_offset;
+	if (dmub->soc_fb_info.fb_base || dmub->soc_fb_info.fb_offset) {
+		*fb_base = dmub->soc_fb_info.fb_base;
+		*fb_offset = dmub->soc_fb_info.fb_offset;
 		return;
 	}
 
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +1 -2
index be893531ae7d..019eb005bba8 100644
@@ -709,8 +709,7 @@ enum dmub_status dmub_srv_hw_init(struct dmub_srv *dmub,
 		}
 	}
 
-	dmub->fb_base = params->fb_base;
-	dmub->fb_offset = params->fb_offset;
+	memcpy(&dmub->soc_fb_info, &params->soc_fb_info, sizeof(params->soc_fb_info));
 	dmub->psp_version = params->psp_version;
 
 	if (dmub->hw_funcs.reset)
Signature · 1 line
2.43.0
#13 lore raw

PATCH 8/16 drm/amd/display: Add new fields to fams2 config

In reply to Chenyu Chen

From: Dillon Varone <[email protected]>

[WHY&HOW]
Adds new fields to the fams2 configuration structure.

---
 drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +2 -2
index 019eb005bba8..83cf4888fb54 100644
@@ -66,7 +66,7 @@
 #define DMUB_SCRATCH_MEM_SIZE (1024)
 
 /* Default indirect buffer size. */
-#define DMUB_IB_MEM_SIZE (2560)
+#define DMUB_IB_MEM_SIZE (sizeof(struct dmub_fams2_config_v2))
 
 /* Default LSDMA ring buffer size. */
 #define DMUB_LSDMA_RB_SIZE (64 * 1024)
@@ -603,7 +603,7 @@ enum dmub_status
 	window_sizes[DMUB_WINDOW_5_TRACEBUFF] = trace_buffer_size;
 	window_sizes[DMUB_WINDOW_6_FW_STATE] = fw_state_size;
 	window_sizes[DMUB_WINDOW_7_SCRATCH_MEM] = dmub_align(DMUB_SCRATCH_MEM_SIZE, 64);
-	window_sizes[DMUB_WINDOW_IB_MEM] = DMUB_IB_MEM_SIZE;
+	window_sizes[DMUB_WINDOW_IB_MEM] = dmub_align(DMUB_IB_MEM_SIZE, 64);
 	window_sizes[DMUB_WINDOW_SHARED_STATE] = max(DMUB_FW_HEADER_SHARED_STATE_SIZE, shared_state_size);
 	window_sizes[DMUB_WINDOW_LSDMA_BUFFER] = DMUB_LSDMA_RB_SIZE;
 	window_sizes[DMUB_WINDOW_CURSOR_OFFLOAD] = dmub_align(sizeof(struct dmub_cursor_offload_v1), 64);
Signature · 1 line
2.43.0
#14 lore raw

PATCH 9/16 drm/amd/display: Update timing source enums

In reply to Chenyu Chen

From: Clay King <[email protected]>

Added missing enum for CEA VIC

---
 drivers/gpu/drm/amd/display/dc/dc_types.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dc_types.h +1 -0
index 455b22350ae8..3e924ee0811d 100644
@@ -275,6 +275,7 @@ enum dc_timing_source {
 	TIMING_SOURCE_CV,
 	TIMING_SOURCE_TV,
 	TIMING_SOURCE_HDMI_VIC,
+	TIMING_SOURCE_CEA_VIC,
 
 	/* implicitly specified by display device, still safe but less important*/
 	TIMING_SOURCE_DEFAULT,
Signature · 1 line
2.43.0
#15 lore raw

PATCH 10/16 drm/amd/display: Add signal type check for dcn401 get_phyd32clk_src

In reply to Chenyu Chen

From: Dmytro Laktyushkin <[email protected]>

Trying to access link enc on a dpia link will cause a crash otherwise

---
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +3 -3
index 63cd13d4617a..b7593b886dc6 100644
@@ -914,10 +914,10 @@ static void dcn401_enable_stream_calc(
 			pipe_ctx->stream->link->cur_link_settings.lane_count;
 	uint32_t active_total_with_borders;
 
-	if (dc->link_srv->dp_is_128b_132b_signal(pipe_ctx))
+	if (dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
 		*dp_hpo_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;
-
-	*phyd32clk = get_phyd32clk_src(pipe_ctx->stream->link);
+		*phyd32clk = get_phyd32clk_src(pipe_ctx->stream->link);
+	}
 
 	if (dc_is_tmds_signal(pipe_ctx->stream->signal))
 		dcn401_calculate_dccg_tmds_div_value(pipe_ctx, tmds_div);
Signature · 1 line
2.43.0
#16 lore raw

PATCH 11/16 drm/amd/display: Fix dsc eDP issue

In reply to Chenyu Chen

From: Charlene Liu <[email protected]>

[why]
Need to add function hook check before use

---
 .../drm/amd/display/dc/hwss/dce110/dce110_hwseq.c    | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +9 -3
index ebdb885826aa..c5761f3ed0ae 100644
@@ -1846,6 +1846,9 @@ static void disable_vga_and_power_gate_all_controllers(
 	struct timing_generator *tg;
 	struct dc_context *ctx = dc->ctx;
 
+	if (dc->caps.ips_support)
+		return;
+
 	for (i = 0; i < dc->res_pool->timing_generator_count; i++) {
 		tg = dc->res_pool->timing_generators[i];
 
@@ -1922,13 +1925,16 @@ static void clean_up_dsc_blocks(struct dc *dc)
 			/* disable DSC in OPTC */
 			if (i < dc->res_pool->timing_generator_count) {
 				tg = dc->res_pool->timing_generators[i];
-				tg->funcs->set_dsc_config(tg, OPTC_DSC_DISABLED, 0, 0);
+				if (tg->funcs->set_dsc_config)
+					tg->funcs->set_dsc_config(tg, OPTC_DSC_DISABLED, 0, 0);
 			}
 			/* disable DSC in stream encoder */
 			if (i < dc->res_pool->stream_enc_count) {
 				se = dc->res_pool->stream_enc[i];
-				se->funcs->dp_set_dsc_config(se, OPTC_DSC_DISABLED, 0, 0);
-				se->funcs->dp_set_dsc_pps_info_packet(se, false, NULL, true);
+				if (se->funcs->dp_set_dsc_config)
+					se->funcs->dp_set_dsc_config(se, OPTC_DSC_DISABLED, 0, 0);
+				if (se->funcs->dp_set_dsc_pps_info_packet)
+					se->funcs->dp_set_dsc_pps_info_packet(se, false, NULL, true);
 			}
 			/* disable DSC block */
 			if (dccg->funcs->set_ref_dscclk)
Signature · 1 line
2.43.0
#17 lore raw

PATCH 12/16 drm/amd/display: Remove unnecessary divider update flag

In reply to Chenyu Chen

From: Cruise Hung <[email protected]>

[Why]
When transitioning from 640x480 at RBRx1 to HBR3x1,
both output pixel mode and pixel rate divider should update. The needs_divider_update flag was only for 8b10b and 128b132b transition.

[How]
Remove needs_divider_update flag.

---
 .../gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c   | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +1 -5
index 1045c268672e..5a547d41d4a1 100644
@@ -70,7 +70,6 @@ static void dp_retrain_link_dp_test(struct dc_link *link,
 	struct dc_state *state = link->dc->current_state;
 	struct dc_stream_update stream_update = { 0 };
 	bool dpms_off = false;
-	bool needs_divider_update = false;
 	bool was_hpo_acquired = resource_is_hpo_acquired(link->dc->current_state);
 	bool is_hpo_acquired;
 	uint8_t count;
@@ -80,9 +79,6 @@ static void dp_retrain_link_dp_test(struct dc_link *link,
 	int num_streams_on_link = 0;
 	struct dc *dc = (struct dc *)link->dc;
 
-	needs_divider_update = (link->dc->link_srv->dp_get_encoding_format(link_setting) !=
-	link->dc->link_srv->dp_get_encoding_format((const struct dc_link_settings *) &link->cur_link_settings));
-
 	udelay(100);
 
 	link_get_master_pipes_with_dpms_on(link, state, &count, pipes);
@@ -99,7 +95,7 @@ static void dp_retrain_link_dp_test(struct dc_link *link,
 		pipes[i]->stream_res.tg->funcs->disable_crtc(pipes[i]->stream_res.tg);
 	}
 
-	if (needs_divider_update && link->dc->res_pool->funcs->update_dc_state_for_encoder_switch) {
+	if (link->dc->res_pool->funcs->update_dc_state_for_encoder_switch) {
 		link->dc->res_pool->funcs->update_dc_state_for_encoder_switch(link,
 				link_setting, count,
 				*pipes, &audio_output[0]);
Signature · 1 line
2.43.0
#18 lore raw

PATCH 13/16 drm/amd/display: Update dc_connection_dac_load to dc_connection_analog_load

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

Update to a more accurate name dc_connection_analog_load.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c    | 2 +-
 drivers/gpu/drm/amd/display/dc/dc_types.h            | 2 +-
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index d66854e7f18f..0c88175e1a22 100644
@@ -7403,7 +7403,7 @@ amdgpu_dm_connector_poll(struct amdgpu_dm_connector *aconnector, bool force)
 	 *
 	 * Only allow to poll such a connector again when forcing.
 	 */
-	if (!force && link->local_sink && link->type == dc_connection_dac_load)
+	if (!force && link->local_sink && link->type == dc_connection_analog_load)
 		return connector->status;
 
 	mutex_lock(&aconnector->hpd_lock);
drivers/gpu/drm/amd/display/dc/dc_types.h +1 -1
index 3e924ee0811d..b3b785f1897d 100644
@@ -355,7 +355,7 @@ enum dc_connection_type {
 	dc_connection_single,
 	dc_connection_mst_branch,
 	dc_connection_sst_branch,
-	dc_connection_dac_load
+	dc_connection_analog_load
 };
 
 struct dc_csc_adjustments {
drivers/gpu/drm/amd/display/dc/link/link_detection.c +4 -4
index bfb5c1c886a5..af1b456ac94e 100644
@@ -1174,7 +1174,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
 				/* If we didn't do DAC load detection yet, do it now
 				 * to verify there really is a display connected.
 				 */
-				if (link->type != dc_connection_dac_load &&
+				if (link->type != dc_connection_analog_load &&
 					!link_detect_dac_load_detect(link)) {
 					if (prev_sink)
 						dc_sink_release(prev_sink);
@@ -1183,7 +1183,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
 				}
 
 				DC_LOG_INFO("%s detected analog display without EDID\n", __func__);
-				link->type = dc_connection_dac_load;
+				link->type = dc_connection_analog_load;
 				sink->edid_caps.analog = true;
 				break;
 			}
@@ -1370,7 +1370,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
  * @link: DC link to evaluate (must support analog signalling).
  * @type: Updated with the detected connection type:
  *        dc_connection_single (analog via DDC),
- *        dc_connection_dac_load (via load-detect),
+ *        dc_connection_analog_load (via load-detect),
  *        or dc_connection_none.
  *
  * Return: true if detection completed.
@@ -1386,7 +1386,7 @@ static bool link_detect_connection_type_analog(struct dc_link *link, enum dc_con
 	}
 
 	if (link_detect_dac_load_detect(link)) {
-		*type = dc_connection_dac_load;
+		*type = dc_connection_analog_load;
 		return true;
 	}
 
Signature · 1 line
2.43.0
#19 lore raw

PATCH 14/16 drm/amd/display: Check NULL before calling dac_load_detection

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

dac_load_detection can be NULL in some scenario, so checking it before calling.

---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_detection.c +4 -2
index af1b456ac94e..56f27a6d2874 100644
@@ -934,7 +934,7 @@ static bool link_detect_dac_load_detect(struct dc_link *link)
 	struct link_encoder *link_enc = link->link_enc;
 	enum engine_id engine_id = link_enc->preferred_engine;
 	enum dal_device_type device_type = DEVICE_TYPE_CRT;
-	enum bp_result bp_result;
+	enum bp_result bp_result = BP_RESULT_UNSUPPORTED;
 	uint32_t enum_id;
 
 	switch (engine_id) {
@@ -948,7 +948,9 @@ static bool link_detect_dac_load_detect(struct dc_link *link)
 		break;
 	}
 
-	bp_result = bios->funcs->dac_load_detection(bios, engine_id, device_type, enum_id);
+	if (bios->funcs->dac_load_detection)
+		bp_result = bios->funcs->dac_load_detection(bios, engine_id, device_type, enum_id);
+
 	return bp_result == BP_RESULT_OK;
 }
 
Signature · 1 line
2.43.0
#20 lore raw

PATCH 15/16 drm/amd/display: Replace log macro for analog display detection

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

link detection should use LINK_INFO() macro.

---
 drivers/gpu/drm/amd/display/dc/link/link_detection.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/link_detection.c +3 -1
index 56f27a6d2874..03db7116cf09 100644
@@ -1184,7 +1184,9 @@ static bool detect_link_and_local_sink(struct dc_link *link,
 					return false;
 				}
 
-				DC_LOG_INFO("%s detected analog display without EDID\n", __func__);
+				LINK_INFO("link=%d, analog display detected without EDID\n",
+					   link->link_index);
+
 				link->type = dc_connection_analog_load;
 				sink->edid_caps.analog = true;
 				break;
Signature · 1 line
2.43.0
#21 lore raw

PATCH 16/16 drm/amd/display: Promote DC to 3.2.364

In reply to Chenyu Chen

From: Taimur Hassan <[email protected]>

This version brings along the following updates:

- Add frame skip feature support flag.
- Add sink EDID data null check.
- Update function name to link_detect_connection_type_analog.
- Fix mismatched unlock for DMUB HW lock in HWSS fast path.
- Fix P010, NV12, YUY2 scale down by four times failure.
- Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL.
- Consolidate dmub fb info to a single struct.
- Add new fields to fams2 config.
- Update timing source enums.
- Add signal type check for dcn401 get_phyd32clk_src.
- Fix dsc eDP issue.
- Remove unnecessary divider update flag.
- Update dc_connection_dac_load to dc_connection_analog_load.
- Check NULL before calling dac_load_detection.
- Replace log macro for analog display detection.

---
 drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 6d8e6c3531f2..712daf09bc12 100644
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;
 struct dcn_optc_reg_state;
 struct dcn_dccg_reg_state;
 
-#define DC_VER "3.2.363"
+#define DC_VER "3.2.364"
 
 /**
  * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.43.0
Tested-by on the v1 series
#22 lore raw
In reply to Chenyu Chen

[Public]

Hi all,

This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.

APU
* Single Display eDP -> 1080p 60hz, 1920x1200 165hz, 3840x2400 60hz
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* MST DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 2x 4k60hz displays
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* SST PCON -> Club3D CAC-1085 + 1x 4k 144hz, FRL3, at a max resolution supported by the dongle of 4k 120hz YUV420 12bpc.
* MST PCON -> 1x 4k 144hz, FRL3, at a max resolution supported by the adapter of 4k 120hz RGB 8bpc.

DGPU
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* MST DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)

The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)

Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing

The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* Samsung ATNA60YV02-0 3840x2400 60Hz OLED eDP

The patchset consists of the amd-staging-drm-next branch (Head commit - 5898aca9771eadeeb9c898c35cb175cee5baa930 -> drm/amdgpu: do not use amdgpu_bo_gpu_offset_no_check individually) with new patches added on top of it.

Tested on Ubuntu 24.04.3, on Wayland and X11, using Gnome.

Thank you,

Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com

-----Original Message-----
From: Chenyu Chen <[email protected]>
Sent: Tuesday, December 16, 2025 4:56 AM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Chen, Chen-Yu <[email protected]>
Subject: [PATCH 00/16] DC Patches Dec 22 2025

This DC patchset brings improvements in multiple areas. In summary, we highlight:

- Add frame skip feature support flag.
- Add sink EDID data null check.
- Update function name to link_detect_connection_type_analog.
- Fix mismatched unlock for DMUB HW lock in HWSS fast path.
- Fix P010, NV12, YUY2 scale down by four times failure.
- Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL.
- Consolidate dmub fb info to a single struct.
- Add new fields to fams2 config.
- Update timing source enums.
- Add signal type check for dcn401 get_phyd32clk_src.
- Fix dsc eDP issue.
- Remove unnecessary divider update flag.
- Update dc_connection_dac_load to dc_connection_analog_load.
- Check NULL before calling dac_load_detection.
- Replace log macro for analog display detection.

Cc Daniel Wheeler <[email protected]>

Alex Hung (4):
drm/amd/display: Update function name to
link_detect_connection_type_analog
drm/amd/display: Update dc_connection_dac_load to
dc_connection_analog_load
drm/amd/display: Check NULL before calling dac_load_detection drm/amd/display: Replace log macro for analog display detection

Charlene Liu (1):
drm/amd/display: Fix dsc eDP issue

ChunTao Tso (1):
drm/amd/display: Add frame skip feature support flag

Clay King (1):
drm/amd/display: Update timing source enums

Cruise Hung (1):
drm/amd/display: Remove unnecessary divider update flag

Dillon Varone (2):
drm/amd/display: Consolidate dmub fb info to a single struct drm/amd/display: Add new fields to fams2 config

Dmytro Laktyushkin (1):
drm/amd/display: Add signal type check for dcn401 get_phyd32clk_src

Dominik Kaszewski (1):
drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL

Kaier Hsueg (1):
drm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure

Nicholas Kazlauskas (1):
drm/amd/display: Fix mismatched unlock for DMUB HW lock in HWSS fast
path

Richard Chiang (1):
drm/amd/display: sink EDID data null check

Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.364

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  6 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 80 +++++++++----------
 .../drm/amd/display/dc/core/dc_hw_sequencer.c | 10 ++-
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 drivers/gpu/drm/amd/display/dc/dc_types.h     |  5 +-
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 12 ++-  .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  6 +-  .../display/dc/link/accessories/link_dp_cts.c |  6 +-  .../drm/amd/display/dc/link/link_detection.c  | 27 ++++---  drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c  |  3 +-
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   | 16 +++-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c |  6 +-  .../gpu/drm/amd/display/dmub/src/dmub_dcn30.c |  6 +-  .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c |  6 +-  .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c |  6 +-  .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c |  6 +-
 .../drm/amd/display/dmub/src/dmub_dcn401.c    |  6 +-
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |  7 +-
 .../amd/display/modules/power/power_helpers.c |  3 +
 19 files changed, 121 insertions(+), 98 deletions(-)

--
2.43.0