Skip to content

Commit 306cbcc

Browse files
Clay Kingalexdeucher
authored andcommitted
drm/amd/display: incorrect conditions for failing dto calculations
[Why & How] Previously, when calculating dto phase, we would incorrectly fail when phase <=0 without additionally checking for the integer value. This meant that calculations would incorrectly fail when the desired pixel clock was an exact multiple of the reference clock. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Clay King <clayking@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent cf49a45 commit 306cbcc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ void dccg401_set_dp_dto(
619619
dto_integer = div_u64(params->pixclk_hz, dto_modulo_hz);
620620
dto_phase_hz = params->pixclk_hz - dto_integer * dto_modulo_hz;
621621

622-
if (dto_phase_hz <= 0) {
622+
if (dto_phase_hz <= 0 && dto_integer <= 0) {
623623
/* negative pixel rate should never happen */
624624
BREAK_TO_DEBUGGER();
625625
return;

0 commit comments

Comments
 (0)