Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/amd/display: always switch off ODM before committing more" failed to apply to 6.6-stable tree

PATCH [email protected] 1 participant 1 message Nov 24, 2023

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x ea7e2edca8b2150f945ee25af142fef8438c9944
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023112429-sizable-fool-d6e7@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..

Possible dependencies:

ea7e2edca8b2 ("drm/amd/display: always switch off ODM before committing more streams")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From ea7e2edca8b2150f945ee25af142fef8438c9944 Mon Sep 17 00:00:00 2001
From: Wenjing Liu <[email protected]>
Date: Tue, 15 Aug 2023 10:47:52 -0400
Subject: [PATCH] drm/amd/display: always switch off ODM before committing more
streams

ODM power optimization is only supported with single stream. When ODM power optimization is enabled, we might not have enough free pipes for enabling other stream. So when we are committing more than 1 stream we should first switch off ODM power optimization to make room for new stream and then allocating pipe resource for the new stream.

Fixes 59de751e3845 ("drm/amd/display: add ODM case when looking for first split pipe")
drivers/gpu/drm/amd/display/dc/core/dc.c +5 -5
index c8f301aabcf8..5aab67868cb6 100644
@@ -2073,12 +2073,12 @@ enum dc_status dc_commit_streams(struct dc *dc,
 		}
 	}
 
-	/* Check for case where we are going from odm 2:1 to max
-	 *  pipe scenario.  For these cases, we will call
-	 *  commit_minimal_transition_state() to exit out of odm 2:1
-	 *  first before processing new streams
+	/* ODM Combine 2:1 power optimization is only applied for single stream
+	 * scenario, it uses extra pipes than needed to reduce power consumption
+	 * We need to switch off this feature to make room for new streams.
 	 */
-	if (stream_count == dc->res_pool->pipe_count) {
+	if (stream_count > dc->current_state->stream_count &&
+			dc->current_state->stream_count == 1) {
 		for (i = 0; i < dc->res_pool->pipe_count; i++) {
 			pipe = &dc->current_state->res_ctx.pipe_ctx[i];
 			if (pipe->next_odm_pipe)