Skip to content

Commit b528cac

Browse files
George Shenalexdeucher
authored andcommitted
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: [email protected] Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: George Shen <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6f3b691 commit b528cac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ void dcn31_hpo_dp_link_enc_set_throttled_vcp_size(
395395
x),
396396
25));
397397

398+
// If y rounds up to integer, carry it over to x.
399+
if (y >> 25) {
400+
x += 1;
401+
y = 0;
402+
}
403+
398404
switch (stream_encoder_inst) {
399405
case 0:
400406
REG_SET_2(DP_DPHY_SYM32_VC_RATE_CNTL0, 0,

0 commit comments

Comments
 (0)