OSDN Git Service

drm/amd/display: Fix psr static frames calculation
authorRoman Li <roman.li@amd.com>
Tue, 14 Jan 2020 18:56:08 +0000 (13:56 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Feb 2020 20:04:36 +0000 (15:04 -0500)
commit2286d2f9e58cb0ae7b9db97106ce73613ab33e5e
tree7add607adae4730be2f70b09e9caf7df64374199
parente2d533eceb1feb0b8b965c3ff11184921532a28e
drm/amd/display: Fix psr static frames calculation

[Why]
Driver crash with psr feature enabled due to divide-by-zero error.
This is a regression after rework to calculate static screen frame
number entry time.

[How]
Correct order of operations to avoid divide-by-zero.

Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Zhan Liu <Zhan.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c