The patch below does not apply to the 5.4-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 <stable@xxxxxxxxxxxxxxx>. 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-5.4.y git checkout FETCH_HEAD git cherry-pick -x 719564737a9ac3d0b49c314450b56cf6f7d71358 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<stable@xxxxxxxxxxxxxxx>' --in-reply-to '2024051349-suitcase-strive-29c2@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^.. Possible dependencies: 719564737a9a ("drm/amd/display: Handle Y carry-over in VCP X.Y calculation") 3bc8d9214679 ("drm/amd/display: Add DP 2.0 HPO Link Encoder") 83228ebb82e4 ("drm/amd/display: Add DP 2.0 HPO Stream Encoder") 61452908a79e ("drm/amd/display: Add DP 2.0 Audio Package Generator") 926d6972efb6 ("drm/amd/display: Add DCN3.1 blocks to the DC Makefile") 2083640f0d5b ("drm/amd/display: Add DCN3.1 Resource") cbaf919f3313 ("drm/amd/display: Add DCN3.1 DIO") cd6d421e3d1a ("drm/amd/display: Initial DC support for Beige Goby") 2ff3cf823882 ("drm/amd/display: Fix hangs with psr enabled on dcn3.xx") 8cf9575d7079 ("drm/amd/display: Fix DSC enable sequence") 66611a721b59 ("drm/amd/display: Add debug flag to enable eDP ILR by default") 42b599732ee1 ("drm/amdgpu/display: fix memory leak for dimgrey cavefish") e1f4328f22c0 ("drm/amd/display: Update link encoder object creation") 4f8e37dbaf58 ("drm/amd/display: Support for DMUB AUX") 1e3489136968 ("drm/amd/display: 3.2.124") 77a2b7265f20 ("drm/amd/display: Synchronize displays with different timings") 97628eb5ac20 ("drm/amd/display: 3.2.123") ef4dd6b2757e ("drm/amd/display: 3.2.122") 6fce5bcee582 ("drm/amd/display: move edp sink present detection to hw init") f1e17351984c ("drm/amd/display: 3.2.121") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 719564737a9ac3d0b49c314450b56cf6f7d71358 Mon Sep 17 00:00:00 2001 From: George Shen <george.shen@xxxxxxx> Date: Thu, 16 Sep 2021 19:55:39 -0400 Subject: [PATCH] drm/amd/display: Handle Y carry-over in VCP X.Y calculation Theoretically rare corner case where ceil(Y) results in rounding up to an integer. If this happens, the 1 should be carried over to the X value. CC: stable@xxxxxxxxxxxxxxx Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx> Signed-off-by: George Shen <george.shen@xxxxxxx> Tested-by: Daniel Wheeler <daniel.wheeler@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c index 5b7ad38f85e0..65e45a0b4ff3 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c @@ -395,6 +395,12 @@ void dcn31_hpo_dp_link_enc_set_throttled_vcp_size( x), 25)); + // If y rounds up to integer, carry it over to x. + if (y >> 25) { + x += 1; + y = 0; + } + switch (stream_encoder_inst) { case 0: REG_SET_2(DP_DPHY_SYM32_VC_RATE_CNTL0, 0,