All of lore.kernel.org
 help / color / mirror / Atom feed
From: waynelin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Aurabindo Pillai <aurabindo.pillai@amd.com>,
	Roman Li <roman.li@amd.com>, Wayne Lin <wayne.lin@amd.com>,
	Tom Chung <chiahsuan.chung@amd.com>,
	"Fangzhi Zuo" <jerry.zuo@amd.com>,
	Daniel Wheeler <daniel.wheeler@amd.com>, Ray Wu <Ray.Wu@amd.com>,
	Alex Hung <alex.hung@amd.com>, Clay King <clayking@amd.com>,
	Alvin Lee <alvin.lee2@amd.com>
Subject: [PATCH 06/10] drm/amd/display: ensure committing streams is seamless
Date: Tue, 15 Jul 2025 14:49:30 +0800	[thread overview]
Message-ID: <20250715065233.160043-7-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20250715065233.160043-1-Wayne.Lin@amd.com>

From: Clay King <clayking@amd.com>

[Why]
When transitioning between topologies such as multi-display to single
display ODM 2:1, pipes might not be freed before use.

[How]
In dc_commit_streams, commit an additional, minimal transition if
original transition is not seamless to ensure pipes are freed.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Clay King <clayking@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 61d0940cd41f..c17e5843e8b7 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2399,6 +2399,18 @@ enum dc_status dc_commit_streams(struct dc *dc, struct dc_commit_streams_params
 		goto fail;
 	}
 
+	/*
+	 * If not already seamless, make transition seamless by inserting intermediate minimal transition
+	 */
+	if (dc->hwss.is_pipe_topology_transition_seamless &&
+			!dc->hwss.is_pipe_topology_transition_seamless(dc, dc->current_state, context)) {
+		res = commit_minimal_transition_state(dc, context);
+		if (res != DC_OK) {
+			BREAK_TO_DEBUGGER();
+			goto fail;
+		}
+	}
+
 	res = dc_commit_state_no_check(dc, context);
 
 	for (i = 0; i < params->stream_count; i++) {
-- 
2.43.0


  parent reply	other threads:[~2025-07-15  6:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15  6:49 [PATCH 00/10] DC Patches July 21, 2025 waynelin
2025-07-15  6:49 ` [PATCH 01/10] drm/amd/display: [FW Promotion] Release 0.1.18.0 waynelin
2025-07-15  6:49 ` [PATCH 02/10] drm/amd/display: Promote DAL to 3.2.341 waynelin
2025-07-15  6:49 ` [PATCH 03/10] drm/amd/display: Update tiled to tiled copy command waynelin
2025-07-15  6:49 ` [PATCH 04/10] drm/amd/display: fix condition for setting timing_adjust_pending waynelin
2025-07-15  6:49 ` [PATCH 05/10] drm/amd/display: Revert Add HPO encoder support to Replay waynelin
2025-07-15  6:49 ` waynelin [this message]
2025-07-15  6:49 ` [PATCH 07/10] drm/amd/display: Drop unnecessary 'rc' variable in amdgpu_dm_backlight_get_level() waynelin
2025-07-15  6:49 ` [PATCH 08/10] drm/amd/display: Fix divide by zero when calculating min ODM factor waynelin
2025-07-15  6:49 ` [PATCH 09/10] drm/amd/display: [FW Promotion] Release 0.1.19.0 waynelin
2025-07-15  6:49 ` [PATCH 10/10] drm/amd/display: Promote DAL to 3.2.342 waynelin
2025-07-21 13:41 ` [PATCH 00/10] DC Patches July 21, 2025 Wheeler, Daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250715065233.160043-7-Wayne.Lin@amd.com \
    --to=wayne.lin@amd.com \
    --cc=Ray.Wu@amd.com \
    --cc=alex.hung@amd.com \
    --cc=alvin.lee2@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=clayking@amd.com \
    --cc=daniel.wheeler@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=jerry.zuo@amd.com \
    --cc=roman.li@amd.com \
    --cc=sunpeng.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.