]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix integer overflow during MSA V_Freq calculation
authorWenjing Liu <wenjing.liu@amd.com>
Thu, 22 Sep 2022 18:22:04 +0000 (14:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Oct 2022 15:59:41 +0000 (11:59 -0400)
commitb3c8fe49629bf37d5fa7cd5ac933b523bcd53977
tree8f395e8dce7c7a02ee01513a2827b3b46381b038
parentd1b9b0b90cf24674814a29e104c4820abdb9fbef
drm/amd/display: fix integer overflow during MSA V_Freq calculation

[why]
Analyzer shows incorrect V freq in MSA for some large timing.

[how]
Cast an 32 bit integer to uint64_t before multiplication to avoid
integer overflow for a very large timing.

Reviewed-by: Ariel Bernstein <Eric.Bernstein@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_encoder.c