]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit283e0a673cdf59fe103707ac0466492b315c81a2
tree8f395e8dce7c7a02ee01513a2827b3b46381b038
parent40169e2f37127b7fe60736045b1f9fc04f76b471
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