Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/amd/display: Prevent vtotal from being set to 0" failed to apply to 6.1-stable tree

PATCH [email protected] 1 participant 1 message Jul 23, 2023

Subsystems (5)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.1-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.1.y
git checkout FETCH_HEAD
git cherry-pick -x 2a9482e55968ed7368afaa9c2133404069117320
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023072301-urging-upheld-1851@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..

Possible dependencies:

2a9482e55968 ("drm/amd/display: Prevent vtotal from being set to 0") 1a4bcdbea431 ("drm/amd/display: Fix possible underflow for displays with large vblank") 469a62938a45 ("drm/amd/display: update extended blank for dcn314 onwards") e3416e872f84 ("drm/amd/display: Add FAMS validation before trying to use it") 0db13eae41fc ("drm/amd/display: Add minimum Z8 residency debug option") 73dd4ca4b5a0 ("drm/amd/display: Fix Z8 support configurations") db4107e92a81 ("drm/amd/display: fix dc/core/dc.c kernel-doc") 00812bfc7bcb ("drm/amd/display: Add debug option to skip PSR CRTC disable") 80676936805e ("drm/amd/display: Add Z8 allow states to z-state support list") e366f36958f6 ("drm/amd/display: Rework comments on dc file")
bd829d570773 ("drm/amd/display: Refactor eDP PSR codes")

thanks,

greg k-h

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

From 2a9482e55968ed7368afaa9c2133404069117320 Mon Sep 17 00:00:00 2001
From: Daniel Miess <[email protected]>
Date: Thu, 22 Jun 2023 08:11:48 -0400
Subject: [PATCH] drm/amd/display: Prevent vtotal from being set to 0

[Why]
In dcn314 DML the destination pipe vtotal was being set to the crtc adjustment vtotal_min value even in cases where that value is 0.

[How]
Only set vtotal to the crtc adjustment vtotal_min value in cases where the value is non-zero.

drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +5 -1
index d9e049e7ff0a..ed8ddb75b333 100644
@@ -295,7 +295,11 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c
 		pipe = &res_ctx->pipe_ctx[i];
 		timing = &pipe->stream->timing;
 
-		pipes[pipe_cnt].pipe.dest.vtotal = pipe->stream->adjust.v_total_min;
+		if (pipe->stream->adjust.v_total_min != 0)
+			pipes[pipe_cnt].pipe.dest.vtotal = pipe->stream->adjust.v_total_min;
+		else
+			pipes[pipe_cnt].pipe.dest.vtotal = timing->v_total;
+
 		pipes[pipe_cnt].pipe.dest.vblank_nom = timing->v_total - pipes[pipe_cnt].pipe.dest.vactive;
 		pipes[pipe_cnt].pipe.dest.vblank_nom = min(pipes[pipe_cnt].pipe.dest.vblank_nom, dcn3_14_ip.VBlankNomDefaultUS);
 		pipes[pipe_cnt].pipe.dest.vblank_nom = max(pipes[pipe_cnt].pipe.dest.vblank_nom, timing->v_sync_width);