Skip to content
Snippets Groups Projects
Commit abf5ed22 authored by Leslie Shi's avatar Leslie Shi
Browse files

drm/amdkcl: Fix 64 bit wraparound resulting in illegal drm mode


[Why]
For m = drm_display_mode{.clock = 533250, .htotal = 4000, .vtotal = 2222},
common_rates[i] = 60000, the result of target_vtotal is 2221. This cause
wraparound of variable target_vtotal_diff.

[How]
Skip the loop if target_vtotal less than m->vtotal

Signed-off-by: default avatarLeslie Shi <Yuliang.Shi@amd.com>
Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
parent 57101c07
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment