Skip to content

Commit

Permalink
drm/amd/display: Avoid programming DTO if Refclk is 0
Browse files Browse the repository at this point in the history
[Why]
Reference clock, either DPREFCLK or DTBCLK can be a value of 0
which then will encounter division by 0.

[How]
Avoid further calculation and programming if refclk is not
populated.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Chris Park <chris.park@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Chris Park authored and Alex Deucher committed Jun 14, 2024
1 parent f2034eb commit d3d996e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ static void dccg401_set_dp_dto(
BREAK_TO_DEBUGGER();
return;
}
if (!params->refclk_hz) {
BREAK_TO_DEBUGGER();
return;
}

if (!dc_is_tmds_signal(params->signal)) {
uint64_t dto_integer;
Expand Down

0 comments on commit d3d996e

Please sign in to comment.