]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Prevent overflow on DTO calculation
authorChris Park <chris.park@amd.com>
Tue, 28 May 2024 01:21:30 +0000 (21:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:17:15 +0000 (16:17 -0400)
commit8362061eed6761a36866876ba2dd00ec638a13b4
tree303965f6e9c65f5df230f0ae3f1d4a90318bdcb4
parented79ab5a07c1cb4bb05422ac6e794e40c4c1484c
drm/amd/display: Prevent overflow on DTO calculation

[Why]
uint32_t is implicitly converted to uint64_t while multiplication
still happens on uint32_t side.  This creates digit overflow
for large pixel clock which is meant to be retained in uint64_t.

[How]
Calculate multiplication of units in uint64_t domain instead of
uint32_t in DTO parameter clock caculation.

Reviewed-by: Alvin Lee <alvin.lee2@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>
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c