From 8b4fb3f23334c59c4f05536f3adda5d33b02b83b Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 20 May 2024 05:24:11 +0000 Subject: [PATCH] drm/amd/display: Handle Y carry-over in VCP X.Y calculation From George Shen 7be093e45215d4d9dfda515aebb7c31dc9413144 in linux-6.6.y/6.6.3 719564737a9ac3d0b49c314450b56cf6f7d71358 in mainline linux --- .../drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c b/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c index 083a43c476e..fa8623ccc7e 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c +++ b/sys/dev/pci/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, -- 2.20.1